mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ccc8b38b77 | ||
|
|
c6d1c8063b | ||
|
|
0ffb6d6362 | ||
|
|
252aaa500e | ||
|
|
d456908e37 | ||
|
|
cd13bfb429 | ||
|
|
ff87bc5889 | ||
|
|
42cd80c172 | ||
|
|
123cd3a092 | ||
|
|
cbc3c4e6eb | ||
|
|
b50e39e5cb | ||
|
|
bbe5ef451a | ||
|
|
c359c0e747 | ||
|
|
99ecb0b60f | ||
|
|
cfc7e45020 | ||
|
|
0307d064ad | ||
|
|
89cd824c70 | ||
|
|
1066e8a5e9 | ||
|
|
d2c31df106 | ||
|
|
a56ffee8f7 | ||
|
|
7c798126e3 | ||
|
|
a755131488 | ||
|
|
648ff65a76 | ||
|
|
854d1c0a1a | ||
|
|
4f561aa9e9 | ||
|
|
8c1c4df10d | ||
|
|
a9e963e84b | ||
|
|
4a509610fe | ||
|
|
7de5066c87 | ||
|
|
24b1be1dd2 | ||
|
|
ee00213961 | ||
|
|
b51b32c758 | ||
|
|
d16e669538 | ||
|
|
50d258fae9 | ||
|
|
494cceff73 | ||
|
|
9885e61962 | ||
|
|
4b88a290c4 | ||
|
|
ee8335e5f1 | ||
|
|
fcde7fdb80 | ||
|
|
3d42da3e97 | ||
|
|
c81a37b740 | ||
|
|
4fa005ade0 | ||
|
|
bf656e892f | ||
|
|
abf074eaf4 | ||
|
|
47657b51ab | ||
|
|
76f8ffeb90 | ||
|
|
e68ae91b59 | ||
|
|
9222c21b4a | ||
|
|
c837d9c91c | ||
|
|
cdf7bef150 | ||
|
|
eb52da9702 | ||
|
|
8a1f2a151d | ||
|
|
1b4ced3e55 | ||
|
|
29cd068dbd | ||
|
|
6681614f1a | ||
|
|
1030db87d4 | ||
|
|
356ab30e89 | ||
|
|
0f09b8df77 | ||
|
|
23c495b939 | ||
|
|
2ac0420903 | ||
|
|
aae070f826 | ||
|
|
6ad825d1e0 | ||
|
|
7910506b3c |
@@ -19,10 +19,10 @@ LIBJPEGTURBO=3.1.0
|
||||
LIBPNG=1.6.45
|
||||
LIBWEBP=1.5.0
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
SDL=SDL3-3.2.8
|
||||
QT=6.8.2
|
||||
SDL=SDL3-3.2.10
|
||||
QT=6.9.0
|
||||
ZSTD=1.5.7
|
||||
KDDOCKWIDGETS=2.2.1
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
|
||||
SHADERC=2024.1
|
||||
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
|
||||
@@ -38,19 +38,19 @@ fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
13388fabb361de768ecdf2b65e52bb27d1054cae6ccb6942ba926e378e00db03 $SDL.tar.gz
|
||||
f87be7b4dec66db4098e9c167b2aa34e2ca10aeb5443bdde95ae03185ed513e0 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
012043ce6d411e6e8a91fdc4e05e6bedcfa10fcb1347d3c33908f7fdd10dfe05 qtbase-everywhere-src-$QT.tar.xz
|
||||
d2a1bbb84707b8a0aec29227b170be00f04383fbf2361943596d09e7e443c8e1 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
aa2579f21ca66d19cbcf31d87e9067e07932635d36869c8239d4decd0a9dc1fa qtsvg-everywhere-src-$QT.tar.xz
|
||||
326381b7d43f07913612f291abc298ae79bd95382e2233abce982cff2b53d2c0 qttools-everywhere-src-$QT.tar.xz
|
||||
d2106e8a580bfd77702c4c1840299288d344902b0e2c758ca813ea04c6d6a3d1 qttranslations-everywhere-src-$QT.tar.xz
|
||||
5e46157908295f2bf924462d8c0855b0508ba338ced9e810891fefa295dc9647 qtwayland-everywhere-src-$QT.tar.xz
|
||||
c1800c2ea835801af04a05d4a32321d79a93954ee3ae2172bbeacf13d1f0598c qtbase-everywhere-src-$QT.tar.xz
|
||||
2047c6242a57bf97cf40079fa9f91752c137cd9ae84760faa9a2e5e8a440606f qtimageformats-everywhere-src-$QT.tar.xz
|
||||
ec359d930c95935ea48af58b100c2f5d0d275968ec8ca1e0e76629b7159215fc qtsvg-everywhere-src-$QT.tar.xz
|
||||
fa645589cc3f939022401a926825972a44277dead8ec8607d9f2662e6529c9a4 qttools-everywhere-src-$QT.tar.xz
|
||||
1d5581ef5fc7c7bc556f2403017983683993bbebfcdf977ef8f180f604668c3f qttranslations-everywhere-src-$QT.tar.xz
|
||||
503416fcb04db503bd130e6a49c45e3e546f091e83406f774a0c703130c91805 qtwayland-everywhere-src-$QT.tar.xz
|
||||
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
|
||||
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
||||
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
8693e06abee0c88517d8480b22647702a51a0708f3c876ed5385d9a4e356e1a5 KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
EOF
|
||||
|
||||
curl -L \
|
||||
@@ -193,32 +193,9 @@ echo "Installing Qt Tools..."
|
||||
rm -fr "qttools-everywhere-src-$QT"
|
||||
tar xf "qttools-everywhere-src-$QT.tar.xz"
|
||||
cd "qttools-everywhere-src-$QT"
|
||||
# Force disable clang scanning, it gets very confused.
|
||||
patch -u configure.cmake <<EOF
|
||||
--- configure.cmake
|
||||
+++ configure.cmake
|
||||
@@ -14,12 +14,12 @@
|
||||
# Presumably because 6.0 ClangConfig.cmake files are not good enough?
|
||||
# In any case explicitly request a minimum version of 8.x for now, otherwise
|
||||
# building with CMake will fail at compilation time.
|
||||
-qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
|
||||
+#qt_find_package(WrapLibClang 8 PROVIDED_TARGETS WrapLibClang::WrapLibClang)
|
||||
# special case end
|
||||
|
||||
-if(TARGET WrapLibClang::WrapLibClang)
|
||||
- set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
|
||||
-endif()
|
||||
+#if(TARGET WrapLibClang::WrapLibClang)
|
||||
+# set(TEST_libclang "ON" CACHE BOOL "Required libclang version found." FORCE)
|
||||
+#endif()
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=ON -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
|
||||
"$INSTALLDIR/bin/qt-configure-module" .. -- -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
|
||||
cmake --build . --parallel
|
||||
ninja install
|
||||
cd ../../
|
||||
|
||||
48
.github/workflows/scripts/linux/build-gammaray.sh
vendored
Executable file
48
.github/workflows/scripts/linux/build-gammaray.sh
vendored
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Syntax: $0 <deps directory> <output directory>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEPSDIR=$(realpath "$1")
|
||||
INSTALLDIR=$(realpath "$2")
|
||||
|
||||
if [ ! -d "$DEPSDIR/include/QtCore" ]; then
|
||||
echo "Error: The build-dependencies-qt.sh script must be run on the deps directory first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GAMMARAY=master
|
||||
|
||||
mkdir -p gammaray-build
|
||||
cd gammaray-build
|
||||
|
||||
echo "Downloading..."
|
||||
curl -L -o "GammaRay-$GAMMARAY.tar.gz" https://github.com/KDAB/GammaRay/archive/$GAMMARAY.tar.gz
|
||||
|
||||
rm -fr "GammaRay-$GAMMARAY"
|
||||
|
||||
echo "Extracting..."
|
||||
tar xf "GammaRay-$GAMMARAY.tar.gz"
|
||||
|
||||
cd "GammaRay-$GAMMARAY"
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
echo "Configuring..."
|
||||
cmake -DCMAKE_PREFIX_PATH="$DEPSDIR" -G Ninja -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DGAMMARAY_BUILD_DOCS=false ..
|
||||
|
||||
echo "Building..."
|
||||
cmake --build . --parallel
|
||||
|
||||
echo "Installing..."
|
||||
cmake --build . --target install
|
||||
|
||||
cd ../..
|
||||
|
||||
echo "Cleaning up..."
|
||||
cd ..
|
||||
rm -r gammaray-build
|
||||
@@ -14,8 +14,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL3-3.2.8.tar.gz",
|
||||
"sha256": "13388fabb361de768ecdf2b65e52bb27d1054cae6ccb6942ba926e378e00db03"
|
||||
"url": "https://libsdl.org/release/SDL3-3.2.10.tar.gz",
|
||||
"sha256": "f87be7b4dec66db4098e9c167b2aa34e2ca10aeb5443bdde95ae03185ed513e0"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/KDAB/KDDockWidgets.git",
|
||||
"tag": "v2.2.1",
|
||||
"commit": "3aaccddc00a11a643e0959a24677838993de15ac",
|
||||
"tag": "v2.2.3",
|
||||
"commit": "28d16d0431d7cdc9f36cb619d22621146fdfab44",
|
||||
"disable-submodules": true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=10.0.1
|
||||
SDL=SDL3-3.2.8
|
||||
SDL=SDL3-3.2.10
|
||||
ZSTD=1.5.7
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
LIBPNG=1.6.45
|
||||
@@ -49,7 +49,7 @@ LIBWEBP=1.5.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.3
|
||||
KDDOCKWIDGETS=2.2.1
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
|
||||
SHADERC=2024.1
|
||||
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
|
||||
@@ -77,7 +77,7 @@ CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 harfbuzz-$HARFBUZZ.tar.gz
|
||||
13388fabb361de768ecdf2b65e52bb27d1054cae6ccb6942ba926e378e00db03 $SDL.tar.gz
|
||||
f87be7b4dec66db4098e9c167b2aa34e2ca10aeb5443bdde95ae03185ed513e0 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
@@ -94,7 +94,7 @@ eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADE
|
||||
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
||||
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
8693e06abee0c88517d8480b22647702a51a0708f3c876ed5385d9a4e356e1a5 KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
EOF
|
||||
|
||||
curl -C - -L \
|
||||
|
||||
@@ -22,7 +22,7 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=10.0.1
|
||||
SDL=SDL3-3.2.8
|
||||
SDL=SDL3-3.2.10
|
||||
ZSTD=1.5.7
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
LIBPNG=1.6.45
|
||||
@@ -31,7 +31,7 @@ LIBWEBP=1.5.0
|
||||
FFMPEG=6.0
|
||||
MOLTENVK=1.2.9
|
||||
QT=6.7.3
|
||||
KDDOCKWIDGETS=2.2.1
|
||||
KDDOCKWIDGETS=2.2.3
|
||||
|
||||
SHADERC=2024.1
|
||||
SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
|
||||
@@ -57,7 +57,7 @@ CMAKE_COMMON=(
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 harfbuzz-$HARFBUZZ.tar.gz
|
||||
13388fabb361de768ecdf2b65e52bb27d1054cae6ccb6942ba926e378e00db03 $SDL.tar.gz
|
||||
f87be7b4dec66db4098e9c167b2aa34e2ca10aeb5443bdde95ae03185ed513e0 $SDL.tar.gz
|
||||
eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
@@ -74,7 +74,7 @@ eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADE
|
||||
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
||||
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
03ee1a2c06f3b61008478f4abe9423454e53e580b9488b47c8071547c6a9db47 shaderc-spirv-tools-$SHADERC_SPIRVTOOLS.tar.gz
|
||||
8693e06abee0c88517d8480b22647702a51a0708f3c876ed5385d9a4e356e1a5 KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
b8529755b2d54205341766ae168e83177c6120660539f9afba71af6bca4b81ec KDDockWidgets-$KDDOCKWIDGETS.tar.gz
|
||||
EOF
|
||||
|
||||
curl -L \
|
||||
@@ -88,11 +88,11 @@ curl -L \
|
||||
-O "https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$LIBWEBP.tar.gz" \
|
||||
-O "https://ffmpeg.org/releases/ffmpeg-$FFMPEG.tar.xz" \
|
||||
-O "https://github.com/KhronosGroup/MoltenVK/archive/refs/tags/v$MOLTENVK.tar.gz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtimageformats-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
|
||||
-O "https://download.qt.io/archive/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
|
||||
-o "shaderc-$SHADERC.tar.gz" "https://github.com/google/shaderc/archive/refs/tags/v$SHADERC.tar.gz" \
|
||||
-o "shaderc-glslang-$SHADERC_GLSLANG.tar.gz" "https://github.com/KhronosGroup/glslang/archive/$SHADERC_GLSLANG.tar.gz" \
|
||||
-o "shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz" "https://github.com/KhronosGroup/SPIRV-Headers/archive/$SHADERC_SPIRVHEADERS.tar.gz" \
|
||||
|
||||
@@ -47,14 +47,14 @@ set HARFBUZZ=10.0.1
|
||||
set LIBJPEGTURBO=3.1.0
|
||||
set LIBPNG=1645
|
||||
set LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
set QT=6.8.2
|
||||
set QTMINOR=6.8
|
||||
set SDL=SDL3-3.2.8
|
||||
set SDL=SDL3-3.2.10
|
||||
set QT=6.9.0
|
||||
set QTMINOR=6.9
|
||||
set WEBP=1.5.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.7
|
||||
set KDDOCKWIDGETS=2.2.1
|
||||
set KDDOCKWIDGETS=2.2.3
|
||||
|
||||
set SHADERC=2024.1
|
||||
set SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
|
||||
@@ -67,15 +67,15 @@ call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lp
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 || 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 "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/%LZ4%.zip" 0c33119688d6b180c7e760b0acd70059222389cfd581632623784bee27e51a31 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 7f8ff5c8246db4145301bc122601a5f8cef25ee2c326eddb3e88668849c61ddf || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 44087aec0caa4aa81437e787917d29d97536484a682a5d51ec035878e57c0b5c || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 83c72b5dfad04854acf61d592e3f9cdc2ed894779aab8d0470d966715266caaf || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 144d55e4d199793a76c53f19872633a79aec0314039f6f99b6a10b5be7a78fbf || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 102539447c1c76d206f24bcca2c911270cf53991548d9c3d7d0d01855f651e3b || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 33ccac9f99a357ffd83cb2d7179a0c0ffcba85a14d23d86619d5dc9721ded42f || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 01d9ab20fc071b076be91df5396b464b4ef159e93b2b2addda1cc36750fc1f29 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 513df15a6365a40f6230ec9463ad8c71b824e181d4b661dac9707e103b24ae0c || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" d428fd17a0d3f92c48a30f1d23806bf20352fbce2e80e5bbee27fa80576480ee || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 54bf06afeb67035f1c6afcd00beec755c0d776626b4cce9ab56992a55215ba69 || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 5f8a94a161bd2e71a82f478dc19f4ec77ac95a50709f5a68d5951001ed6bb856 || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 5885ce1a114615cc5fa69e459f069d3fe2bcb1320fd9cc162821f3920ef44735 || goto error
|
||||
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/v2.2.1.zip" 78b5e242bf47476e150175b7de934ab84069459e151beb2d5ce84fd067138aa5 || goto error
|
||||
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
|
||||
|
||||
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 6c9f42ed6bf42750f5369b089909abfdcf0101488b4a1f41116d5159d00af8e7 || goto error
|
||||
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 03ad8a6fa987af4653d0cfe6bdaed41bcf617f1366a151fb1574da75950cd3e8 || goto error
|
||||
|
||||
@@ -45,14 +45,14 @@ set HARFBUZZ=10.0.1
|
||||
set LIBJPEGTURBO=3.1.0
|
||||
set LIBPNG=1645
|
||||
set LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
set QT=6.8.2
|
||||
set QTMINOR=6.8
|
||||
set SDL=SDL3-3.2.8
|
||||
set SDL=SDL3-3.2.10
|
||||
set QT=6.9.0
|
||||
set QTMINOR=6.9
|
||||
set WEBP=1.5.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
set ZSTD=1.5.7
|
||||
set KDDOCKWIDGETS=2.2.1
|
||||
set KDDOCKWIDGETS=2.2.3
|
||||
|
||||
set SHADERC=2024.1
|
||||
set SHADERC_GLSLANG=142052fa30f9eca191aa9dcf65359fcaed09eeec
|
||||
@@ -65,15 +65,15 @@ call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lp
|
||||
call :downloadfile "libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" "https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/%LIBJPEGTURBO%/libjpeg-turbo-%LIBJPEGTURBO%.tar.gz" 9564c72b1dfd1d6fe6274c5f95a8d989b59854575d4bbee44ade7bc17aa9bc93 || 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 "lz4-%LZ4%.zip" "https://github.com/lz4/lz4/archive/%LZ4%.zip" 0c33119688d6b180c7e760b0acd70059222389cfd581632623784bee27e51a31 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 7f8ff5c8246db4145301bc122601a5f8cef25ee2c326eddb3e88668849c61ddf || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 44087aec0caa4aa81437e787917d29d97536484a682a5d51ec035878e57c0b5c || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 83c72b5dfad04854acf61d592e3f9cdc2ed894779aab8d0470d966715266caaf || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 144d55e4d199793a76c53f19872633a79aec0314039f6f99b6a10b5be7a78fbf || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 102539447c1c76d206f24bcca2c911270cf53991548d9c3d7d0d01855f651e3b || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 33ccac9f99a357ffd83cb2d7179a0c0ffcba85a14d23d86619d5dc9721ded42f || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" 01d9ab20fc071b076be91df5396b464b4ef159e93b2b2addda1cc36750fc1f29 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" 513df15a6365a40f6230ec9463ad8c71b824e181d4b661dac9707e103b24ae0c || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" d428fd17a0d3f92c48a30f1d23806bf20352fbce2e80e5bbee27fa80576480ee || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 54bf06afeb67035f1c6afcd00beec755c0d776626b4cce9ab56992a55215ba69 || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" 5f8a94a161bd2e71a82f478dc19f4ec77ac95a50709f5a68d5951001ed6bb856 || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 5885ce1a114615cc5fa69e459f069d3fe2bcb1320fd9cc162821f3920ef44735 || goto error
|
||||
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/v2.2.1.zip" 78b5e242bf47476e150175b7de934ab84069459e151beb2d5ce84fd067138aa5 || goto error
|
||||
call :downloadfile "KDDockWidgets-%KDDOCKWIDGETS%.zip" "https://github.com/KDAB/KDDockWidgets/archive/v%KDDOCKWIDGETS%.zip" 1ba8e5b48f3b4d47d2de7121529d448532200fa36d9ed21f93909f6eb03f61cb || goto error
|
||||
|
||||
call :downloadfile "shaderc-%SHADERC%.zip" "https://github.com/google/shaderc/archive/refs/tags/v%SHADERC%.zip" 6c9f42ed6bf42750f5369b089909abfdcf0101488b4a1f41116d5159d00af8e7 || goto error
|
||||
call :downloadfile "shaderc-glslang-%SHADERC_GLSLANG%.zip" "https://github.com/KhronosGroup/glslang/archive/%SHADERC_GLSLANG%.zip" 03ad8a6fa987af4653d0cfe6bdaed41bcf617f1366a151fb1574da75950cd3e8 || goto error
|
||||
|
||||
68
.github/workflows/scripts/windows/build-gammaray.bat
vendored
Normal file
68
.github/workflows/scripts/windows/build-gammaray.bat
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo Setting environment...
|
||||
if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
) else if exist "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" (
|
||||
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
) else (
|
||||
echo Visual Studio 2022 not found.
|
||||
goto error
|
||||
)
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
cd ..\..\..\..
|
||||
cd deps || goto error
|
||||
set "DEPSDIR=%CD%"
|
||||
cd ..
|
||||
mkdir gammaray
|
||||
cd gammaray || goto error
|
||||
set "INSTALLDIR=%CD%"
|
||||
cd ..
|
||||
mkdir gammaray-build
|
||||
cd gammaray-build || goto error
|
||||
set "BUILDDIR=%CD%"
|
||||
|
||||
echo DEPSDIR=%DEPSDIR%
|
||||
echo BUILDDIR=%BUILDDIR%
|
||||
echo INSTALLDIR=%INSTALLDIR%
|
||||
|
||||
set GAMMARAY="master"
|
||||
|
||||
echo Downloading...
|
||||
curl -L -o "GammaRay-%GAMMARAY%.tar.gz" "https://github.com/KDAB/GammaRay/archive/%GAMMARAY%.tar.gz" || goto error
|
||||
|
||||
rmdir /s /q "GammaRay-%GAMMARAY%"
|
||||
|
||||
echo Extracting...
|
||||
tar -xf "GammaRay-%GAMMARAY%.tar.gz" || goto error
|
||||
|
||||
echo Configuring...
|
||||
cmake "GammaRay-%GAMMARAY%" -B build -DCMAKE_PREFIX_PATH="%DEPSDIR%" -G Ninja -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DGAMMARAY_BUILD_DOCS=false || goto error
|
||||
|
||||
echo Building...
|
||||
cmake --build build --parallel || goto error
|
||||
|
||||
echo Installing...
|
||||
cmake --build build --target install || goto errorlevel
|
||||
|
||||
echo Copying DLLs...
|
||||
xcopy /y "%DEPSDIR%\bin\*.dll" "%INSTALLDIR%\bin\"
|
||||
xcopy /y /e /s "%DEPSDIR%\plugins" "%INSTALLDIR%\bin\"
|
||||
|
||||
echo Cleaning up...
|
||||
cd ..
|
||||
rd /s /q gammaray-build
|
||||
|
||||
echo Exiting with success.
|
||||
popd
|
||||
pause
|
||||
exit 0
|
||||
|
||||
:error
|
||||
echo Failed with error #%errorlevel%.
|
||||
popd
|
||||
pause
|
||||
exit %errorlevel%
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -109,6 +109,8 @@ oprofile_data/
|
||||
/deps-build
|
||||
/deps
|
||||
/deps-arm64
|
||||
/gammaray-build
|
||||
/gammaray
|
||||
/ipch
|
||||
|
||||
!/3rdparty/libjpeg/change.log
|
||||
|
||||
11
3rdparty/cpuinfo/include/cpuinfo.h
vendored
11
3rdparty/cpuinfo/include/cpuinfo.h
vendored
@@ -522,6 +522,8 @@ enum cpuinfo_uarch {
|
||||
cpuinfo_uarch_falkor = 0x00400103,
|
||||
/** Qualcomm Saphira. */
|
||||
cpuinfo_uarch_saphira = 0x00400104,
|
||||
/** Qualcomm Oryon. */
|
||||
cpuinfo_uarch_oryon = 0x00400105,
|
||||
|
||||
/** Nvidia Denver. */
|
||||
cpuinfo_uarch_denver = 0x00500100,
|
||||
@@ -821,6 +823,7 @@ struct cpuinfo_x86_isa {
|
||||
bool avx512_4vnniw;
|
||||
bool avx512_4fmaps;
|
||||
bool avx10_1;
|
||||
bool avx10_2;
|
||||
bool amx_bf16;
|
||||
bool amx_tile;
|
||||
bool amx_int8;
|
||||
@@ -1444,6 +1447,14 @@ static inline bool cpuinfo_has_x86_avx10_1(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_avx10_2(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.avx10_2;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline bool cpuinfo_has_x86_hle(void) {
|
||||
#if CPUINFO_ARCH_X86 || CPUINFO_ARCH_X86_64
|
||||
return cpuinfo_isa.hle;
|
||||
|
||||
28
3rdparty/cpuinfo/src/arm/api.h
vendored
28
3rdparty/cpuinfo/src/arm/api.h
vendored
@@ -1,5 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define RESTRICT_STATIC /* nothing for MSVC */
|
||||
#else
|
||||
#define RESTRICT_STATIC restrict static
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -82,11 +88,11 @@ struct cpuinfo_arm_chipset {
|
||||
|
||||
#ifndef __cplusplus
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_chipset_to_string(
|
||||
const struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
char name[restrict static CPUINFO_ARM_CHIPSET_NAME_MAX]);
|
||||
const struct cpuinfo_arm_chipset chipset[RESTRICT_STATIC 1],
|
||||
char name[RESTRICT_STATIC CPUINFO_ARM_CHIPSET_NAME_MAX]);
|
||||
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_fixup_chipset(
|
||||
struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
struct cpuinfo_arm_chipset chipset[RESTRICT_STATIC 1],
|
||||
uint32_t cores,
|
||||
uint32_t max_cpu_freq_max);
|
||||
|
||||
@@ -95,23 +101,23 @@ CPUINFO_INTERNAL void cpuinfo_arm_decode_vendor_uarch(
|
||||
#if CPUINFO_ARCH_ARM
|
||||
bool has_vfpv4,
|
||||
#endif
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]);
|
||||
enum cpuinfo_vendor vendor[RESTRICT_STATIC 1],
|
||||
enum cpuinfo_uarch uarch[RESTRICT_STATIC 1]);
|
||||
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_decode_cache(
|
||||
enum cpuinfo_uarch uarch,
|
||||
uint32_t cluster_cores,
|
||||
uint32_t midr,
|
||||
const struct cpuinfo_arm_chipset chipset[restrict static 1],
|
||||
const struct cpuinfo_arm_chipset chipset[RESTRICT_STATIC 1],
|
||||
uint32_t cluster_id,
|
||||
uint32_t arch_version,
|
||||
struct cpuinfo_cache l1i[restrict static 1],
|
||||
struct cpuinfo_cache l1d[restrict static 1],
|
||||
struct cpuinfo_cache l2[restrict static 1],
|
||||
struct cpuinfo_cache l3[restrict static 1]);
|
||||
struct cpuinfo_cache l1i[RESTRICT_STATIC 1],
|
||||
struct cpuinfo_cache l1d[RESTRICT_STATIC 1],
|
||||
struct cpuinfo_cache l2[RESTRICT_STATIC 1],
|
||||
struct cpuinfo_cache l3[RESTRICT_STATIC 1]);
|
||||
|
||||
CPUINFO_INTERNAL uint32_t
|
||||
cpuinfo_arm_compute_max_cache_size(const struct cpuinfo_processor processor[restrict static 1]);
|
||||
cpuinfo_arm_compute_max_cache_size(const struct cpuinfo_processor processor[RESTRICT_STATIC 1]);
|
||||
#else /* defined(__cplusplus) */
|
||||
CPUINFO_INTERNAL void cpuinfo_arm_decode_cache(
|
||||
enum cpuinfo_uarch uarch,
|
||||
|
||||
1
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
1
3rdparty/cpuinfo/src/arm/mach/init.c
vendored
@@ -101,7 +101,6 @@ static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t core_index,
|
||||
return cpuinfo_uarch_unknown;
|
||||
}
|
||||
|
||||
/* Small bodge until cpuinfo merges PR #246 */
|
||||
static int read_package_name_from_brand_string(char* package_name) {
|
||||
size_t size;
|
||||
if (sysctlbyname("machdep.cpu.brand_string", NULL, &size, NULL, 0) != 0) {
|
||||
|
||||
7
3rdparty/cpuinfo/src/arm/uarch.c
vendored
7
3rdparty/cpuinfo/src/arm/uarch.c
vendored
@@ -9,8 +9,8 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
#if CPUINFO_ARCH_ARM
|
||||
bool has_vfpv4,
|
||||
#endif /* CPUINFO_ARCH_ARM */
|
||||
enum cpuinfo_vendor vendor[restrict static 1],
|
||||
enum cpuinfo_uarch uarch[restrict static 1]) {
|
||||
enum cpuinfo_vendor vendor[RESTRICT_STATIC 1],
|
||||
enum cpuinfo_uarch uarch[RESTRICT_STATIC 1]) {
|
||||
switch (midr_get_implementer(midr)) {
|
||||
case 'A':
|
||||
*vendor = cpuinfo_vendor_arm;
|
||||
@@ -332,6 +332,9 @@ void cpuinfo_arm_decode_vendor_uarch(
|
||||
*uarch = cpuinfo_uarch_cortex_a55;
|
||||
break;
|
||||
#if CPUINFO_ARCH_ARM64
|
||||
case 0x001:
|
||||
*uarch = cpuinfo_uarch_oryon;
|
||||
break;
|
||||
case 0xC00:
|
||||
*uarch = cpuinfo_uarch_falkor;
|
||||
break;
|
||||
|
||||
@@ -750,11 +750,14 @@ void store_core_info_per_processor(
|
||||
if (cores) {
|
||||
processors[processor_global_index].core = cores + core_id;
|
||||
cores[core_id].core_id = core_id;
|
||||
get_core_uarch_for_efficiency(
|
||||
chip_info->chip_name,
|
||||
core_info->Processor.EfficiencyClass,
|
||||
&(cores[core_id].uarch),
|
||||
&(cores[core_id].frequency));
|
||||
|
||||
if (chip_info->uarchs == NULL) {
|
||||
cpuinfo_log_error("uarch is NULL for core %d", core_id);
|
||||
return;
|
||||
}
|
||||
|
||||
cores[core_id].uarch = chip_info->uarchs[0].uarch;
|
||||
cores[core_id].frequency = chip_info->uarchs[0].frequency;
|
||||
|
||||
/* We don't have cluster information, so we handle it as
|
||||
* fixed 1 to (cluster / cores).
|
||||
|
||||
187
3rdparty/cpuinfo/src/arm/windows/init.c
vendored
187
3rdparty/cpuinfo/src/arm/windows/init.c
vendored
@@ -7,6 +7,9 @@
|
||||
#include <cpuinfo/internal-api.h>
|
||||
#include <cpuinfo/log.h>
|
||||
|
||||
#include <arm/api.h>
|
||||
#include <arm/midr.h>
|
||||
|
||||
#include "windows-arm-init.h"
|
||||
|
||||
struct cpuinfo_arm_isa cpuinfo_isa;
|
||||
@@ -14,62 +17,7 @@ struct cpuinfo_arm_isa cpuinfo_isa;
|
||||
static void set_cpuinfo_isa_fields(void);
|
||||
static struct woa_chip_info* get_system_info_from_registry(void);
|
||||
|
||||
static struct woa_chip_info woa_chip_unknown = {
|
||||
L"Unknown",
|
||||
woa_chip_name_unknown,
|
||||
{{cpuinfo_vendor_unknown, cpuinfo_uarch_unknown, 0}}};
|
||||
|
||||
/* Please add new SoC/chip info here! */
|
||||
static struct woa_chip_info woa_chips[woa_chip_name_last] = {
|
||||
/* Microsoft SQ1 Kryo 495 4 + 4 cores (3 GHz + 1.80 GHz) */
|
||||
[woa_chip_name_microsoft_sq_1] =
|
||||
{L"Microsoft SQ1",
|
||||
woa_chip_name_microsoft_sq_1,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a55,
|
||||
1800000000,
|
||||
},
|
||||
{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a76,
|
||||
3000000000,
|
||||
}}},
|
||||
/* Microsoft SQ2 Kryo 495 4 + 4 cores (3.15 GHz + 2.42 GHz) */
|
||||
[woa_chip_name_microsoft_sq_2] =
|
||||
{L"Microsoft SQ2",
|
||||
woa_chip_name_microsoft_sq_2,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a55,
|
||||
2420000000,
|
||||
},
|
||||
{cpuinfo_vendor_arm, cpuinfo_uarch_cortex_a76, 3150000000}}},
|
||||
/* Snapdragon (TM) 8cx Gen 3 @ 3.0 GHz */
|
||||
[woa_chip_name_microsoft_sq_3] =
|
||||
{L"Snapdragon (TM) 8cx Gen 3",
|
||||
woa_chip_name_microsoft_sq_3,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a78,
|
||||
2420000000,
|
||||
},
|
||||
{cpuinfo_vendor_arm, cpuinfo_uarch_cortex_x1, 3000000000}}},
|
||||
/* Microsoft Windows Dev Kit 2023 */
|
||||
[woa_chip_name_microsoft_sq_3_devkit] =
|
||||
{L"Snapdragon Compute Platform",
|
||||
woa_chip_name_microsoft_sq_3_devkit,
|
||||
{{
|
||||
cpuinfo_vendor_arm,
|
||||
cpuinfo_uarch_cortex_a78,
|
||||
2420000000,
|
||||
},
|
||||
{cpuinfo_vendor_arm, cpuinfo_uarch_cortex_x1, 3000000000}}},
|
||||
/* Ampere Altra */
|
||||
[woa_chip_name_ampere_altra] = {
|
||||
L"Ampere(R) Altra(R) Processor",
|
||||
woa_chip_name_ampere_altra,
|
||||
{{cpuinfo_vendor_arm, cpuinfo_uarch_neoverse_n1, 3000000000}}}};
|
||||
static struct woa_chip_info woa_chip_unknown = {L"Unknown", {{cpuinfo_vendor_unknown, cpuinfo_uarch_unknown, 0}}};
|
||||
|
||||
BOOL CALLBACK cpuinfo_arm_windows_init(PINIT_ONCE init_once, PVOID parameter, PVOID* context) {
|
||||
struct woa_chip_info* chip_info = NULL;
|
||||
@@ -87,23 +35,6 @@ BOOL CALLBACK cpuinfo_arm_windows_init(PINIT_ONCE init_once, PVOID parameter, PV
|
||||
return true;
|
||||
}
|
||||
|
||||
bool get_core_uarch_for_efficiency(
|
||||
enum woa_chip_name chip,
|
||||
BYTE EfficiencyClass,
|
||||
enum cpuinfo_uarch* uarch,
|
||||
uint64_t* frequency) {
|
||||
/* For currently supported WoA chips, the Efficiency class selects
|
||||
* the pre-defined little and big core.
|
||||
* Any further supported SoC's logic should be implemented here.
|
||||
*/
|
||||
if (uarch && frequency && chip < woa_chip_name_last && EfficiencyClass < MAX_WOA_VALID_EFFICIENCY_CLASSES) {
|
||||
*uarch = woa_chips[chip].uarchs[EfficiencyClass].uarch;
|
||||
*frequency = woa_chips[chip].uarchs[EfficiencyClass].frequency;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Static helper functions */
|
||||
|
||||
static wchar_t* read_registry(LPCWSTR subkey, LPCWSTR value) {
|
||||
@@ -149,40 +80,112 @@ static wchar_t* read_registry(LPCWSTR subkey, LPCWSTR value) {
|
||||
return text_buffer;
|
||||
}
|
||||
|
||||
static uint64_t read_registry_qword(LPCWSTR subkey, LPCWSTR value) {
|
||||
DWORD key_type = 0;
|
||||
DWORD data_size = sizeof(uint64_t);
|
||||
const DWORD flags = RRF_RT_REG_QWORD; /* Only read QWORD (REG_QWORD) values */
|
||||
uint64_t qword_value = 0;
|
||||
LSTATUS result = RegGetValueW(HKEY_LOCAL_MACHINE, subkey, value, flags, &key_type, &qword_value, &data_size);
|
||||
if (result != ERROR_SUCCESS || data_size != sizeof(uint64_t)) {
|
||||
cpuinfo_log_error("Registry QWORD read error");
|
||||
return 0;
|
||||
}
|
||||
return qword_value;
|
||||
}
|
||||
|
||||
static uint64_t read_registry_dword(LPCWSTR subkey, LPCWSTR value) {
|
||||
DWORD key_type = 0;
|
||||
DWORD data_size = sizeof(DWORD);
|
||||
DWORD dword_value = 0;
|
||||
LSTATUS result =
|
||||
RegGetValueW(HKEY_LOCAL_MACHINE, subkey, value, RRF_RT_REG_DWORD, &key_type, &dword_value, &data_size);
|
||||
if (result != ERROR_SUCCESS || data_size != sizeof(DWORD)) {
|
||||
cpuinfo_log_error("Registry DWORD read error");
|
||||
return 0;
|
||||
}
|
||||
return (uint64_t)dword_value;
|
||||
}
|
||||
|
||||
static wchar_t* wcsndup(const wchar_t* src, size_t n) {
|
||||
size_t len = wcsnlen(src, n);
|
||||
wchar_t* dup = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (len + 1) * sizeof(wchar_t));
|
||||
if (dup) {
|
||||
wcsncpy_s(dup, len + 1, src, len);
|
||||
dup[len] = L'\0';
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
|
||||
static struct core_info_by_chip_name get_core_info_from_midr(uint32_t midr, uint64_t frequency) {
|
||||
struct core_info_by_chip_name info;
|
||||
enum cpuinfo_vendor vendor;
|
||||
enum cpuinfo_uarch uarch;
|
||||
|
||||
#if CPUINFO_ARCH_ARM
|
||||
bool has_vfpv4 = false;
|
||||
cpuinfo_arm_decode_vendor_uarch(midr, has_vfpv4, &vendor, &uarch);
|
||||
#else
|
||||
cpuinfo_arm_decode_vendor_uarch(midr, &vendor, &uarch);
|
||||
#endif
|
||||
|
||||
info.vendor = vendor;
|
||||
info.uarch = uarch;
|
||||
info.frequency = frequency;
|
||||
return info;
|
||||
}
|
||||
|
||||
static struct woa_chip_info* get_system_info_from_registry(void) {
|
||||
wchar_t* text_buffer = NULL;
|
||||
LPCWSTR cpu0_subkey = L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0";
|
||||
LPCWSTR chip_name_value = L"ProcessorNameString";
|
||||
LPCWSTR chip_midr_value = L"CP 4000";
|
||||
LPCWSTR chip_mhz_value = L"~MHz";
|
||||
struct woa_chip_info* chip_info = NULL;
|
||||
|
||||
HANDLE heap = GetProcessHeap();
|
||||
|
||||
/* Read processor model name from registry and find in the hard-coded
|
||||
* list. */
|
||||
text_buffer = read_registry(cpu0_subkey, chip_name_value);
|
||||
if (text_buffer == NULL) {
|
||||
cpuinfo_log_error("Registry read error");
|
||||
cpuinfo_log_error("Registry read error for processor name");
|
||||
return NULL;
|
||||
}
|
||||
for (uint32_t i = 0; i < (uint32_t)woa_chip_name_last; i++) {
|
||||
size_t compare_length = wcsnlen(woa_chips[i].chip_name_string, CPUINFO_PACKAGE_NAME_MAX);
|
||||
int compare_result = wcsncmp(text_buffer, woa_chips[i].chip_name_string, compare_length);
|
||||
if (compare_result == 0) {
|
||||
chip_info = woa_chips + i;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* https://developer.arm.com/documentation/100442/0100/register-descriptions/aarch32-system-registers/midr--main-id-register
|
||||
* Regedit for MIDR :
|
||||
*HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0\CP 4000
|
||||
*/
|
||||
uint64_t midr_qword = (uint32_t)read_registry_qword(cpu0_subkey, chip_midr_value);
|
||||
if (midr_qword == 0) {
|
||||
cpuinfo_log_error("Registry read error for MIDR value");
|
||||
return NULL;
|
||||
}
|
||||
// MIDR is only 32 bits, so we need to cast it to uint32_t
|
||||
uint32_t midr_value = (uint32_t)midr_qword;
|
||||
|
||||
/* Read the frequency from the registry
|
||||
* The value is in MHz, so we need to convert it to Hz */
|
||||
uint64_t frequency_mhz = read_registry_dword(cpu0_subkey, chip_mhz_value);
|
||||
if (frequency_mhz == 0) {
|
||||
cpuinfo_log_error("Registry read error for frequency value");
|
||||
return NULL;
|
||||
}
|
||||
// Convert MHz to Hz
|
||||
uint64_t frequency_hz = frequency_mhz * 1000000;
|
||||
|
||||
// Allocate chip_info before using it.
|
||||
chip_info = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct woa_chip_info));
|
||||
if (chip_info == NULL) {
|
||||
/* No match was found, so print a warning and assign the unknown
|
||||
* case. */
|
||||
cpuinfo_log_error(
|
||||
"Unknown chip model name '%ls'.\nPlease add new Windows on Arm SoC/chip support to arm/windows/init.c!",
|
||||
text_buffer);
|
||||
} else {
|
||||
cpuinfo_log_debug("detected chip model name: %s", chip_info->chip_name_string);
|
||||
cpuinfo_log_error("Heap allocation error for chip_info");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HeapFree(heap, 0, text_buffer);
|
||||
// set chip_info fields
|
||||
chip_info->chip_name_string = wcsndup(text_buffer, CPUINFO_PACKAGE_NAME_MAX - 1);
|
||||
chip_info->uarchs[0] = get_core_info_from_midr(midr_value, frequency_hz);
|
||||
|
||||
cpuinfo_log_debug("detected chip model name: %ls", chip_info->chip_name_string);
|
||||
|
||||
return chip_info;
|
||||
}
|
||||
|
||||
@@ -216,4 +219,4 @@ static void set_cpuinfo_isa_fields(void) {
|
||||
cpuinfo_isa.pmull = crypto;
|
||||
|
||||
cpuinfo_isa.crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) != 0;
|
||||
}
|
||||
}
|
||||
@@ -3,17 +3,6 @@
|
||||
/* Efficiency class = 0 means little core, while 1 means big core for now. */
|
||||
#define MAX_WOA_VALID_EFFICIENCY_CLASSES 2
|
||||
|
||||
/* List of known and supported Windows on Arm SoCs/chips. */
|
||||
enum woa_chip_name {
|
||||
woa_chip_name_microsoft_sq_1 = 0,
|
||||
woa_chip_name_microsoft_sq_2 = 1,
|
||||
woa_chip_name_microsoft_sq_3 = 2,
|
||||
woa_chip_name_microsoft_sq_3_devkit = 3,
|
||||
woa_chip_name_ampere_altra = 4,
|
||||
woa_chip_name_unknown = 5,
|
||||
woa_chip_name_last = woa_chip_name_unknown
|
||||
};
|
||||
|
||||
/* Topology information hard-coded by SoC/chip name */
|
||||
struct core_info_by_chip_name {
|
||||
enum cpuinfo_vendor vendor;
|
||||
@@ -26,14 +15,7 @@ struct core_info_by_chip_name {
|
||||
*/
|
||||
struct woa_chip_info {
|
||||
wchar_t* chip_name_string;
|
||||
enum woa_chip_name chip_name;
|
||||
struct core_info_by_chip_name uarchs[MAX_WOA_VALID_EFFICIENCY_CLASSES];
|
||||
};
|
||||
|
||||
bool get_core_uarch_for_efficiency(
|
||||
enum woa_chip_name chip,
|
||||
BYTE EfficiencyClass,
|
||||
enum cpuinfo_uarch* uarch,
|
||||
uint64_t* frequency);
|
||||
|
||||
bool cpu_info_init_by_logical_sys_info(const struct woa_chip_info* chip_info, enum cpuinfo_vendor vendor);
|
||||
|
||||
11
3rdparty/cpuinfo/src/x86/isa.c
vendored
11
3rdparty/cpuinfo/src/x86/isa.c
vendored
@@ -46,6 +46,8 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
|
||||
(max_base_index >= 7) ? cpuidex(7, 0) : (struct cpuid_regs){0, 0, 0, 0};
|
||||
const struct cpuid_regs structured_feature_info1 =
|
||||
(max_base_index >= 7) ? cpuidex(7, 1) : (struct cpuid_regs){0, 0, 0, 0};
|
||||
const struct cpuid_regs structured_feature_info2 =
|
||||
(max_base_index >= 7) ? cpuidex(0x24, 0) : (struct cpuid_regs){0, 0, 0, 0};
|
||||
|
||||
const uint32_t processor_capacity_info_index = UINT32_C(0x80000008);
|
||||
const struct cpuid_regs processor_capacity_info = (max_extended_index >= processor_capacity_info_index)
|
||||
@@ -430,10 +432,17 @@ struct cpuinfo_x86_isa cpuinfo_x86_detect_isa(
|
||||
isa.avx512f = avx512_regs && !!(structured_feature_info0.ebx & UINT32_C(0x00010000));
|
||||
|
||||
/*
|
||||
* AVX 10.1 instructions:
|
||||
* AVX 10.1 instructions: avx 10 isa supported.
|
||||
* - Intel: edx[bit 19] in structured feature info (ecx = 1).
|
||||
*/
|
||||
isa.avx10_1 = avx512_regs && !!(structured_feature_info1.edx & UINT32_C(0x00080000));
|
||||
|
||||
/*
|
||||
* AVX 10.2 instructions: avx 10 version information.
|
||||
* - Intel: ebx[bits 0-7] in structured features info (eax = 24 ecx = 0).
|
||||
*/
|
||||
isa.avx10_2 = ((structured_feature_info2.ebx & UINT32_C(0x000000FF)) >= 2) && isa.avx10_1;
|
||||
|
||||
/*
|
||||
* AVX512PF instructions:
|
||||
* - Intel: ebx[bit 26] in structured feature info (ecx = 0).
|
||||
|
||||
5
3rdparty/cpuinfo/src/x86/linux/cpuinfo.c
vendored
5
3rdparty/cpuinfo/src/x86/linux/cpuinfo.c
vendored
@@ -83,8 +83,9 @@ struct proc_cpuinfo_parser_state {
|
||||
static bool parse_line(
|
||||
const char* line_start,
|
||||
const char* line_end,
|
||||
struct proc_cpuinfo_parser_state state[restrict static 1],
|
||||
void* context,
|
||||
uint64_t line_number) {
|
||||
struct proc_cpuinfo_parser_state* restrict state = context;
|
||||
/* Empty line. Skip. */
|
||||
if (line_start == line_end) {
|
||||
return true;
|
||||
@@ -215,5 +216,5 @@ bool cpuinfo_x86_linux_parse_proc_cpuinfo(
|
||||
.processors = processors,
|
||||
};
|
||||
return cpuinfo_linux_parse_multiline_file(
|
||||
"/proc/cpuinfo", BUFFER_SIZE, (cpuinfo_line_callback)parse_line, &state);
|
||||
"/proc/cpuinfo", BUFFER_SIZE, parse_line, &state);
|
||||
}
|
||||
|
||||
@@ -1654,7 +1654,7 @@ SCAJ-20076:
|
||||
name: "Armored Core - Nexus [Disc 1]"
|
||||
region: "NTSC-Unk"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SCAJ-20076"
|
||||
@@ -1667,7 +1667,7 @@ SCAJ-20077:
|
||||
name: "Armored Core - Nexus [Disc 2]"
|
||||
region: "NTSC-Unk"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SCAJ-20076"
|
||||
@@ -1826,7 +1826,7 @@ SCAJ-20105:
|
||||
name: "Armored Core - Nine Breaker"
|
||||
region: "NTSC-Unk"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
cpuSpriteRenderBW: 2 # Fixes broken water on "Upper Sea" level.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
@@ -1941,9 +1941,7 @@ SCAJ-20121:
|
||||
name: "Armored Core - Formula Front"
|
||||
region: "NTSC-Unk"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 1 # Fixes broken shadow caused by HPO 1.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
SCAJ-20122:
|
||||
name: "Swords of Destiny"
|
||||
region: "NTSC-Unk"
|
||||
@@ -2266,9 +2264,9 @@ SCAJ-20167:
|
||||
preloadFrameData: 1 # Fixes some missing effects.
|
||||
SCAJ-20168:
|
||||
name: "Rule of Rose"
|
||||
region: "NTSC-Unk"
|
||||
gsHWFixes:
|
||||
preloadFrameData: 1 # Fixes Black FMV's.
|
||||
region: "NTSC-C"
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes black FMVs in hardware and hash cache disabling itself.
|
||||
SCAJ-20169:
|
||||
name: "Dirge of Cerberus - Final Fantasy VII"
|
||||
region: "NTSC-Unk"
|
||||
@@ -6514,7 +6512,12 @@ SCES-54941:
|
||||
region: "PAL-E"
|
||||
SCES-55019:
|
||||
name: "Ratchet & Clank - Size Matters"
|
||||
region: "PAL-M5"
|
||||
region: "PAL-M13"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 4 # Fixes vendor and other bloom.
|
||||
autoFlush: 2 # Fixes missing bloom and shadow definition.
|
||||
halfPixelOffset: 5 # Fixes misaligned bloom.
|
||||
nativeScaling: 2 # Fixes pixelated bloom.
|
||||
SCES-55038:
|
||||
name: "EyeToy Play - Hero"
|
||||
region: "PAL-M15"
|
||||
@@ -7203,7 +7206,7 @@ SCKA-20047:
|
||||
name: "Armored Core - Nine Breaker"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
cpuSpriteRenderBW: 2 # Fixes broken water on "Upper Sea" level.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
@@ -7653,6 +7656,8 @@ SCKA-20120:
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 4 # Fixes vendor and other bloom.
|
||||
autoFlush: 2 # Fixes missing bloom and shadow definition.
|
||||
halfPixelOffset: 5 # Fixes misaligned bloom.
|
||||
nativeScaling: 2 # Fixes pixelated bloom.
|
||||
SCKA-20124:
|
||||
name: "Piposarugetchu 3" # Ape Escape 3
|
||||
region: "NTSC-K"
|
||||
@@ -8891,8 +8896,8 @@ SCPS-15093:
|
||||
name-en: "Rule of Rose"
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
preloadFrameData: 1 # Fixes Black FMV's.
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes black FMVs in hardware and hash cache disabling itself.
|
||||
SCPS-15094:
|
||||
name: "アイトーイ プレイ2 [ソフト単体]"
|
||||
name-sort: "あいとーい ぷれい2 [そふとたんたい]"
|
||||
@@ -12436,6 +12441,8 @@ SCUS-97615:
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 4 # Fixes vendor and other bloom.
|
||||
autoFlush: 2 # Fixes missing bloom and shadow definition.
|
||||
halfPixelOffset: 5 # Fixes misaligned bloom.
|
||||
nativeScaling: 2 # Fixes pixelated bloom.
|
||||
SCUS-97616:
|
||||
name: "SingStar '80s"
|
||||
region: "NTSC-U"
|
||||
@@ -17530,6 +17537,8 @@ SLES-51619:
|
||||
name: "Clock Tower 3"
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes brightness and striped lines in FMVs.
|
||||
SLES-51620:
|
||||
name: "Black and Bruised"
|
||||
region: "PAL-M5"
|
||||
@@ -23409,7 +23418,7 @@ SLES-53702:
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes blurriness.
|
||||
halfPixelOffset: 5 # Fixes blurriness.
|
||||
SLES-53703:
|
||||
name: "Peter Jackson's King Kong - The Official Game of the Movie"
|
||||
name-sort: "King Kong, Peter Jackson's - The Official Game of the Movie"
|
||||
@@ -23643,7 +23652,7 @@ SLES-53756:
|
||||
name: "Resident Evil 4"
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes blurriness.
|
||||
halfPixelOffset: 5 # Fixes blurriness.
|
||||
SLES-53758:
|
||||
name: "Sniper Elite [Pre-Production]"
|
||||
region: "PAL-E"
|
||||
@@ -23809,7 +23818,7 @@ SLES-53819:
|
||||
name: "Armored Core - Nine Breaker"
|
||||
region: "PAL-E"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
cpuSpriteRenderBW: 2 # Fixes broken water on "Upper Sea" level.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
@@ -24951,8 +24960,8 @@ SLES-54217:
|
||||
SLES-54218:
|
||||
name: "Rule of Rose"
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
preloadFrameData: 1 # Fixes Black FMV's.
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes black FMVs in hardware and hash cache disabling itself.
|
||||
SLES-54221:
|
||||
name: "LEGO Star Wars II - The Original Trilogy"
|
||||
region: "PAL-M6"
|
||||
@@ -27630,6 +27639,8 @@ SLES-55019:
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 4 # Fixes vendor and other bloom.
|
||||
autoFlush: 2 # Fixes missing bloom and shadow definition.
|
||||
halfPixelOffset: 5 # Fixes misaligned bloom.
|
||||
nativeScaling: 2 # Fixes pixelated bloom.
|
||||
SLES-55020:
|
||||
name: "Die Simpsons - Das Spiel"
|
||||
region: "PAL-G"
|
||||
@@ -29509,7 +29520,7 @@ SLES-82036:
|
||||
name: "Armored Core - Nexus [Disc 1]"
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SLES-82036"
|
||||
@@ -29518,7 +29529,7 @@ SLES-82037:
|
||||
name: "Armored Core - Nexus [Disc 2]"
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SLES-82036"
|
||||
@@ -30027,6 +30038,8 @@ SLKA-25051:
|
||||
name: "Clock Tower 3"
|
||||
region: "NTSC-K"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes brightness and striped lines in FMVs.
|
||||
SLKA-25052:
|
||||
name: "Air Ranger 2 - Rescue Helicopter"
|
||||
region: "NTSC-K"
|
||||
@@ -30598,7 +30611,7 @@ SLKA-25201:
|
||||
name: "Armored Core - Nexus [Disc 1]"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SLKA-25201"
|
||||
@@ -30607,7 +30620,7 @@ SLKA-25202:
|
||||
name: "Armored Core - Nexus [Disc 2]"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SLKA-25201"
|
||||
@@ -30925,9 +30938,7 @@ SLKA-25270:
|
||||
name: "Armored Core - Formula Front"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 1 # Fixes broken shadow caused by HPO 1.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
SLKA-25271:
|
||||
name: "Harry Potter and the Order of the Phoenix"
|
||||
region: "NTSC-K"
|
||||
@@ -31588,7 +31599,7 @@ SLKA-25410:
|
||||
gameFixes:
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes blurriness.
|
||||
halfPixelOffset: 5 # Fixes blurriness.
|
||||
SLKA-25411:
|
||||
name: "Need for Speed - ProStreet"
|
||||
region: "NTSC-K"
|
||||
@@ -40421,6 +40432,8 @@ SLPM-65221:
|
||||
name-en: "Clock Tower 3"
|
||||
region: "NTSC-J"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes brightness and striped lines in FMVs.
|
||||
SLPM-65222:
|
||||
name: "遊戯王真デュエルモンスターズⅡ 継承されし記憶 [コナミ殿堂セレクション]"
|
||||
name-sort: "ゆうぎおうしんでゅえるもんすたーず2 けいしょうされしきおく [こなみでんどうせれくしょん]"
|
||||
@@ -52306,6 +52319,8 @@ SLPM-74416:
|
||||
name-sort: "くろっくたわー3 [PlayStation2 the Best]"
|
||||
name-en: "Clock Tower 3 [PlayStation2 the Best]"
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes brightness and striped lines in FMVs.
|
||||
SLPM-74420:
|
||||
name: "頭文字D Special Stage [PlayStation2 the Best]"
|
||||
name-sort: "いにしゃるD すぺしゃる すてーじ [PlayStation2 the Best]"
|
||||
@@ -56797,7 +56812,7 @@ SLPS-25338:
|
||||
name-en: "Armored Core - Nexus [Disc 1]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SCAJ-20076"
|
||||
@@ -56812,7 +56827,7 @@ SLPS-25339:
|
||||
name-en: "Armored Core - Nexus [Disc 2]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SCAJ-20076"
|
||||
@@ -57265,7 +57280,7 @@ SLPS-25408:
|
||||
name-en: "Armored Core - Nine Breaker"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
cpuSpriteRenderBW: 2 # Fixes broken water on "Upper Sea" level.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
@@ -57590,9 +57605,7 @@ SLPS-25461:
|
||||
name-en: "Armored Core - Formula Front"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
cpuSpriteRenderBW: 1 # Fixes broken shadow caused by HPO 1.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
SLPS-25462:
|
||||
name: "アーマード・コア ラストレイヴン"
|
||||
name-sort: "あーまーどこあ らすとれいゔん"
|
||||
@@ -60857,7 +60870,7 @@ SLPS-73202:
|
||||
name-en: "Armored Core - Nexus [Disc 1] [PlayStation2 the Best]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SCAJ-20076"
|
||||
@@ -60872,7 +60885,7 @@ SLPS-73203:
|
||||
name-en: "Armored Core - Nexus [Disc 2] [PlayStation2 the Best]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SCAJ-20076"
|
||||
@@ -64590,6 +64603,8 @@ SLUS-20633:
|
||||
name: "Clock Tower 3"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes brightness and striped lines in FMVs.
|
||||
SLUS-20634:
|
||||
name: "Summer Heat Beach Volleyball"
|
||||
region: "NTSC-U"
|
||||
@@ -66576,7 +66591,7 @@ SLUS-20986:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SLUS-20986"
|
||||
@@ -67150,7 +67165,7 @@ SLUS-21079:
|
||||
name: "Armored Core - Nexus [Disc 2]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
memcardFilters:
|
||||
- "SLUS-20986"
|
||||
@@ -67457,7 +67472,7 @@ SLUS-21134:
|
||||
gameFixes:
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes blurriness.
|
||||
halfPixelOffset: 5 # Fixes blurriness.
|
||||
SLUS-21135:
|
||||
name: "MVP Baseball 2005"
|
||||
region: "NTSC-U"
|
||||
@@ -67828,7 +67843,7 @@ SLUS-21200:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Fixes misaligned blur.
|
||||
halfPixelOffset: 5 # Fixes misaligned blur.
|
||||
recommendedBlendingLevel: 3 # Fixes level brightness.
|
||||
cpuSpriteRenderBW: 2 # Fixes broken water on "Upper Sea" level.
|
||||
cpuSpriteRenderLevel: 2 # Needed for above.
|
||||
@@ -69580,8 +69595,8 @@ SLUS-21448:
|
||||
name: "Rule of Rose"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
preloadFrameData: 1 # Fixes Black FMV's.
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes black FMVs in hardware and hash cache disabling itself.
|
||||
SLUS-21449:
|
||||
name: "The Fast and the Furious"
|
||||
name-sort: "Fast and the Furious, The"
|
||||
@@ -72352,8 +72367,8 @@ SLUS-28062:
|
||||
SLUS-28063:
|
||||
name: "Rule of Rose [Trade Demo]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
preloadFrameData: 1 # Fixes Black FMV's.
|
||||
gameFixes:
|
||||
- SoftwareRendererFMVHack # Fixes black FMVs in hardware and hash cache disabling itself.
|
||||
SLUS-28064:
|
||||
name: "Shin Megami Tensei - Devil Summoner [Trade Demo]"
|
||||
region: "NTSC-U"
|
||||
@@ -73016,7 +73031,7 @@ SLUS-29169:
|
||||
gameFixes:
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes blurriness.
|
||||
halfPixelOffset: 5 # Fixes blurriness.
|
||||
SLUS-29170:
|
||||
name: "Total Overdose - A Gunslinger's Tale in Mexico [Demo]"
|
||||
region: "NTSC-U"
|
||||
|
||||
@@ -193,6 +193,7 @@
|
||||
030000007d0400000640000000000000,Eliminator AfterShock,a:b1,b:b2,back:b9,dpdown:+a3,dpleft:-a5,dpright:+a5,dpup:-a3,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a4,righty:a2,start:b8,x:b0,y:b3,platform:Windows,
|
||||
03000000120c0000f61c000000000000,Elite,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000430b00000300000000000000,EMS Production PS2 Adapter,a:b2,b:b1,back:b8,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
|
||||
03000000062000001801000000000000,EMS TrioLinker Plus II,a:b0,b:b1,x:b2,y:b3,back:b9,start:b8,leftshoulder:b6,rightshoulder:b7,leftstick:b10,rightstick:b11,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5,platform:Windows,
|
||||
03000000242f000000b7000000000000,ESM 9110,a:b0,b:b1,back:b7,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b5,rightx:a2,righty:a3,start:b6,x:b2,y:b3,platform:Windows,
|
||||
03000000101c0000181c000000000000,Essential,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b4,leftx:a1,lefty:a0,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
|
||||
030000008f0e00000f31000000000000,EXEQ,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:b3,y:b2,platform:Windows,
|
||||
@@ -610,6 +611,7 @@
|
||||
03000000921200004547000000000000,Retro Bit Sega Genesis Controller Adapter,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b6,x:b3,y:b4,platform:Windows,
|
||||
03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000830500006020000000000000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000632500007805000000000000,Retro Fighters Controller,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:Windows,
|
||||
0300000003040000c197000000000000,Retrode Adapter,a:b0,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
|
||||
03000000bd12000013d0000000000000,Retrolink Sega Saturn Classic Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows,
|
||||
03000000bd12000015d0000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,
|
||||
@@ -757,8 +759,8 @@
|
||||
03000000ff1100004133000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
|
||||
03000000632500002305000000000000,USB Vibration 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:Windows,
|
||||
03000000882800000305000000000000,V5 Game Pad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,x:b2,y:b3,platform:Windows,
|
||||
03000000790000001a18000000000000,Venom,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000001a18000000000000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000790000001b18000000000000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
|
||||
030000006f0e00000302000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
030000006f0e00000702000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:a3,righty:a4,start:b4,x:b2,y:b3,platform:Windows,
|
||||
@@ -1288,7 +1290,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000451300000010000010010000,Genius Maxfire Grandias 12,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,
|
||||
190000004b4800000010000000010000,GO-Advance Controller,a:b1,b:b0,back:b10,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,leftshoulder:b4,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b13,start:b15,x:b2,y:b3,platform:Linux,
|
||||
190000004b4800000010000001010000,GO-Advance Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b4,leftstick:b13,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b16,righttrigger:b15,start:b17,x:b2,y:b3,platform:Linux,
|
||||
190000004b4800000011000000010000,GO-Super Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b2,y:b3,platform:Linux,
|
||||
190000004b4800000011000000010000,GO-Super Gamepad,a:b0,b:b1,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b3,y:b2,platform:Linux,
|
||||
03000000f0250000c183000010010000,Goodbetterbest Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000d11800000094000011010000,Google Stadia 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:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
|
||||
05000000d11800000094000000010000,Google Stadia 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:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
|
||||
@@ -1425,6 +1427,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000005e040000d102000003020000,Microsoft Xbox One,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,
|
||||
030000005e040000dd02000003020000,Microsoft Xbox One,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,
|
||||
030000005e040000ea02000008040000,Microsoft Xbox One,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,
|
||||
030000005e040000ea0200000f050000,Microsoft Xbox One,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,
|
||||
060000005e040000120b000009050000,Microsoft Xbox One,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,
|
||||
030000005e040000e302000003020000,Microsoft Xbox One Elite,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,
|
||||
030000005e040000000b000007040000,Microsoft Xbox One Elite 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,paddle1:b12,paddle2:b14,paddle3:b13,paddle4:b15,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
@@ -1432,7 +1435,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
050000005e040000050b000003090000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b17,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a6,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
|
||||
050000005e0400008e02000030110000,Microsoft Xbox One Elite 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,paddle1:b11,paddle2:b13,paddle3:b12,paddle4:b14,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000120b00000b050000,Microsoft 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,
|
||||
060000005e040000120b000001050000,Microsoft 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,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000005e040000120b000016050000,Microsoft 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,
|
||||
030000005e040000120b000017050000,Microsoft 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,
|
||||
060000005e040000120b000001050000,Microsoft 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,
|
||||
03000000030000000300000002000000,Miroof,a:b1,b:b0,back:b6,leftshoulder:b4,leftx:a0,lefty:a1,rightshoulder:b5,start:b7,x:b3,y:b2,platform:Linux,
|
||||
03000000790000001c18000010010000,Mobapad Chitu HD,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,
|
||||
050000004d4f435554452d3035335800,Mocute 053X,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,
|
||||
@@ -1450,6 +1455,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000006b1400000906000014010000,Nacon Asymmetric Wireless PS4 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,
|
||||
030000006b140000010c000010010000,Nacon GC 400ES,a:b0,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:b2,y:b3,platform:Linux,
|
||||
03000000853200000706000012010000,Nacon GC-100,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,
|
||||
05000000853200000503000000010000,Nacon MG-X Pro,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,
|
||||
0300000085320000170d000011010000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
0300000085320000190d000011010000,Nacon Revolution 5 Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000000d0f00000900000010010000,Natec Genesis P44,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
@@ -1494,7 +1500,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000006f0e0000b802000001010000,PDP Afterglow Xbox One 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,
|
||||
030000006f0e0000b802000013020000,PDP Afterglow Xbox One 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,
|
||||
030000006f0e00006401000001010000,PDP Battlefield One,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,
|
||||
030000006f0e0000d702000006640000,PDP Black Camo Wired Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:b13,dpleft:b14,dpright:b13,dpup:b14,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,
|
||||
030000006f0e0000d702000006640000,PDP Black Camo Wired Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:b13,dpleft:b14,dpright:b13,dpup:b14,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,
|
||||
030000006f0e00003101000000010000,PDP EA Sports 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,
|
||||
030000006f0e00008501000011010000,PDP Fightpad Pro Gamecube Controller,a:b1,b:b0,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e0000c802000012010000,PDP Kingdom Hearts Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
@@ -1509,7 +1515,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000006f0e0000ef02000007640000,PDP Xbox Series Kinetic Wired 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,
|
||||
03000000c62400000053000000010000,PowerA,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,
|
||||
03000000c62400003a54000001010000,PowerA 1428124-01,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,
|
||||
03000000d62000000540000001010000,PowerA Advantage 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,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d62000000540000001010000,PowerA Advantage 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,
|
||||
03000000d620000011a7000011010000,PowerA Core Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000dd62000015a7000011010000,PowerA Fusion Nintendo Switch Arcade Stick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000d620000012a7000011010000,PowerA Fusion Nintendo Switch Fight Pad,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
@@ -1524,9 +1530,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000d62000000228000001010000,PowerA Xbox One 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,
|
||||
03000000c62400001a54000001010000,PowerA Xbox One Mini 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,
|
||||
03000000d62000000240000001010000,PowerA Xbox One Spectra Infinity,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:Linux,
|
||||
03000000d62000000520000050010000,PowerA 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,
|
||||
03000000d62000000b20000001010000,PowerA 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,
|
||||
03000000d62000000f20000001010000,PowerA Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b7,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,
|
||||
03000000d62000000520000050010000,PowerA 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,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
03000000d62000000b20000001010000,PowerA 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,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006d040000d2ca000011010000,Precision Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000250900000017000010010000,PS/SS/N64 Adapter,a:b1,b:b2,dpdown:b14,dpleft:b15,dpright:b13,dpup:b12,leftshoulder:b5,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,rightx:a2~,righty:a3,start:b8,platform:Linux,
|
||||
03000000ff1100004133000010010000,PS2 Controller,a:b2,b:b1,back:b8,leftshoulder:b6,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b5,start:b9,x:b3,y:b0,platform:Linux,
|
||||
@@ -1584,6 +1590,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
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,
|
||||
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,
|
||||
03000000f8270000bf0b000011010000,Razer Kishi,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,
|
||||
030000008916000001fd000024010000,Razer Onza Classic Edition,a:b0,b:b1,back:b6,dpdown:b14,dpleft:b11,dpright:b12,dpup:b13,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,
|
||||
03000000321500000204000011010000,Razer Panthera PS3,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
@@ -1718,6 +1725,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000790000000600000007010000,USB 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:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux,
|
||||
03000000790000001100000000010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,platform:Linux,
|
||||
03000000790000001a18000011010000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000790000001b18000011010000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00000302000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
030000006f0e00000702000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
|
||||
05000000ac0500003232000001000000,VR Box Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,
|
||||
@@ -1759,6 +1768,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000005e040000120b000009050000,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,
|
||||
030000005e040000120b00000d050000,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,
|
||||
030000005e040000120b00000f050000,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,
|
||||
030000005e040000120b000011050000,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,
|
||||
030000005e040000120b000014050000,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,
|
||||
030000005e040000120b000015050000,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,
|
||||
030000005e040000130b000005050000,Xbox Series 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,
|
||||
050000005e040000130b000001050000,Xbox Series 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,
|
||||
@@ -1768,13 +1779,11 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
050000005e040000130b000011050000,Xbox Series 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,
|
||||
050000005e040000130b000013050000,Xbox Series 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,
|
||||
050000005e040000130b000015050000,Xbox Series 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,
|
||||
050000005e040000130b000017050000,Xbox Series 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,
|
||||
060000005e040000120b000007050000,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,
|
||||
060000005e040000120b00000b050000,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,
|
||||
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,
|
||||
030000005e040000120b000011050000,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,
|
||||
030000005e040000120b000014050000,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,
|
||||
050000005e040000130b000017050000,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,
|
||||
060000005e040000120b00000d050000,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,
|
||||
050000005e040000220b000017050000,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,
|
||||
|
||||
@@ -852,6 +852,8 @@ void ps_color_clamp_wrap(inout float3 C)
|
||||
else if (PS_COLCLIP == 1 || PS_HDR == 1)
|
||||
C = (float3)((int3)C & (int3)0xFF);
|
||||
}
|
||||
else if (PS_DST_FMT == FMT_16 && PS_DITHER != 3 && PS_BLEND_MIX == 0 && PS_BLEND_HW == 0)
|
||||
C = (float3)((int3)C & (int3)0xF8);
|
||||
}
|
||||
|
||||
void ps_blend(inout float4 Color, inout float4 As_rgba, float2 pos_xy)
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
#define SW_AD_TO_HW (PS_BLEND_C == 1 && PS_A_MASKED)
|
||||
#define PS_PRIMID_INIT (PS_DATE == 1 || PS_DATE == 2)
|
||||
#define NEEDS_RT_EARLY (PS_TEX_IS_FB == 1 || PS_DATE >= 5)
|
||||
#define NEEDS_RT (NEEDS_RT_EARLY || (!PS_PRIMID_INIT && (PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW)))
|
||||
#define NEEDS_RT_FOR_AFAIL (PS_AFAIL == 3 && PS_NO_COLOR1)
|
||||
#define NEEDS_RT (NEEDS_RT_EARLY || NEEDS_RT_FOR_AFAIL || (!PS_PRIMID_INIT && (PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW)))
|
||||
#define NEEDS_TEX (PS_TFX != 4)
|
||||
|
||||
layout(std140, binding = 0) uniform cb21
|
||||
@@ -774,6 +775,8 @@ void ps_color_clamp_wrap(inout vec3 C)
|
||||
C = vec3(ivec3(C) & ivec3(0xFF));
|
||||
#endif
|
||||
|
||||
#elif PS_DST_FMT == FMT_16 && PS_DITHER != 3 && PS_BLEND_MIX == 0 && PS_BLEND_HW == 0
|
||||
C = vec3(ivec3(C) & ivec3(0xF8));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1114,7 +1117,7 @@ void ps_main()
|
||||
|
||||
ps_fbmask(C);
|
||||
|
||||
#if PS_AFAIL == 3 // RGB_ONLY
|
||||
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY
|
||||
// Use alpha blend factor to determine whether to update A.
|
||||
alpha_blend.a = float(atst_pass);
|
||||
#endif
|
||||
@@ -1130,6 +1133,10 @@ void ps_main()
|
||||
#else
|
||||
SV_Target0.rgb = C.rgb / 255.0f;
|
||||
#endif
|
||||
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY, no dual src blend
|
||||
if (!atst_pass)
|
||||
SV_Target0.a = sample_from_rt().a;
|
||||
#endif
|
||||
#if !PS_NO_COLOR1
|
||||
SV_Target1 = alpha_blend;
|
||||
#endif
|
||||
|
||||
@@ -299,8 +299,9 @@ void main()
|
||||
#define SW_BLEND (PS_BLEND_A || PS_BLEND_B || PS_BLEND_D)
|
||||
#define SW_BLEND_NEEDS_RT (SW_BLEND && (PS_BLEND_A == 1 || PS_BLEND_B == 1 || PS_BLEND_C == 1 || PS_BLEND_D == 1))
|
||||
#define SW_AD_TO_HW (PS_BLEND_C == 1 && PS_A_MASKED)
|
||||
#define AFAIL_NEEDS_RT (PS_AFAIL == 3 && PS_NO_COLOR1)
|
||||
|
||||
#define PS_FEEDBACK_LOOP_IS_NEEDED (PS_TEX_IS_FB == 1 || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
|
||||
#define PS_FEEDBACK_LOOP_IS_NEEDED (PS_TEX_IS_FB == 1 || AFAIL_NEEDS_RT || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
|
||||
|
||||
#define NEEDS_TEX (PS_TFX != 4)
|
||||
|
||||
@@ -1044,6 +1045,8 @@ void ps_color_clamp_wrap(inout vec3 C)
|
||||
C = vec3(ivec3(C) & ivec3(0xFF));
|
||||
#endif
|
||||
|
||||
#elif PS_DST_FMT == FMT_16 && PS_DITHER != 3 && PS_BLEND_MIX == 0 && PS_BLEND_HW == 0
|
||||
C = vec3(ivec3(C) & ivec3(0xF8));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1381,7 +1384,7 @@ void main()
|
||||
|
||||
ps_fbmask(C);
|
||||
|
||||
#if PS_AFAIL == 3 // RGB_ONLY
|
||||
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY
|
||||
// Use alpha blend factor to determine whether to update A.
|
||||
alpha_blend.a = float(atst_pass);
|
||||
#endif
|
||||
@@ -1400,6 +1403,10 @@ void main()
|
||||
#if !PS_NO_COLOR1
|
||||
o_col1 = alpha_blend;
|
||||
#endif
|
||||
#if PS_AFAIL == 3 && PS_NO_COLOR1 // RGB_ONLY, no dual src blend
|
||||
if (!atst_pass)
|
||||
o_col0.a = sample_from_rt().a;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PS_ZCLAMP
|
||||
|
||||
@@ -19,6 +19,8 @@ namespace CocoaTools
|
||||
void AddThemeChangeHandler(void* ctx, void(handler)(void* ctx));
|
||||
/// Remove a handler previously added using AddThemeChangeHandler with the given context
|
||||
void RemoveThemeChangeHandler(void* ctx);
|
||||
/// Mark an NSMenu as the help menu
|
||||
void MarkHelpMenu(void* menu);
|
||||
/// Returns the bundle path.
|
||||
std::optional<std::string> GetBundlePath();
|
||||
/// Get the bundle path to the actual application without any translocation fun
|
||||
|
||||
@@ -143,6 +143,11 @@ void CocoaTools::RemoveThemeChangeHandler(void* ctx)
|
||||
[s_themeChangeHandler removeCallback:ctx];
|
||||
}
|
||||
|
||||
void CocoaTools::MarkHelpMenu(void* menu)
|
||||
{
|
||||
[NSApp setHelpMenu:(__bridge NSMenu*)menu];
|
||||
}
|
||||
|
||||
// MARK: - Sound playback
|
||||
|
||||
bool Common::PlaySoundAsync(const char* path)
|
||||
|
||||
@@ -59,23 +59,37 @@
|
||||
<Delete Files="@(ResFiles->'$(QtToolOutDir)qrc_%(Filename).cpp')" />
|
||||
</Target>
|
||||
|
||||
<!--Passes all .ui files to uic and puts output in the build directory-->
|
||||
<ItemGroup>
|
||||
<UiFiles Include="$(MSBuildProjectDirectory)\**\*.ui" />
|
||||
</ItemGroup>
|
||||
<!--Passes .ui files to uic and puts output in the build directory-->
|
||||
<!--We need to create tlogs so that VS knows the ui files are used-->
|
||||
<!--See https://learn.microsoft.com/en-us/visualstudio/extensibility/visual-cpp-project-extensibility?view=vs-2022#tlog-files-->
|
||||
<Target Name="QtUi"
|
||||
BeforeTargets="ClCompile"
|
||||
Inputs="@(UiFiles)"
|
||||
Condition="'@(QtUi)'!=''"
|
||||
Outputs="@(UiFiles->'$(QtToolOutDir)ui_%(Filename).h')">
|
||||
<Message Text="uic %(UiFiles.Filename)" Importance="High" />
|
||||
Condition="'@(QtUi)'!=''">
|
||||
<Error Condition="!$(QtDirValid)" Text="Qt directory non-existent (download/extract the zip)" />
|
||||
<MakeDir Directories="$(QtToolOutDir)" />
|
||||
<Exec Command=""$(QtHostBinDir)uic.exe" "%(UiFiles.FullPath)" -o "$(QtToolOutDir)ui_%(UiFiles.Filename).h"" />
|
||||
</Target>
|
||||
<!--Setup metadata for following tasks-->
|
||||
<ItemGroup>
|
||||
<QtUi>
|
||||
<Message>uic %(Filename)</Message>
|
||||
<Command>
|
||||
"$(QtHostBinDir)uic.exe" "%(FullPath)" -o "$(QtToolOutDir)ui_%(Filename).h"
|
||||
</Command>
|
||||
<Outputs>$(QtToolOutDir)ui_%(Filename).h</Outputs>
|
||||
</QtUi>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="QtUiClean">
|
||||
<Delete Files="@(UiFiles->'$(QtToolOutDir)ui_%(Filename).h')" />
|
||||
<!--Helper for dealing with tlogs-->
|
||||
<!--https://learn.microsoft.com/en-us/visualstudio/msbuild/getoutofdateitems-task?view=vs-2022-->
|
||||
<GetOutOfDateItems Sources="@(QtUi)"
|
||||
OutputsMetadataName="Outputs"
|
||||
CommandMetadataName="Command"
|
||||
TLogDirectory="$(TLogLocation)"
|
||||
TLogNamePrefix="QtUi">
|
||||
<Output TaskParameter="OutOfDateSources" ItemName="OutOfDateQtUi"/>
|
||||
</GetOutOfDateItems>
|
||||
|
||||
<CustomBuild Condition="'@(OutOfDateQtUi)'!=''"
|
||||
Sources="@(OutOfDateQtUi)" />
|
||||
</Target>
|
||||
|
||||
<!--Compile files needed to MOC and output in the build directory-->
|
||||
@@ -88,7 +102,7 @@
|
||||
<Target Name="QtMoc"
|
||||
BeforeTargets="ClCompile"
|
||||
Condition="'@(QtMoc)'!=''"
|
||||
Inputs="%(QtMoc.Identity);%(QtMoc.AdditionalDependencies);$(MSBuildProjectFile)"
|
||||
Inputs="%(QtMoc.Identity);$(QtHostBinDir)moc.exe"
|
||||
Outputs="$(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp">
|
||||
<Message Text="moc %(QtMoc.Filename) $(QtToolOutDir)%(QtMoc.RelativeDir)moc_%(QtMoc.Filename).cpp" Importance="High" />
|
||||
<Error Condition="!$(QtDirValid)" Text="Qt directory non-existent (download/extract the zip)" />
|
||||
@@ -97,7 +111,7 @@
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<MocOutputs Include="$(QtToolOutDir)moc_*.cpp" />
|
||||
<MocOutputs Include="$(QtToolOutDir)**/moc_*.cpp" />
|
||||
</ItemGroup>
|
||||
<Target Name="QtMocClean">
|
||||
<Delete Files="@(MocOutputs)" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<CleanDependsOn>QtResourceClean;QtUiClean;QtMocClean;QtTsClean;$(CleanDependsOn)</CleanDependsOn>
|
||||
<CleanDependsOn>QtResourceClean;QtMocClean;QtTsClean;$(CleanDependsOn)</CleanDependsOn>
|
||||
<!--
|
||||
<ComputeLinkInputsTargets>$(ComputeLinkInputsTargets);QtComputeMocOutput;</ComputeLinkInputsTargets>
|
||||
<ComputeLibInputsTargets>$(ComputeLibInputsTargets);QtComputeMocOutput;</ComputeLibInputsTargets>
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
<ItemType Name="QtUi" DisplayName="Qt User Interface File" />
|
||||
<ItemType Name="QtMoc" DisplayName="Qt Meta Object File" />
|
||||
<ItemType Name="QtTs" DisplayName="Qt Translation File" />
|
||||
<ContentType Name="QtUi" DisplayName="Qt User Interface Compiler" />
|
||||
<ContentType Name="QtResource" DisplayName="Qt Resource Compiler" />
|
||||
<ContentType Name="QtMoc" DisplayName="Qt Meta Object Compiler" />
|
||||
<ContentType Name="QtTs" DisplayName="Qt Translation Compiler" />
|
||||
<ContentType Name="QtResource" DisplayName="Qt Resource Compiler" ItemType="QtResource" />
|
||||
<ContentType Name="QtUi" DisplayName="Qt User Interface Compiler" ItemType = "QtUi"/>
|
||||
<ContentType Name="QtMoc" DisplayName="Qt Meta Object Compiler" ItemType="QtMoc" />
|
||||
<ContentType Name="QtTs" DisplayName="Qt Translation Compiler" ItemType="QtTs" />
|
||||
<FileExtension Name="*.qrc" ContentType="QtResource" />
|
||||
<FileExtension Name="*.ui" ContentType="QtUi" />
|
||||
<FileExtension Name="*.ts" ContentType="QtTs" />
|
||||
|
||||
@@ -164,38 +164,40 @@ target_sources(pcsx2-qt PRIVATE
|
||||
Debugger/DebuggerSettingsManager.cpp
|
||||
Debugger/DebuggerSettingsManager.h
|
||||
Debugger/DebuggerEvents.h
|
||||
Debugger/DebuggerWidget.cpp
|
||||
Debugger/DebuggerWidget.h
|
||||
Debugger/DebuggerView.cpp
|
||||
Debugger/DebuggerView.h
|
||||
Debugger/DebuggerWindow.cpp
|
||||
Debugger/DebuggerWindow.h
|
||||
Debugger/DebuggerWindow.ui
|
||||
Debugger/DisassemblyWidget.cpp
|
||||
Debugger/DisassemblyWidget.h
|
||||
Debugger/DisassemblyWidget.ui
|
||||
Debugger/DisassemblyView.cpp
|
||||
Debugger/DisassemblyView.h
|
||||
Debugger/DisassemblyView.ui
|
||||
Debugger/JsonValueWrapper.h
|
||||
Debugger/RegisterWidget.cpp
|
||||
Debugger/RegisterWidget.h
|
||||
Debugger/RegisterWidget.ui
|
||||
Debugger/RegisterView.cpp
|
||||
Debugger/RegisterView.h
|
||||
Debugger/RegisterView.ui
|
||||
Debugger/StackModel.cpp
|
||||
Debugger/StackModel.h
|
||||
Debugger/StackWidget.cpp
|
||||
Debugger/StackWidget.h
|
||||
Debugger/StackView.cpp
|
||||
Debugger/StackView.h
|
||||
Debugger/ThreadModel.cpp
|
||||
Debugger/ThreadModel.h
|
||||
Debugger/ThreadWidget.cpp
|
||||
Debugger/ThreadWidget.h
|
||||
Debugger/ThreadView.cpp
|
||||
Debugger/ThreadView.h
|
||||
Debugger/Breakpoints/BreakpointDialog.cpp
|
||||
Debugger/Breakpoints/BreakpointDialog.h
|
||||
Debugger/Breakpoints/BreakpointDialog.ui
|
||||
Debugger/Breakpoints/BreakpointModel.cpp
|
||||
Debugger/Breakpoints/BreakpointModel.h
|
||||
Debugger/Breakpoints/BreakpointWidget.cpp
|
||||
Debugger/Breakpoints/BreakpointWidget.h
|
||||
Debugger/Breakpoints/BreakpointWidget.ui
|
||||
Debugger/Breakpoints/BreakpointView.cpp
|
||||
Debugger/Breakpoints/BreakpointView.h
|
||||
Debugger/Breakpoints/BreakpointView.ui
|
||||
Debugger/Docking/DockLayout.cpp
|
||||
Debugger/Docking/DockLayout.h
|
||||
Debugger/Docking/DockManager.cpp
|
||||
Debugger/Docking/DockManager.h
|
||||
Debugger/Docking/DockMenuBar.cpp
|
||||
Debugger/Docking/DockMenuBar.h
|
||||
Debugger/Docking/DockTables.cpp
|
||||
Debugger/Docking/DockTables.h
|
||||
Debugger/Docking/DockUtils.cpp
|
||||
@@ -210,17 +212,17 @@ target_sources(pcsx2-qt PRIVATE
|
||||
Debugger/Docking/NoLayoutsWidget.cpp
|
||||
Debugger/Docking/NoLayoutsWidget.h
|
||||
Debugger/Docking/NoLayoutsWidget.ui
|
||||
Debugger/Memory/MemorySearchWidget.cpp
|
||||
Debugger/Memory/MemorySearchWidget.h
|
||||
Debugger/Memory/MemorySearchWidget.ui
|
||||
Debugger/Memory/MemoryViewWidget.cpp
|
||||
Debugger/Memory/MemoryViewWidget.h
|
||||
Debugger/Memory/MemoryViewWidget.ui
|
||||
Debugger/Memory/MemorySearchView.cpp
|
||||
Debugger/Memory/MemorySearchView.h
|
||||
Debugger/Memory/MemorySearchView.ui
|
||||
Debugger/Memory/MemoryView.cpp
|
||||
Debugger/Memory/MemoryView.h
|
||||
Debugger/Memory/MemoryView.ui
|
||||
Debugger/Memory/SavedAddressesModel.cpp
|
||||
Debugger/Memory/SavedAddressesModel.h
|
||||
Debugger/Memory/SavedAddressesWidget.cpp
|
||||
Debugger/Memory/SavedAddressesWidget.h
|
||||
Debugger/Memory/SavedAddressesWidget.ui
|
||||
Debugger/Memory/SavedAddressesView.cpp
|
||||
Debugger/Memory/SavedAddressesView.h
|
||||
Debugger/Memory/SavedAddressesView.ui
|
||||
Debugger/SymbolTree/NewSymbolDialogs.cpp
|
||||
Debugger/SymbolTree/NewSymbolDialogs.h
|
||||
Debugger/SymbolTree/NewSymbolDialog.ui
|
||||
@@ -232,9 +234,9 @@ target_sources(pcsx2-qt PRIVATE
|
||||
Debugger/SymbolTree/SymbolTreeNode.h
|
||||
Debugger/SymbolTree/SymbolTreeDelegates.cpp
|
||||
Debugger/SymbolTree/SymbolTreeDelegates.h
|
||||
Debugger/SymbolTree/SymbolTreeWidgets.cpp
|
||||
Debugger/SymbolTree/SymbolTreeWidgets.h
|
||||
Debugger/SymbolTree/SymbolTreeWidget.ui
|
||||
Debugger/SymbolTree/SymbolTreeViews.cpp
|
||||
Debugger/SymbolTree/SymbolTreeViews.h
|
||||
Debugger/SymbolTree/SymbolTreeView.ui
|
||||
Debugger/SymbolTree/TypeString.cpp
|
||||
Debugger/SymbolTree/TypeString.h
|
||||
Tools/InputRecording/NewInputRecordingDlg.cpp
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "BreakpointWidget.h"
|
||||
#include "BreakpointView.h"
|
||||
|
||||
#include "QtUtils.h"
|
||||
#include "Debugger/DebuggerSettingsManager.h"
|
||||
@@ -10,15 +10,15 @@
|
||||
|
||||
#include <QtGui/QClipboard>
|
||||
|
||||
BreakpointWidget::BreakpointWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, DISALLOW_MULTIPLE_INSTANCES)
|
||||
BreakpointView::BreakpointView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, DISALLOW_MULTIPLE_INSTANCES)
|
||||
, m_model(BreakpointModel::getInstance(cpu()))
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.breakpointList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_ui.breakpointList, &QTableView::customContextMenuRequested, this, &BreakpointWidget::openContextMenu);
|
||||
connect(m_ui.breakpointList, &QTableView::doubleClicked, this, &BreakpointWidget::onDoubleClicked);
|
||||
connect(m_ui.breakpointList, &QTableView::customContextMenuRequested, this, &BreakpointView::openContextMenu);
|
||||
connect(m_ui.breakpointList, &QTableView::doubleClicked, this, &BreakpointView::onDoubleClicked);
|
||||
|
||||
m_ui.breakpointList->setModel(m_model);
|
||||
for (std::size_t i = 0; auto mode : BreakpointModel::HeaderResizeModes)
|
||||
@@ -28,13 +28,13 @@ BreakpointWidget::BreakpointWidget(const DebuggerWidgetParameters& parameters)
|
||||
}
|
||||
}
|
||||
|
||||
void BreakpointWidget::onDoubleClicked(const QModelIndex& index)
|
||||
void BreakpointView::onDoubleClicked(const QModelIndex& index)
|
||||
{
|
||||
if (index.isValid() && index.column() == BreakpointModel::OFFSET)
|
||||
goToInDisassembler(m_model->data(index, BreakpointModel::DataRole).toUInt(), true);
|
||||
}
|
||||
|
||||
void BreakpointWidget::openContextMenu(QPoint pos)
|
||||
void BreakpointView::openContextMenu(QPoint pos)
|
||||
{
|
||||
QMenu* menu = new QMenu(m_ui.breakpointList);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
@@ -42,23 +42,23 @@ void BreakpointWidget::openContextMenu(QPoint pos)
|
||||
if (cpu().isAlive())
|
||||
{
|
||||
QAction* newAction = menu->addAction(tr("New"));
|
||||
connect(newAction, &QAction::triggered, this, &BreakpointWidget::contextNew);
|
||||
connect(newAction, &QAction::triggered, this, &BreakpointView::contextNew);
|
||||
|
||||
const QItemSelectionModel* selModel = m_ui.breakpointList->selectionModel();
|
||||
|
||||
if (selModel->hasSelection())
|
||||
{
|
||||
QAction* editAction = menu->addAction(tr("Edit"));
|
||||
connect(editAction, &QAction::triggered, this, &BreakpointWidget::contextEdit);
|
||||
connect(editAction, &QAction::triggered, this, &BreakpointView::contextEdit);
|
||||
|
||||
if (selModel->selectedIndexes().count() == 1)
|
||||
{
|
||||
QAction* copyAction = menu->addAction(tr("Copy"));
|
||||
connect(copyAction, &QAction::triggered, this, &BreakpointWidget::contextCopy);
|
||||
connect(copyAction, &QAction::triggered, this, &BreakpointView::contextCopy);
|
||||
}
|
||||
|
||||
QAction* deleteAction = menu->addAction(tr("Delete"));
|
||||
connect(deleteAction, &QAction::triggered, this, &BreakpointWidget::contextDelete);
|
||||
connect(deleteAction, &QAction::triggered, this, &BreakpointView::contextDelete);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void BreakpointWidget::openContextMenu(QPoint pos)
|
||||
if (cpu().isAlive())
|
||||
{
|
||||
QAction* actionImport = menu->addAction(tr("Paste from CSV"));
|
||||
connect(actionImport, &QAction::triggered, this, &BreakpointWidget::contextPasteCSV);
|
||||
connect(actionImport, &QAction::triggered, this, &BreakpointView::contextPasteCSV);
|
||||
|
||||
if (cpu().getCpuType() == BREAKPOINT_EE)
|
||||
{
|
||||
@@ -87,14 +87,14 @@ void BreakpointWidget::openContextMenu(QPoint pos)
|
||||
});
|
||||
|
||||
QAction* actionSave = menu->addAction(tr("Save to Settings"));
|
||||
connect(actionSave, &QAction::triggered, this, &BreakpointWidget::saveBreakpointsToDebuggerSettings);
|
||||
connect(actionSave, &QAction::triggered, this, &BreakpointView::saveBreakpointsToDebuggerSettings);
|
||||
}
|
||||
}
|
||||
|
||||
menu->popup(m_ui.breakpointList->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void BreakpointWidget::contextCopy()
|
||||
void BreakpointView::contextCopy()
|
||||
{
|
||||
const QItemSelectionModel* selModel = m_ui.breakpointList->selectionModel();
|
||||
|
||||
@@ -104,7 +104,7 @@ void BreakpointWidget::contextCopy()
|
||||
QGuiApplication::clipboard()->setText(m_model->data(selModel->currentIndex()).toString());
|
||||
}
|
||||
|
||||
void BreakpointWidget::contextDelete()
|
||||
void BreakpointView::contextDelete()
|
||||
{
|
||||
const QItemSelectionModel* selModel = m_ui.breakpointList->selectionModel();
|
||||
|
||||
@@ -121,14 +121,14 @@ void BreakpointWidget::contextDelete()
|
||||
m_model->removeRows(*row, 1);
|
||||
}
|
||||
|
||||
void BreakpointWidget::contextNew()
|
||||
void BreakpointView::contextNew()
|
||||
{
|
||||
BreakpointDialog* bpDialog = new BreakpointDialog(this, &cpu(), *m_model);
|
||||
bpDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
bpDialog->show();
|
||||
}
|
||||
|
||||
void BreakpointWidget::contextEdit()
|
||||
void BreakpointView::contextEdit()
|
||||
{
|
||||
const QItemSelectionModel* selModel = m_ui.breakpointList->selectionModel();
|
||||
|
||||
@@ -144,7 +144,7 @@ void BreakpointWidget::contextEdit()
|
||||
bpDialog->show();
|
||||
}
|
||||
|
||||
void BreakpointWidget::contextPasteCSV()
|
||||
void BreakpointView::contextPasteCSV()
|
||||
{
|
||||
QString csv = QGuiApplication::clipboard()->text();
|
||||
// Skip header
|
||||
@@ -168,7 +168,7 @@ void BreakpointWidget::contextPasteCSV()
|
||||
}
|
||||
}
|
||||
|
||||
void BreakpointWidget::saveBreakpointsToDebuggerSettings()
|
||||
void BreakpointView::saveBreakpointsToDebuggerSettings()
|
||||
{
|
||||
DebuggerSettingsManager::saveGameSettings(m_model);
|
||||
}
|
||||
@@ -3,11 +3,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_BreakpointWidget.h"
|
||||
#include "ui_BreakpointView.h"
|
||||
|
||||
#include "BreakpointModel.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
|
||||
#include "DebugTools/DebugInterface.h"
|
||||
#include "DebugTools/DisassemblyManager.h"
|
||||
@@ -16,12 +16,12 @@
|
||||
#include <QtWidgets/QTabBar>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
class BreakpointWidget : public DebuggerWidget
|
||||
class BreakpointView : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BreakpointWidget(const DebuggerWidgetParameters& parameters);
|
||||
BreakpointView(const DebuggerViewParameters& parameters);
|
||||
|
||||
void onDoubleClicked(const QModelIndex& index);
|
||||
void openContextMenu(QPoint pos);
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
void saveBreakpointsToDebuggerSettings();
|
||||
|
||||
private:
|
||||
Ui::BreakpointWidget m_ui;
|
||||
Ui::BreakpointView m_ui;
|
||||
|
||||
BreakpointModel* m_model;
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>BreakpointWidget</class>
|
||||
<widget class="QWidget" name="BreakpointWidget">
|
||||
<class>BreakpointView</class>
|
||||
<widget class="QWidget" name="BreakpointView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -14,8 +14,8 @@ namespace DebuggerEvents
|
||||
virtual ~Event() = default;
|
||||
};
|
||||
|
||||
// Sent when a debugger widget is first created, and subsequently broadcast
|
||||
// to all debugger widgets at regular intervals.
|
||||
// Sent when a debugger view is first created, and subsequently broadcast to
|
||||
// all debugger views at regular intervals.
|
||||
struct Refresh : Event
|
||||
{
|
||||
};
|
||||
@@ -41,7 +41,7 @@ namespace DebuggerEvents
|
||||
static constexpr const char* ACTION_PREFIX = QT_TRANSLATE_NOOP("DebuggerEvents", "Go to in");
|
||||
};
|
||||
|
||||
// The state of the VM has changed and widgets should be updated to reflect
|
||||
// The state of the VM has changed and views should be updated to reflect
|
||||
// the new state (e.g. the VM has been paused).
|
||||
struct VMUpdate : Event
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "DebuggerWidget.h"
|
||||
#include "DebuggerView.h"
|
||||
|
||||
#include "Debugger/DebuggerWindow.h"
|
||||
#include "Debugger/JsonValueWrapper.h"
|
||||
@@ -12,8 +12,9 @@
|
||||
|
||||
#include "common/Assertions.h"
|
||||
|
||||
DebuggerWidget::DebuggerWidget(const DebuggerWidgetParameters& parameters, u32 flags)
|
||||
DebuggerView::DebuggerView(const DebuggerViewParameters& parameters, u32 flags)
|
||||
: QWidget(parameters.parent)
|
||||
, m_id(parameters.id)
|
||||
, m_unique_name(parameters.unique_name)
|
||||
, m_cpu(parameters.cpu)
|
||||
, m_cpu_override(parameters.cpu_override)
|
||||
@@ -22,25 +23,30 @@ DebuggerWidget::DebuggerWidget(const DebuggerWidgetParameters& parameters, u32 f
|
||||
updateStyleSheet();
|
||||
}
|
||||
|
||||
DebugInterface& DebuggerWidget::cpu() const
|
||||
DebugInterface& DebuggerView::cpu() const
|
||||
{
|
||||
if (m_cpu_override.has_value())
|
||||
return DebugInterface::get(*m_cpu_override);
|
||||
|
||||
pxAssertRel(m_cpu, "DebuggerWidget::cpu called on object with null cpu.");
|
||||
pxAssertRel(m_cpu, "DebuggerView::cpu called on object with null cpu.");
|
||||
return *m_cpu;
|
||||
}
|
||||
|
||||
QString DebuggerWidget::uniqueName() const
|
||||
QString DebuggerView::uniqueName() const
|
||||
{
|
||||
return m_unique_name;
|
||||
}
|
||||
|
||||
QString DebuggerWidget::displayName() const
|
||||
u64 DebuggerView::id() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
QString DebuggerView::displayName() const
|
||||
{
|
||||
QString name = displayNameWithoutSuffix();
|
||||
|
||||
// If there are multiple debugger widgets of the same name, append a number
|
||||
// If there are multiple debugger views with the same name, append a number
|
||||
// to the display name.
|
||||
if (m_display_name_suffix_number.has_value())
|
||||
name = tr("%1 #%2").arg(name).arg(*m_display_name_suffix_number);
|
||||
@@ -51,17 +57,17 @@ QString DebuggerWidget::displayName() const
|
||||
return name;
|
||||
}
|
||||
|
||||
QString DebuggerWidget::displayNameWithoutSuffix() const
|
||||
QString DebuggerView::displayNameWithoutSuffix() const
|
||||
{
|
||||
return m_translated_display_name;
|
||||
}
|
||||
|
||||
QString DebuggerWidget::customDisplayName() const
|
||||
QString DebuggerView::customDisplayName() const
|
||||
{
|
||||
return m_custom_display_name;
|
||||
}
|
||||
|
||||
bool DebuggerWidget::setCustomDisplayName(QString display_name)
|
||||
bool DebuggerView::setCustomDisplayName(QString display_name)
|
||||
{
|
||||
if (display_name.size() > DockUtils::MAX_DOCK_WIDGET_NAME_SIZE)
|
||||
return false;
|
||||
@@ -70,17 +76,17 @@ bool DebuggerWidget::setCustomDisplayName(QString display_name)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DebuggerWidget::isPrimary() const
|
||||
bool DebuggerView::isPrimary() const
|
||||
{
|
||||
return m_is_primary;
|
||||
}
|
||||
|
||||
void DebuggerWidget::setPrimary(bool is_primary)
|
||||
void DebuggerView::setPrimary(bool is_primary)
|
||||
{
|
||||
m_is_primary = is_primary;
|
||||
}
|
||||
|
||||
bool DebuggerWidget::setCpu(DebugInterface& new_cpu)
|
||||
bool DebuggerView::setCpu(DebugInterface& new_cpu)
|
||||
{
|
||||
BreakPointCpu before = cpu().getCpuType();
|
||||
m_cpu = &new_cpu;
|
||||
@@ -88,12 +94,12 @@ bool DebuggerWidget::setCpu(DebugInterface& new_cpu)
|
||||
return before == after;
|
||||
}
|
||||
|
||||
std::optional<BreakPointCpu> DebuggerWidget::cpuOverride() const
|
||||
std::optional<BreakPointCpu> DebuggerView::cpuOverride() const
|
||||
{
|
||||
return m_cpu_override;
|
||||
}
|
||||
|
||||
bool DebuggerWidget::setCpuOverride(std::optional<BreakPointCpu> new_cpu)
|
||||
bool DebuggerView::setCpuOverride(std::optional<BreakPointCpu> new_cpu)
|
||||
{
|
||||
BreakPointCpu before = cpu().getCpuType();
|
||||
m_cpu_override = new_cpu;
|
||||
@@ -101,7 +107,7 @@ bool DebuggerWidget::setCpuOverride(std::optional<BreakPointCpu> new_cpu)
|
||||
return before == after;
|
||||
}
|
||||
|
||||
bool DebuggerWidget::handleEvent(const DebuggerEvents::Event& event)
|
||||
bool DebuggerView::handleEvent(const DebuggerEvents::Event& event)
|
||||
{
|
||||
auto [begin, end] = m_event_handlers.equal_range(typeid(event).name());
|
||||
for (auto handler = begin; handler != end; handler++)
|
||||
@@ -111,14 +117,14 @@ bool DebuggerWidget::handleEvent(const DebuggerEvents::Event& event)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DebuggerWidget::acceptsEventType(const char* event_type)
|
||||
bool DebuggerView::acceptsEventType(const char* event_type)
|
||||
{
|
||||
auto [begin, end] = m_event_handlers.equal_range(event_type);
|
||||
return begin != end;
|
||||
}
|
||||
|
||||
|
||||
void DebuggerWidget::toJson(JsonValueWrapper& json)
|
||||
void DebuggerView::toJson(JsonValueWrapper& json)
|
||||
{
|
||||
std::string custom_display_name_str = m_custom_display_name.toStdString();
|
||||
rapidjson::Value custom_display_name;
|
||||
@@ -128,7 +134,7 @@ void DebuggerWidget::toJson(JsonValueWrapper& json)
|
||||
json.value().AddMember("isPrimary", m_is_primary, json.allocator());
|
||||
}
|
||||
|
||||
bool DebuggerWidget::fromJson(const JsonValueWrapper& json)
|
||||
bool DebuggerView::fromJson(const JsonValueWrapper& json)
|
||||
{
|
||||
auto custom_display_name = json.value().FindMember("customDisplayName");
|
||||
if (custom_display_name != json.value().MemberEnd() && custom_display_name->value.IsString())
|
||||
@@ -144,17 +150,17 @@ bool DebuggerWidget::fromJson(const JsonValueWrapper& json)
|
||||
return true;
|
||||
}
|
||||
|
||||
void DebuggerWidget::switchToThisTab()
|
||||
void DebuggerView::switchToThisTab()
|
||||
{
|
||||
g_debugger_window->dockManager().switchToDebuggerWidget(this);
|
||||
g_debugger_window->dockManager().switchToDebuggerView(this);
|
||||
}
|
||||
|
||||
bool DebuggerWidget::supportsMultipleInstances()
|
||||
bool DebuggerView::supportsMultipleInstances()
|
||||
{
|
||||
return !(m_flags & DISALLOW_MULTIPLE_INSTANCES);
|
||||
}
|
||||
|
||||
void DebuggerWidget::retranslateDisplayName()
|
||||
void DebuggerView::retranslateDisplayName()
|
||||
{
|
||||
if (!m_custom_display_name.isEmpty())
|
||||
{
|
||||
@@ -162,25 +168,25 @@ void DebuggerWidget::retranslateDisplayName()
|
||||
}
|
||||
else
|
||||
{
|
||||
auto description = DockTables::DEBUGGER_WIDGETS.find(metaObject()->className());
|
||||
if (description != DockTables::DEBUGGER_WIDGETS.end())
|
||||
m_translated_display_name = QCoreApplication::translate("DebuggerWidget", description->second.display_name);
|
||||
auto description = DockTables::DEBUGGER_VIEWS.find(metaObject()->className());
|
||||
if (description != DockTables::DEBUGGER_VIEWS.end())
|
||||
m_translated_display_name = QCoreApplication::translate("DebuggerView", description->second.display_name);
|
||||
else
|
||||
m_translated_display_name = QString();
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<int> DebuggerWidget::displayNameSuffixNumber() const
|
||||
std::optional<int> DebuggerView::displayNameSuffixNumber() const
|
||||
{
|
||||
return m_display_name_suffix_number;
|
||||
}
|
||||
|
||||
void DebuggerWidget::setDisplayNameSuffixNumber(std::optional<int> suffix_number)
|
||||
void DebuggerView::setDisplayNameSuffixNumber(std::optional<int> suffix_number)
|
||||
{
|
||||
m_display_name_suffix_number = suffix_number;
|
||||
}
|
||||
|
||||
void DebuggerWidget::updateStyleSheet()
|
||||
void DebuggerView::updateStyleSheet()
|
||||
{
|
||||
QString stylesheet;
|
||||
|
||||
@@ -205,48 +211,48 @@ void DebuggerWidget::updateStyleSheet()
|
||||
setStyleSheet(stylesheet);
|
||||
}
|
||||
|
||||
void DebuggerWidget::goToInDisassembler(u32 address, bool switch_to_tab)
|
||||
void DebuggerView::goToInDisassembler(u32 address, bool switch_to_tab)
|
||||
{
|
||||
DebuggerEvents::GoToAddress event;
|
||||
event.address = address;
|
||||
event.filter = DebuggerEvents::GoToAddress::DISASSEMBLER;
|
||||
event.switch_to_tab = switch_to_tab;
|
||||
DebuggerWidget::sendEvent(std::move(event));
|
||||
DebuggerView::sendEvent(std::move(event));
|
||||
}
|
||||
|
||||
void DebuggerWidget::goToInMemoryView(u32 address, bool switch_to_tab)
|
||||
void DebuggerView::goToInMemoryView(u32 address, bool switch_to_tab)
|
||||
{
|
||||
DebuggerEvents::GoToAddress event;
|
||||
event.address = address;
|
||||
event.filter = DebuggerEvents::GoToAddress::MEMORY_VIEW;
|
||||
event.switch_to_tab = switch_to_tab;
|
||||
DebuggerWidget::sendEvent(std::move(event));
|
||||
DebuggerView::sendEvent(std::move(event));
|
||||
}
|
||||
|
||||
void DebuggerWidget::sendEventImplementation(const DebuggerEvents::Event& event)
|
||||
void DebuggerView::sendEventImplementation(const DebuggerEvents::Event& event)
|
||||
{
|
||||
if (!g_debugger_window)
|
||||
return;
|
||||
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerWidgets())
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerViews())
|
||||
if (widget->isPrimary() && widget->handleEvent(event))
|
||||
return;
|
||||
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerWidgets())
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerViews())
|
||||
if (!widget->isPrimary() && widget->handleEvent(event))
|
||||
return;
|
||||
}
|
||||
|
||||
void DebuggerWidget::broadcastEventImplementation(const DebuggerEvents::Event& event)
|
||||
void DebuggerView::broadcastEventImplementation(const DebuggerEvents::Event& event)
|
||||
{
|
||||
if (!g_debugger_window)
|
||||
return;
|
||||
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerWidgets())
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerViews())
|
||||
widget->handleEvent(event);
|
||||
}
|
||||
|
||||
std::vector<QAction*> DebuggerWidget::createEventActionsImplementation(
|
||||
std::vector<QAction*> DebuggerView::createEventActionsImplementation(
|
||||
QMenu* menu,
|
||||
u32 max_top_level_actions,
|
||||
bool skip_self,
|
||||
@@ -257,12 +263,12 @@ std::vector<QAction*> DebuggerWidget::createEventActionsImplementation(
|
||||
if (!g_debugger_window)
|
||||
return {};
|
||||
|
||||
std::vector<DebuggerWidget*> receivers;
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerWidgets())
|
||||
std::vector<DebuggerView*> receivers;
|
||||
for (const auto& [unique_name, widget] : g_debugger_window->dockManager().debuggerViews())
|
||||
if ((!skip_self || widget != this) && widget->acceptsEventType(event_type))
|
||||
receivers.emplace_back(widget);
|
||||
|
||||
std::sort(receivers.begin(), receivers.end(), [&](const DebuggerWidget* lhs, const DebuggerWidget* rhs) {
|
||||
std::sort(receivers.begin(), receivers.end(), [&](const DebuggerView* lhs, const DebuggerView* rhs) {
|
||||
if (lhs->displayNameWithoutSuffix() == rhs->displayNameWithoutSuffix())
|
||||
return lhs->displayNameSuffixNumber() < rhs->displayNameSuffixNumber();
|
||||
|
||||
@@ -279,7 +285,7 @@ std::vector<QAction*> DebuggerWidget::createEventActionsImplementation(
|
||||
std::vector<QAction*> actions;
|
||||
for (size_t i = 0; i < receivers.size(); i++)
|
||||
{
|
||||
DebuggerWidget* receiver = receivers[i];
|
||||
DebuggerView* receiver = receivers[i];
|
||||
|
||||
QAction* action;
|
||||
if (!submenu || i + 1 < max_top_level_actions)
|
||||
@@ -12,24 +12,26 @@
|
||||
|
||||
class JsonValueWrapper;
|
||||
|
||||
// Container for variables to be passed to the constructor of DebuggerWidget.
|
||||
struct DebuggerWidgetParameters
|
||||
// Container for variables to be passed to the constructor of DebuggerView.
|
||||
struct DebuggerViewParameters
|
||||
{
|
||||
QString unique_name;
|
||||
u64 id = 0;
|
||||
DebugInterface* cpu = nullptr;
|
||||
std::optional<BreakPointCpu> cpu_override;
|
||||
QWidget* parent = nullptr;
|
||||
};
|
||||
|
||||
// The base class for the contents of the dock widgets in the debugger.
|
||||
class DebuggerWidget : public QWidget
|
||||
class DebuggerView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QString uniqueName() const;
|
||||
u64 id() const;
|
||||
|
||||
// Get the translated name that should be displayed for this widget.
|
||||
// Get the translated name that should be displayed for this view.
|
||||
QString displayName() const;
|
||||
QString displayNameWithoutSuffix() const;
|
||||
|
||||
@@ -39,30 +41,30 @@ public:
|
||||
bool isPrimary() const;
|
||||
void setPrimary(bool is_primary);
|
||||
|
||||
// Get the effective debug interface associated with this particular widget
|
||||
// Get the effective debug interface associated with this particular view
|
||||
// if it's set, otherwise return the one associated with the layout that
|
||||
// contains this widget.
|
||||
// contains this view.
|
||||
DebugInterface& cpu() const;
|
||||
|
||||
// Set the debug interface associated with the layout. If false is returned,
|
||||
// we have to recreate the object.
|
||||
bool setCpu(DebugInterface& new_cpu);
|
||||
|
||||
// Get the CPU associated with this particular widget.
|
||||
// Get the CPU associated with this particular view.
|
||||
std::optional<BreakPointCpu> cpuOverride() const;
|
||||
|
||||
// Set the CPU associated with the individual dock widget. If false is
|
||||
// returned, we have to recreate the object.
|
||||
bool setCpuOverride(std::optional<BreakPointCpu> new_cpu);
|
||||
|
||||
// Send each open debugger widget an event in turn, until one handles it.
|
||||
// Send each open debugger view an event in turn, until one handles it.
|
||||
template <typename Event>
|
||||
static void sendEvent(Event event)
|
||||
{
|
||||
if (!QtHost::IsOnUIThread())
|
||||
{
|
||||
QtHost::RunOnUIThread([event = std::move(event)]() {
|
||||
DebuggerWidget::sendEventImplementation(event);
|
||||
DebuggerView::sendEventImplementation(event);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -70,14 +72,14 @@ public:
|
||||
sendEventImplementation(event);
|
||||
}
|
||||
|
||||
// Send all open debugger widgets an event.
|
||||
// Send all open debugger views an event.
|
||||
template <typename Event>
|
||||
static void broadcastEvent(Event event)
|
||||
{
|
||||
if (!QtHost::IsOnUIThread())
|
||||
{
|
||||
QtHost::RunOnUIThread([event = std::move(event)]() {
|
||||
DebuggerWidget::broadcastEventImplementation(event);
|
||||
DebuggerView::broadcastEventImplementation(event);
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -110,10 +112,10 @@ public:
|
||||
// Call the handler callback for the specified event.
|
||||
bool handleEvent(const DebuggerEvents::Event& event);
|
||||
|
||||
// Check if this debugger widget can receive the specified type of event.
|
||||
// Check if this debugger view can receive the specified type of event.
|
||||
bool acceptsEventType(const char* event_type);
|
||||
|
||||
// Generates context menu actions to send an event to each debugger widget
|
||||
// Generates context menu actions to send an event to each debugger view
|
||||
// that can receive it. A submenu is generated if the number of possible
|
||||
// receivers exceeds max_top_level_actions. If skip_self is true, actions
|
||||
// are only generated if the sender and receiver aren't the same object.
|
||||
@@ -163,7 +165,7 @@ protected:
|
||||
MONOSPACE_FONT = 1 << 1
|
||||
};
|
||||
|
||||
DebuggerWidget(const DebuggerWidgetParameters& parameters, u32 flags);
|
||||
DebuggerView(const DebuggerViewParameters& parameters, u32 flags);
|
||||
|
||||
private:
|
||||
static void sendEventImplementation(const DebuggerEvents::Event& event);
|
||||
@@ -177,6 +179,12 @@ private:
|
||||
const char* action_prefix,
|
||||
std::function<const DebuggerEvents::Event*()> event_func);
|
||||
|
||||
// Used for sorting debugger views that have the same display name. Unique
|
||||
// within a single layout.
|
||||
u64 m_id;
|
||||
|
||||
// Identifier for the dock widget used by KDDockWidgets. Unique within a
|
||||
// single layout.
|
||||
QString m_unique_name;
|
||||
|
||||
// A user-defined name, or an empty string if no name was specified so that
|
||||
@@ -186,7 +194,7 @@ private:
|
||||
QString m_translated_display_name;
|
||||
std::optional<int> m_display_name_suffix_number;
|
||||
|
||||
// Primary debugger widgets will be chosen to handle events first. For
|
||||
// Primary debugger views will be chosen to handle events first. For
|
||||
// example, clicking on an address to go to it in the primary memory view.
|
||||
bool m_is_primary = false;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "DebuggerWindow.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
#include "Debugger/Docking/DockManager.h"
|
||||
|
||||
#include "DebugTools/DebugInterface.h"
|
||||
@@ -86,7 +86,7 @@ DebuggerWindow::DebuggerWindow(QWidget* parent)
|
||||
});
|
||||
|
||||
connect(g_emu_thread, &EmuThread::onVMPaused, this, []() {
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
});
|
||||
|
||||
connect(g_emu_thread, &EmuThread::onVMStarting, this, &DebuggerWindow::onVMStarting);
|
||||
@@ -112,17 +112,15 @@ DebuggerWindow::DebuggerWindow(QWidget* parent)
|
||||
|
||||
QMenuBar* menu_bar = menuBar();
|
||||
|
||||
setMenuWidget(m_dock_manager->createLayoutSwitcher(menu_bar));
|
||||
setMenuWidget(m_dock_manager->createMenuBar(menu_bar));
|
||||
|
||||
updateTheme();
|
||||
|
||||
Host::RunOnCPUThread([]() {
|
||||
R5900SymbolImporter.OnDebuggerOpened();
|
||||
});
|
||||
|
||||
QTimer* refresh_timer = new QTimer(this);
|
||||
connect(refresh_timer, &QTimer::timeout, this, []() {
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::Refresh());
|
||||
});
|
||||
refresh_timer->start(1000);
|
||||
updateFromSettings();
|
||||
}
|
||||
|
||||
DebuggerWindow* DebuggerWindow::getInstance()
|
||||
@@ -193,7 +191,7 @@ void DebuggerWindow::setupFonts()
|
||||
m_font_size++;
|
||||
|
||||
updateFontActions();
|
||||
updateStyleSheets();
|
||||
updateTheme();
|
||||
saveFontSize();
|
||||
});
|
||||
|
||||
@@ -205,7 +203,7 @@ void DebuggerWindow::setupFonts()
|
||||
m_font_size--;
|
||||
|
||||
updateFontActions();
|
||||
updateStyleSheets();
|
||||
updateTheme();
|
||||
saveFontSize();
|
||||
});
|
||||
|
||||
@@ -213,12 +211,11 @@ void DebuggerWindow::setupFonts()
|
||||
m_font_size = DEFAULT_FONT_SIZE;
|
||||
|
||||
updateFontActions();
|
||||
updateStyleSheets();
|
||||
updateTheme();
|
||||
saveFontSize();
|
||||
});
|
||||
|
||||
updateFontActions();
|
||||
updateStyleSheets();
|
||||
}
|
||||
|
||||
void DebuggerWindow::updateFontActions()
|
||||
@@ -239,7 +236,7 @@ int DebuggerWindow::fontSize()
|
||||
return m_font_size;
|
||||
}
|
||||
|
||||
void DebuggerWindow::updateStyleSheets()
|
||||
void DebuggerWindow::updateTheme()
|
||||
{
|
||||
// TODO: Migrate away from stylesheets to improve performance.
|
||||
if (m_font_size != DEFAULT_FONT_SIZE)
|
||||
@@ -252,7 +249,7 @@ void DebuggerWindow::updateStyleSheets()
|
||||
setStyleSheet(QString());
|
||||
}
|
||||
|
||||
dockManager().updateStyleSheets();
|
||||
dockManager().updateTheme();
|
||||
}
|
||||
|
||||
void DebuggerWindow::saveWindowGeometry()
|
||||
@@ -284,6 +281,25 @@ bool DebuggerWindow::shouldSaveWindowGeometry()
|
||||
return Host::GetBaseBoolSettingValue("Debugger/UserInterface", "SaveWindowGeometry", true);
|
||||
}
|
||||
|
||||
void DebuggerWindow::updateFromSettings()
|
||||
{
|
||||
const int refresh_interval = Host::GetBaseIntSettingValue("Debugger/UserInterface", "RefreshInterval", 1000);
|
||||
const int effective_refresh_interval = std::clamp(refresh_interval, 10, 100000);
|
||||
|
||||
if (!m_refresh_timer)
|
||||
{
|
||||
m_refresh_timer = new QTimer(this);
|
||||
connect(m_refresh_timer, &QTimer::timeout, this, []() {
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::Refresh());
|
||||
});
|
||||
m_refresh_timer->start(effective_refresh_interval);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_refresh_timer->setInterval(effective_refresh_interval);
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerWindow::onVMStarting()
|
||||
{
|
||||
m_ui.actionRun->setEnabled(true);
|
||||
@@ -306,12 +322,18 @@ void DebuggerWindow::onVMPaused()
|
||||
m_ui.actionStepOver->setEnabled(true);
|
||||
m_ui.actionStepOut->setEnabled(true);
|
||||
|
||||
// Switch to the CPU tab that triggered the breakpoint.
|
||||
// Also blink the tab text to indicate that a breakpoint was triggered.
|
||||
if (CBreakPoints::GetBreakpointTriggered())
|
||||
{
|
||||
const BreakPointCpu triggeredCpu = CBreakPoints::GetBreakpointTriggeredCpu();
|
||||
m_dock_manager->switchToLayoutWithCPU(triggeredCpu, true);
|
||||
// Select a layout tab corresponding to the CPU that triggered the
|
||||
// breakpoint and make it start blinking unless said breakpoint was
|
||||
// generated as a result of stepping.
|
||||
const BreakPointCpu cpu_type = CBreakPoints::GetBreakpointTriggeredCpu();
|
||||
if (cpu_type == BREAKPOINT_EE || cpu_type == BREAKPOINT_IOP)
|
||||
{
|
||||
DebugInterface& cpu = DebugInterface::get(cpu_type);
|
||||
bool blink_tab = !CBreakPoints::IsSteppingBreakPoint(cpu_type, cpu.getPC());
|
||||
m_dock_manager->switchToLayoutWithCPU(cpu_type, blink_tab);
|
||||
}
|
||||
|
||||
Host::RunOnCPUThread([] {
|
||||
CBreakPoints::ClearTemporaryBreakPoints();
|
||||
@@ -324,7 +346,7 @@ void DebuggerWindow::onVMPaused()
|
||||
});
|
||||
}
|
||||
|
||||
// Stops us from telling the disassembly widget to jump somwhere because
|
||||
// Stops us from telling the disassembly view to jump somwhere because
|
||||
// breakpoint code paused the core.
|
||||
if (!CBreakPoints::GetCorePaused())
|
||||
emit onVMActuallyPaused();
|
||||
@@ -417,7 +439,7 @@ void DebuggerWindow::onStepInto()
|
||||
bpAddr = info.branchTarget; // Syscalls are always taken
|
||||
|
||||
Host::RunOnCPUThread([cpu, bpAddr] {
|
||||
CBreakPoints::AddBreakPoint(cpu->getCpuType(), bpAddr, true);
|
||||
CBreakPoints::AddBreakPoint(cpu->getCpuType(), bpAddr, true, true, true);
|
||||
cpu->resumeCpu();
|
||||
});
|
||||
|
||||
@@ -467,7 +489,7 @@ void DebuggerWindow::onStepOver()
|
||||
}
|
||||
|
||||
Host::RunOnCPUThread([cpu, bpAddr] {
|
||||
CBreakPoints::AddBreakPoint(cpu->getCpuType(), bpAddr, true);
|
||||
CBreakPoints::AddBreakPoint(cpu->getCpuType(), bpAddr, true, true, true);
|
||||
cpu->resumeCpu();
|
||||
});
|
||||
|
||||
@@ -508,7 +530,7 @@ void DebuggerWindow::onStepOut()
|
||||
u32 breakpoint_pc = stack_frames.at(1).pc;
|
||||
|
||||
Host::RunOnCPUThread([cpu, breakpoint_pc] {
|
||||
CBreakPoints::AddBreakPoint(cpu->getCpuType(), breakpoint_pc, true);
|
||||
CBreakPoints::AddBreakPoint(cpu->getCpuType(), breakpoint_pc, true, true, true);
|
||||
cpu->resumeCpu();
|
||||
});
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "DebugTools/DebugInterface.h"
|
||||
|
||||
#include <kddockwidgets/MainWindow.h>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
class DockManager;
|
||||
|
||||
@@ -31,12 +32,14 @@ public:
|
||||
void updateFontActions();
|
||||
void saveFontSize();
|
||||
int fontSize();
|
||||
void updateStyleSheets();
|
||||
void updateTheme();
|
||||
|
||||
void saveWindowGeometry();
|
||||
void restoreWindowGeometry();
|
||||
bool shouldSaveWindowGeometry();
|
||||
|
||||
void updateFromSettings();
|
||||
|
||||
public slots:
|
||||
void onVMStarting();
|
||||
void onVMPaused();
|
||||
@@ -67,6 +70,7 @@ private:
|
||||
DockManager* m_dock_manager;
|
||||
|
||||
QByteArray m_default_toolbar_state;
|
||||
QTimer* m_refresh_timer = nullptr;
|
||||
|
||||
int m_font_size;
|
||||
static const constexpr int DEFAULT_FONT_SIZE = 10;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "DisassemblyWidget.h"
|
||||
#include "DisassemblyView.h"
|
||||
|
||||
#include "Debugger/DebuggerWindow.h"
|
||||
#include "Debugger/JsonValueWrapper.h"
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
using namespace QtUtils;
|
||||
|
||||
DisassemblyWidget::DisassemblyWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, MONOSPACE_FONT)
|
||||
DisassemblyView::DisassemblyView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, MONOSPACE_FONT)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
@@ -34,10 +34,10 @@ DisassemblyWidget::DisassemblyWidget(const DebuggerWidgetParameters& parameters)
|
||||
setFocusPolicy(Qt::FocusPolicy::ClickFocus);
|
||||
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &DisassemblyWidget::customContextMenuRequested, this, &DisassemblyWidget::openContextMenu);
|
||||
connect(this, &DisassemblyView::customContextMenuRequested, this, &DisassemblyView::openContextMenu);
|
||||
|
||||
connect(g_debugger_window, &DebuggerWindow::onVMActuallyPaused,
|
||||
this, &DisassemblyWidget::gotoProgramCounterOnPause);
|
||||
this, &DisassemblyView::gotoProgramCounterOnPause);
|
||||
|
||||
receiveEvent<DebuggerEvents::Refresh>([this](const DebuggerEvents::Refresh& event) -> bool {
|
||||
update();
|
||||
@@ -58,20 +58,20 @@ DisassemblyWidget::DisassemblyWidget(const DebuggerWidgetParameters& parameters)
|
||||
});
|
||||
}
|
||||
|
||||
DisassemblyWidget::~DisassemblyWidget() = default;
|
||||
DisassemblyView::~DisassemblyView() = default;
|
||||
|
||||
void DisassemblyWidget::toJson(JsonValueWrapper& json)
|
||||
void DisassemblyView::toJson(JsonValueWrapper& json)
|
||||
{
|
||||
DebuggerWidget::toJson(json);
|
||||
DebuggerView::toJson(json);
|
||||
|
||||
json.value().AddMember("startAddress", m_visibleStart, json.allocator());
|
||||
json.value().AddMember("goToPCOnPause", m_goToProgramCounterOnPause, json.allocator());
|
||||
json.value().AddMember("showInstructionBytes", m_showInstructionBytes, json.allocator());
|
||||
}
|
||||
|
||||
bool DisassemblyWidget::fromJson(const JsonValueWrapper& json)
|
||||
bool DisassemblyView::fromJson(const JsonValueWrapper& json)
|
||||
{
|
||||
if (!DebuggerWidget::fromJson(json))
|
||||
if (!DebuggerView::fromJson(json))
|
||||
return false;
|
||||
|
||||
auto start_address = json.value().FindMember("startAddress");
|
||||
@@ -91,22 +91,22 @@ bool DisassemblyWidget::fromJson(const JsonValueWrapper& json)
|
||||
return true;
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextCopyAddress()
|
||||
void DisassemblyView::contextCopyAddress()
|
||||
{
|
||||
QGuiApplication::clipboard()->setText(FetchSelectionInfo(SelectionInfo::ADDRESS));
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextCopyInstructionHex()
|
||||
void DisassemblyView::contextCopyInstructionHex()
|
||||
{
|
||||
QGuiApplication::clipboard()->setText(FetchSelectionInfo(SelectionInfo::INSTRUCTIONHEX));
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextCopyInstructionText()
|
||||
void DisassemblyView::contextCopyInstructionText()
|
||||
{
|
||||
QGuiApplication::clipboard()->setText(FetchSelectionInfo(SelectionInfo::INSTRUCTIONTEXT));
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextAssembleInstruction()
|
||||
void DisassemblyView::contextAssembleInstruction()
|
||||
{
|
||||
if (!cpu().isCpuPaused())
|
||||
{
|
||||
@@ -140,12 +140,12 @@ void DisassemblyWidget::contextAssembleInstruction()
|
||||
this->m_nopedInstructions.insert({i, cpu->read32(i)});
|
||||
cpu->write32(i, val);
|
||||
}
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextNoopInstruction()
|
||||
void DisassemblyView::contextNoopInstruction()
|
||||
{
|
||||
Host::RunOnCPUThread([this, start = m_selectedAddressStart, end = m_selectedAddressEnd, cpu = &cpu()] {
|
||||
for (u32 i = start; i <= end; i += 4)
|
||||
@@ -153,11 +153,11 @@ void DisassemblyWidget::contextNoopInstruction()
|
||||
this->m_nopedInstructions.insert({i, cpu->read32(i)});
|
||||
cpu->write32(i, 0x00);
|
||||
}
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
});
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextRestoreInstruction()
|
||||
void DisassemblyView::contextRestoreInstruction()
|
||||
{
|
||||
Host::RunOnCPUThread([this, start = m_selectedAddressStart, end = m_selectedAddressEnd, cpu = &cpu()] {
|
||||
for (u32 i = start; i <= end; i += 4)
|
||||
@@ -168,11 +168,11 @@ void DisassemblyWidget::contextRestoreInstruction()
|
||||
this->m_nopedInstructions.erase(i);
|
||||
}
|
||||
}
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
});
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextRunToCursor()
|
||||
void DisassemblyView::contextRunToCursor()
|
||||
{
|
||||
const u32 selectedAddressStart = m_selectedAddressStart;
|
||||
Host::RunOnCPUThread([cpu = &cpu(), selectedAddressStart] {
|
||||
@@ -181,18 +181,18 @@ void DisassemblyWidget::contextRunToCursor()
|
||||
});
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextJumpToCursor()
|
||||
void DisassemblyView::contextJumpToCursor()
|
||||
{
|
||||
cpu().setPc(m_selectedAddressStart);
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextToggleBreakpoint()
|
||||
void DisassemblyView::contextToggleBreakpoint()
|
||||
{
|
||||
toggleBreakpoint(m_selectedAddressStart);
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextFollowBranch()
|
||||
void DisassemblyView::contextFollowBranch()
|
||||
{
|
||||
DisassemblyLineInfo line;
|
||||
|
||||
@@ -207,7 +207,7 @@ void DisassemblyWidget::contextFollowBranch()
|
||||
}
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextGoToAddress()
|
||||
void DisassemblyView::contextGoToAddress()
|
||||
{
|
||||
bool ok;
|
||||
const QString targetString = QInputDialog::getText(this, tr("Go To In Disassembly"), "",
|
||||
@@ -227,7 +227,7 @@ void DisassemblyWidget::contextGoToAddress()
|
||||
gotoAddressAndSetFocus(static_cast<u32>(address) & ~3);
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextAddFunction()
|
||||
void DisassemblyView::contextAddFunction()
|
||||
{
|
||||
NewFunctionDialog* dialog = new NewFunctionDialog(cpu(), this);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
@@ -239,13 +239,13 @@ void DisassemblyWidget::contextAddFunction()
|
||||
update();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextCopyFunctionName()
|
||||
void DisassemblyView::contextCopyFunctionName()
|
||||
{
|
||||
std::string name = cpu().GetSymbolGuardian().FunctionStartingAtAddress(m_selectedAddressStart).name;
|
||||
QGuiApplication::clipboard()->setText(QString::fromStdString(name));
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextRemoveFunction()
|
||||
void DisassemblyView::contextRemoveFunction()
|
||||
{
|
||||
cpu().GetSymbolGuardian().ReadWrite([&](ccc::SymbolDatabase& database) {
|
||||
ccc::Function* curFunc = database.functions.symbol_overlapping_address(m_selectedAddressStart);
|
||||
@@ -261,7 +261,7 @@ void DisassemblyWidget::contextRemoveFunction()
|
||||
});
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextRenameFunction()
|
||||
void DisassemblyView::contextRenameFunction()
|
||||
{
|
||||
const FunctionInfo curFunc = cpu().GetSymbolGuardian().FunctionOverlappingAddress(m_selectedAddressStart);
|
||||
|
||||
@@ -289,7 +289,7 @@ void DisassemblyWidget::contextRenameFunction()
|
||||
});
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextStubFunction()
|
||||
void DisassemblyView::contextStubFunction()
|
||||
{
|
||||
FunctionInfo function = cpu().GetSymbolGuardian().FunctionOverlappingAddress(m_selectedAddressStart);
|
||||
u32 address = function.address.valid() ? function.address.value : m_selectedAddressStart;
|
||||
@@ -298,11 +298,11 @@ void DisassemblyWidget::contextStubFunction()
|
||||
this->m_stubbedFunctions.insert({address, {cpu->read32(address), cpu->read32(address + 4)}});
|
||||
cpu->write32(address, 0x03E00008); // jr ra
|
||||
cpu->write32(address + 4, 0x00000000); // nop
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
});
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextRestoreFunction()
|
||||
void DisassemblyView::contextRestoreFunction()
|
||||
{
|
||||
u32 address = m_selectedAddressStart;
|
||||
cpu().GetSymbolGuardian().Read([&](const ccc::SymbolDatabase& database) {
|
||||
@@ -319,7 +319,7 @@ void DisassemblyWidget::contextRestoreFunction()
|
||||
cpu->write32(address, first_instruction);
|
||||
cpu->write32(address + 4, second_instruction);
|
||||
this->m_stubbedFunctions.erase(address);
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
});
|
||||
}
|
||||
else
|
||||
@@ -328,13 +328,13 @@ void DisassemblyWidget::contextRestoreFunction()
|
||||
}
|
||||
}
|
||||
|
||||
void DisassemblyWidget::contextShowInstructionBytes()
|
||||
void DisassemblyView::contextShowInstructionBytes()
|
||||
{
|
||||
m_showInstructionBytes = !m_showInstructionBytes;
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
QString DisassemblyWidget::GetLineDisasm(u32 address)
|
||||
QString DisassemblyView::GetLineDisasm(u32 address)
|
||||
{
|
||||
DisassemblyLineInfo lineInfo;
|
||||
m_disassemblyManager.getLine(address, true, lineInfo);
|
||||
@@ -342,7 +342,7 @@ QString DisassemblyWidget::GetLineDisasm(u32 address)
|
||||
};
|
||||
|
||||
// Here we go!
|
||||
void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||
void DisassemblyView::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
@@ -355,37 +355,48 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||
// Get the row height
|
||||
m_rowHeight = fm.height() + 2;
|
||||
|
||||
// Find the amount of visible rows
|
||||
m_visibleRows = h / m_rowHeight;
|
||||
// Find the amount of visible disassembly rows. Minus 1 to not count column title row.
|
||||
m_visibleRows = h / m_rowHeight - 1;
|
||||
|
||||
m_disassemblyManager.analyze(m_visibleStart, m_disassemblyManager.getNthNextAddress(m_visibleStart, m_visibleRows) - m_visibleStart);
|
||||
|
||||
// Draw the rows
|
||||
const u32 curPC = cpu().getPC(); // Get the PC here, because it'll change when we are drawing and make it seem like there are two PCs
|
||||
|
||||
// Format and draw title line on first row
|
||||
const QString titleLineString = GetDisassemblyTitleLine();
|
||||
const QColor titleLineColor = GetDisassemblyTitleLineColor();
|
||||
painter.fillRect(0, 0 * m_rowHeight, w, m_rowHeight, titleLineColor);
|
||||
painter.drawText(2, 0 * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, titleLineString);
|
||||
|
||||
// Prepare to draw the disassembly rows
|
||||
bool inSelectionBlock = false;
|
||||
bool alternate = m_visibleStart % 8;
|
||||
|
||||
const u32 curPC = cpu().getPC(); // Get the PC here, because it'll change when we are drawing and make it seem like there are two PCs
|
||||
|
||||
// Draw visible disassembly rows
|
||||
for (u32 i = 0; i <= m_visibleRows; i++)
|
||||
{
|
||||
// Address of instruction being displayed on row
|
||||
const u32 rowAddress = (i * 4) + m_visibleStart;
|
||||
// Row backgrounds
|
||||
|
||||
// Row will be drawn at row index+1 to offset past title row
|
||||
const u32 rowIndex = (i + 1) * m_rowHeight;
|
||||
|
||||
// Row backgrounds
|
||||
if (inSelectionBlock || (m_selectedAddressStart <= rowAddress && rowAddress <= m_selectedAddressEnd))
|
||||
{
|
||||
painter.fillRect(0, i * m_rowHeight, w, m_rowHeight, this->palette().highlight());
|
||||
painter.fillRect(0, rowIndex, w, m_rowHeight, this->palette().highlight());
|
||||
inSelectionBlock = m_selectedAddressEnd != rowAddress;
|
||||
}
|
||||
else
|
||||
{
|
||||
painter.fillRect(0, i * m_rowHeight, w, m_rowHeight, alternate ? this->palette().base() : this->palette().alternateBase());
|
||||
painter.fillRect(0, rowIndex, w, m_rowHeight, alternate ? this->palette().base() : this->palette().alternateBase());
|
||||
}
|
||||
|
||||
// Row text
|
||||
painter.setPen(GetAddressFunctionColor(rowAddress));
|
||||
QString lineString = DisassemblyStringFromAddress(rowAddress, painter.font(), curPC, rowAddress == m_selectedAddressStart);
|
||||
|
||||
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, lineString);
|
||||
painter.drawText(2, rowIndex, w, m_rowHeight, Qt::AlignLeft, lineString);
|
||||
|
||||
// Breakpoint marker
|
||||
bool enabled;
|
||||
@@ -394,11 +405,11 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||
if (enabled)
|
||||
{
|
||||
painter.setPen(Qt::green);
|
||||
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, "\u25A0");
|
||||
painter.drawText(2, rowIndex, w, m_rowHeight, Qt::AlignLeft, "\u25A0");
|
||||
}
|
||||
else
|
||||
{
|
||||
painter.drawText(2, i * m_rowHeight, w, m_rowHeight, Qt::AlignLeft, "\u2612");
|
||||
painter.drawText(2, rowIndex, w, m_rowHeight, Qt::AlignLeft, "\u2612");
|
||||
}
|
||||
}
|
||||
alternate = !alternate;
|
||||
@@ -435,9 +446,10 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||
// Explaination
|
||||
// ((branchLine.first - m_visibleStart) -> Find the amount of bytes from the top of the view
|
||||
// / 4 -> Convert that into rowss in instructions
|
||||
// + 1 -> Offset 1 to account for column title row
|
||||
// * m_rowHeight -> convert that into rows in pixels
|
||||
// + (m_rowHeight / 2) -> Add half a row in pixels to center the arrow
|
||||
top = (((branchLine.first - m_visibleStart) / 4) * m_rowHeight) + (m_rowHeight / 2);
|
||||
top = (((branchLine.first - m_visibleStart) / 4 + 1) * m_rowHeight) + (m_rowHeight / 2);
|
||||
}
|
||||
|
||||
if (branchLine.second < m_visibleStart)
|
||||
@@ -450,7 +462,7 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||
}
|
||||
else
|
||||
{
|
||||
bottom = (((branchLine.second - m_visibleStart) / 4) * m_rowHeight) + (m_rowHeight / 2);
|
||||
bottom = (((branchLine.second - m_visibleStart) / 4 + 1) * m_rowHeight) + (m_rowHeight / 2);
|
||||
}
|
||||
|
||||
branchCount++;
|
||||
@@ -467,7 +479,8 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||
if (top < 0) // first is not visible, but second is
|
||||
{
|
||||
painter.drawLine(x - 2, bottom, x + 2, bottom);
|
||||
painter.drawLine(x + 2, bottom, x + 2, 0);
|
||||
// Draw to first visible disassembly row so branch line is not drawn on title line
|
||||
painter.drawLine(x + 2, bottom, x + 2, m_rowHeight);
|
||||
|
||||
if (branchLine.type == LINE_DOWN)
|
||||
{
|
||||
@@ -513,45 +526,61 @@ void DisassemblyWidget::paintEvent(QPaintEvent* event)
|
||||
painter.drawRect(0, 0, w, h);
|
||||
}
|
||||
|
||||
void DisassemblyWidget::mousePressEvent(QMouseEvent* event)
|
||||
void DisassemblyView::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
const u32 selectedAddress = (static_cast<int>(event->position().y()) / m_rowHeight * 4) + m_visibleStart;
|
||||
if (event->buttons() & Qt::LeftButton)
|
||||
// Calculate index of row that was clicked
|
||||
const u32 selectedRowIndex = static_cast<int>(event->position().y()) / m_rowHeight;
|
||||
|
||||
// Only process if a row other than the column title row was clicked
|
||||
if (selectedRowIndex > 0)
|
||||
{
|
||||
if (event->modifiers() & Qt::ShiftModifier)
|
||||
// Calculate address of selected row. Index minus one for title row.
|
||||
const u32 selectedAddress = ((selectedRowIndex - 1) * 4) + m_visibleStart;
|
||||
if (event->buttons() & Qt::LeftButton)
|
||||
{
|
||||
if (selectedAddress < m_selectedAddressStart)
|
||||
if (event->modifiers() & Qt::ShiftModifier)
|
||||
{
|
||||
if (selectedAddress < m_selectedAddressStart)
|
||||
{
|
||||
m_selectedAddressStart = selectedAddress;
|
||||
}
|
||||
else if (selectedAddress > m_visibleStart)
|
||||
{
|
||||
m_selectedAddressEnd = selectedAddress;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_selectedAddressStart = selectedAddress;
|
||||
}
|
||||
else if (selectedAddress > m_visibleStart)
|
||||
{
|
||||
m_selectedAddressEnd = selectedAddress;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (event->buttons() & Qt::RightButton)
|
||||
{
|
||||
m_selectedAddressStart = selectedAddress;
|
||||
m_selectedAddressEnd = selectedAddress;
|
||||
if (m_selectedAddressStart == m_selectedAddressEnd)
|
||||
{
|
||||
m_selectedAddressStart = selectedAddress;
|
||||
m_selectedAddressEnd = selectedAddress;
|
||||
}
|
||||
}
|
||||
this->repaint();
|
||||
}
|
||||
else if (event->buttons() & Qt::RightButton)
|
||||
{
|
||||
if (m_selectedAddressStart == m_selectedAddressEnd)
|
||||
{
|
||||
m_selectedAddressStart = selectedAddress;
|
||||
m_selectedAddressEnd = selectedAddress;
|
||||
}
|
||||
}
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
void DisassemblyView::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
{
|
||||
toggleBreakpoint((static_cast<int>(event->position().y()) / m_rowHeight * 4) + m_visibleStart);
|
||||
// Calculate index of row that was double clicked
|
||||
const u32 selectedRowIndex = static_cast<int>(event->position().y()) / m_rowHeight;
|
||||
|
||||
// Only process if a row other than the column title row was double clicked
|
||||
if (selectedRowIndex > 0)
|
||||
{
|
||||
// Calculate address of selected row. Index minus one for title row.
|
||||
toggleBreakpoint(((selectedRowIndex - 1) * 4) + m_visibleStart);
|
||||
}
|
||||
}
|
||||
|
||||
void DisassemblyWidget::wheelEvent(QWheelEvent* event)
|
||||
void DisassemblyView::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
if (event->angleDelta().y() < 0) // todo: max address bounds check?
|
||||
{
|
||||
@@ -564,7 +593,7 @@ void DisassemblyWidget::wheelEvent(QWheelEvent* event)
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::keyPressEvent(QKeyEvent* event)
|
||||
void DisassemblyView::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
switch (event->key())
|
||||
{
|
||||
@@ -636,28 +665,32 @@ void DisassemblyWidget::keyPressEvent(QKeyEvent* event)
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::openContextMenu(QPoint pos)
|
||||
void DisassemblyView::openContextMenu(QPoint pos)
|
||||
{
|
||||
if (!cpu().isAlive())
|
||||
return;
|
||||
|
||||
// Dont open context menu when used on column title row
|
||||
if (pos.y() / m_rowHeight == 0)
|
||||
return;
|
||||
|
||||
QMenu* menu = new QMenu(this);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QAction* copy_address_action = menu->addAction(tr("Copy Address"));
|
||||
connect(copy_address_action, &QAction::triggered, this, &DisassemblyWidget::contextCopyAddress);
|
||||
connect(copy_address_action, &QAction::triggered, this, &DisassemblyView::contextCopyAddress);
|
||||
|
||||
QAction* copy_instruction_hex_action = menu->addAction(tr("Copy Instruction Hex"));
|
||||
connect(copy_instruction_hex_action, &QAction::triggered, this, &DisassemblyWidget::contextCopyInstructionHex);
|
||||
connect(copy_instruction_hex_action, &QAction::triggered, this, &DisassemblyView::contextCopyInstructionHex);
|
||||
|
||||
QAction* copy_instruction_text_action = menu->addAction(tr("&Copy Instruction Text"));
|
||||
copy_instruction_text_action->setShortcut(QKeySequence(Qt::Key_C));
|
||||
connect(copy_instruction_text_action, &QAction::triggered, this, &DisassemblyWidget::contextCopyInstructionText);
|
||||
connect(copy_instruction_text_action, &QAction::triggered, this, &DisassemblyView::contextCopyInstructionText);
|
||||
|
||||
if (cpu().GetSymbolGuardian().FunctionExistsWithStartingAddress(m_selectedAddressStart))
|
||||
{
|
||||
QAction* copy_function_name_action = menu->addAction(tr("Copy Function Name"));
|
||||
connect(copy_function_name_action, &QAction::triggered, this, &DisassemblyWidget::contextCopyFunctionName);
|
||||
connect(copy_function_name_action, &QAction::triggered, this, &DisassemblyView::contextCopyFunctionName);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
@@ -665,37 +698,37 @@ void DisassemblyWidget::openContextMenu(QPoint pos)
|
||||
if (AddressCanRestore(m_selectedAddressStart, m_selectedAddressEnd))
|
||||
{
|
||||
QAction* restore_instruction_action = menu->addAction(tr("Restore Instruction(s)"));
|
||||
connect(restore_instruction_action, &QAction::triggered, this, &DisassemblyWidget::contextRestoreInstruction);
|
||||
connect(restore_instruction_action, &QAction::triggered, this, &DisassemblyView::contextRestoreInstruction);
|
||||
}
|
||||
|
||||
QAction* assemble_new_instruction = menu->addAction(tr("Asse&mble new Instruction(s)"));
|
||||
assemble_new_instruction->setShortcut(QKeySequence(Qt::Key_M));
|
||||
connect(assemble_new_instruction, &QAction::triggered, this, &DisassemblyWidget::contextAssembleInstruction);
|
||||
connect(assemble_new_instruction, &QAction::triggered, this, &DisassemblyView::contextAssembleInstruction);
|
||||
|
||||
QAction* nop_instruction_action = menu->addAction(tr("NOP Instruction(s)"));
|
||||
connect(nop_instruction_action, &QAction::triggered, this, &DisassemblyWidget::contextNoopInstruction);
|
||||
connect(nop_instruction_action, &QAction::triggered, this, &DisassemblyView::contextNoopInstruction);
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
QAction* run_to_cursor_action = menu->addAction(tr("Run to Cursor"));
|
||||
connect(run_to_cursor_action, &QAction::triggered, this, &DisassemblyWidget::contextRunToCursor);
|
||||
connect(run_to_cursor_action, &QAction::triggered, this, &DisassemblyView::contextRunToCursor);
|
||||
|
||||
QAction* jump_to_cursor_action = menu->addAction(tr("&Jump to Cursor"));
|
||||
jump_to_cursor_action->setShortcut(QKeySequence(Qt::Key_J));
|
||||
connect(jump_to_cursor_action, &QAction::triggered, this, &DisassemblyWidget::contextJumpToCursor);
|
||||
connect(jump_to_cursor_action, &QAction::triggered, this, &DisassemblyView::contextJumpToCursor);
|
||||
|
||||
QAction* toggle_breakpoint_action = menu->addAction(tr("Toggle &Breakpoint"));
|
||||
toggle_breakpoint_action->setShortcut(QKeySequence(Qt::Key_B));
|
||||
connect(toggle_breakpoint_action, &QAction::triggered, this, &DisassemblyWidget::contextToggleBreakpoint);
|
||||
connect(toggle_breakpoint_action, &QAction::triggered, this, &DisassemblyView::contextToggleBreakpoint);
|
||||
|
||||
QAction* follow_branch_action = menu->addAction(tr("Follow Branch"));
|
||||
connect(follow_branch_action, &QAction::triggered, this, &DisassemblyWidget::contextFollowBranch);
|
||||
connect(follow_branch_action, &QAction::triggered, this, &DisassemblyView::contextFollowBranch);
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
QAction* go_to_address_action = menu->addAction(tr("&Go to Address"));
|
||||
go_to_address_action->setShortcut(QKeySequence(Qt::Key_G));
|
||||
connect(go_to_address_action, &QAction::triggered, this, &DisassemblyWidget::contextGoToAddress);
|
||||
connect(go_to_address_action, &QAction::triggered, this, &DisassemblyView::contextGoToAddress);
|
||||
|
||||
createEventActions<DebuggerEvents::GoToAddress>(menu, [this]() {
|
||||
DebuggerEvents::GoToAddress event;
|
||||
@@ -712,24 +745,24 @@ void DisassemblyWidget::openContextMenu(QPoint pos)
|
||||
menu->addSeparator();
|
||||
|
||||
QAction* add_function_action = menu->addAction(tr("Add Function"));
|
||||
connect(add_function_action, &QAction::triggered, this, &DisassemblyWidget::contextAddFunction);
|
||||
connect(add_function_action, &QAction::triggered, this, &DisassemblyView::contextAddFunction);
|
||||
|
||||
QAction* rename_function_action = menu->addAction(tr("Rename Function"));
|
||||
connect(rename_function_action, &QAction::triggered, this, &DisassemblyWidget::contextRenameFunction);
|
||||
connect(rename_function_action, &QAction::triggered, this, &DisassemblyView::contextRenameFunction);
|
||||
|
||||
QAction* remove_function_action = menu->addAction(tr("Remove Function"));
|
||||
menu->addAction(remove_function_action);
|
||||
connect(remove_function_action, &QAction::triggered, this, &DisassemblyWidget::contextRemoveFunction);
|
||||
connect(remove_function_action, &QAction::triggered, this, &DisassemblyView::contextRemoveFunction);
|
||||
|
||||
if (FunctionCanRestore(m_selectedAddressStart))
|
||||
{
|
||||
QAction* restore_action = menu->addAction(tr("Restore Function"));
|
||||
connect(restore_action, &QAction::triggered, this, &DisassemblyWidget::contextRestoreFunction);
|
||||
connect(restore_action, &QAction::triggered, this, &DisassemblyView::contextRestoreFunction);
|
||||
}
|
||||
else
|
||||
{
|
||||
QAction* stub_action = menu->addAction(tr("Stub (NOP) Function"));
|
||||
connect(stub_action, &QAction::triggered, this, &DisassemblyWidget::contextStubFunction);
|
||||
connect(stub_action, &QAction::triggered, this, &DisassemblyView::contextStubFunction);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
@@ -738,12 +771,57 @@ void DisassemblyWidget::openContextMenu(QPoint pos)
|
||||
show_instruction_bytes_action->setShortcut(QKeySequence(Qt::Key_I));
|
||||
show_instruction_bytes_action->setCheckable(true);
|
||||
show_instruction_bytes_action->setChecked(m_showInstructionBytes);
|
||||
connect(show_instruction_bytes_action, &QAction::triggered, this, &DisassemblyWidget::contextShowInstructionBytes);
|
||||
connect(show_instruction_bytes_action, &QAction::triggered, this, &DisassemblyView::contextShowInstructionBytes);
|
||||
|
||||
menu->popup(this->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
inline QString DisassemblyWidget::DisassemblyStringFromAddress(u32 address, QFont font, u32 pc, bool selected)
|
||||
QString DisassemblyView::GetDisassemblyTitleLine()
|
||||
{
|
||||
// Disassembly column title line based on format created by DisassemblyStringFromAddress()
|
||||
QString title_line_string;
|
||||
|
||||
// Determine layout of disassembly row. Layout depends on user setting "Show Instruction Bytes".
|
||||
const bool show_instruction_bytes = m_showInstructionBytes && cpu().isAlive();
|
||||
if (show_instruction_bytes)
|
||||
{
|
||||
title_line_string = QCoreApplication::translate("DisassemblyViewColumnTitle", " %1 %2 %3 %4");
|
||||
}
|
||||
else
|
||||
{
|
||||
title_line_string = QCoreApplication::translate("DisassemblyViewColumnTitle", " %1 %2 %3");
|
||||
}
|
||||
|
||||
// First 2 chars in disassembly row is always for non-returning functions (NR)
|
||||
// Do not display column title for this field.
|
||||
title_line_string = title_line_string.arg(" ");
|
||||
|
||||
// Second column title is always address of instruction
|
||||
title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyViewColumnTitle", "Location"));
|
||||
|
||||
// If user specified to "Show Instruction Bytes", third column is opcode + args
|
||||
if (show_instruction_bytes)
|
||||
{
|
||||
title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyViewColumnTitle", "Bytes "));
|
||||
}
|
||||
|
||||
// Last column title is always disassembled instruction
|
||||
title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyViewColumnTitle", "Instruction"));
|
||||
|
||||
return title_line_string;
|
||||
}
|
||||
|
||||
QColor DisassemblyView::GetDisassemblyTitleLineColor()
|
||||
{
|
||||
// Determine color of column title line. Based on QFusionStyle.
|
||||
QColor title_line_color = this->palette().button().color();
|
||||
const int title_line_color_val = qGray(title_line_color.rgb());
|
||||
title_line_color = title_line_color.lighter(100 + qMax(1, (180 - title_line_color_val) / 6));
|
||||
title_line_color.setHsv(title_line_color.hue(), title_line_color.saturation() * 0.75, title_line_color.value());
|
||||
return title_line_color.lighter(104);
|
||||
}
|
||||
|
||||
inline QString DisassemblyView::DisassemblyStringFromAddress(u32 address, QFont font, u32 pc, bool selected)
|
||||
{
|
||||
DisassemblyLineInfo line;
|
||||
|
||||
@@ -804,7 +882,7 @@ inline QString DisassemblyWidget::DisassemblyStringFromAddress(u32 address, QFon
|
||||
return lineString;
|
||||
}
|
||||
|
||||
QColor DisassemblyWidget::GetAddressFunctionColor(u32 address)
|
||||
QColor DisassemblyView::GetAddressFunctionColor(u32 address)
|
||||
{
|
||||
std::array<QColor, 6> colors;
|
||||
if (QtUtils::IsLightTheme(palette()))
|
||||
@@ -842,7 +920,7 @@ QColor DisassemblyWidget::GetAddressFunctionColor(u32 address)
|
||||
return colors[(function_address.value >> 4) % colors.size()];
|
||||
}
|
||||
|
||||
QString DisassemblyWidget::FetchSelectionInfo(SelectionInfo selInfo)
|
||||
QString DisassemblyView::FetchSelectionInfo(SelectionInfo selInfo)
|
||||
{
|
||||
QString infoBlock;
|
||||
for (u32 i = m_selectedAddressStart; i <= m_selectedAddressEnd; i += 4)
|
||||
@@ -867,18 +945,18 @@ QString DisassemblyWidget::FetchSelectionInfo(SelectionInfo selInfo)
|
||||
return infoBlock;
|
||||
}
|
||||
|
||||
void DisassemblyWidget::gotoAddressAndSetFocus(u32 address)
|
||||
void DisassemblyView::gotoAddressAndSetFocus(u32 address)
|
||||
{
|
||||
gotoAddress(address, true);
|
||||
}
|
||||
|
||||
void DisassemblyWidget::gotoProgramCounterOnPause()
|
||||
void DisassemblyView::gotoProgramCounterOnPause()
|
||||
{
|
||||
if (m_goToProgramCounterOnPause)
|
||||
gotoAddress(cpu().getPC(), false);
|
||||
}
|
||||
|
||||
void DisassemblyWidget::gotoAddress(u32 address, bool should_set_focus)
|
||||
void DisassemblyView::gotoAddress(u32 address, bool should_set_focus)
|
||||
{
|
||||
const u32 destAddress = address & ~3;
|
||||
// Center the address
|
||||
@@ -891,12 +969,12 @@ void DisassemblyWidget::gotoAddress(u32 address, bool should_set_focus)
|
||||
this->setFocus();
|
||||
}
|
||||
|
||||
void DisassemblyWidget::toggleBreakpoint(u32 address)
|
||||
void DisassemblyView::toggleBreakpoint(u32 address)
|
||||
{
|
||||
if (!cpu().isAlive())
|
||||
return;
|
||||
|
||||
QPointer<DisassemblyWidget> disassembly_widget(this);
|
||||
QPointer<DisassemblyView> disassembly_widget(this);
|
||||
|
||||
Host::RunOnCPUThread([cpu = &cpu(), address, disassembly_widget] {
|
||||
if (!CBreakPoints::IsAddressBreakPoint(cpu->getCpuType(), address))
|
||||
@@ -912,7 +990,7 @@ void DisassemblyWidget::toggleBreakpoint(u32 address)
|
||||
});
|
||||
}
|
||||
|
||||
bool DisassemblyWidget::AddressCanRestore(u32 start, u32 end)
|
||||
bool DisassemblyView::AddressCanRestore(u32 start, u32 end)
|
||||
{
|
||||
for (u32 i = start; i <= end; i += 4)
|
||||
{
|
||||
@@ -924,7 +1002,7 @@ bool DisassemblyWidget::AddressCanRestore(u32 start, u32 end)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DisassemblyWidget::FunctionCanRestore(u32 address)
|
||||
bool DisassemblyView::FunctionCanRestore(u32 address)
|
||||
{
|
||||
FunctionInfo function = cpu().GetSymbolGuardian().FunctionOverlappingAddress(address);
|
||||
if (function.address.valid())
|
||||
@@ -3,22 +3,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_DisassemblyWidget.h"
|
||||
#include "ui_DisassemblyView.h"
|
||||
|
||||
#include "DebuggerWidget.h"
|
||||
#include "DebuggerView.h"
|
||||
|
||||
#include "pcsx2/DebugTools/DisassemblyManager.h"
|
||||
|
||||
#include <QtWidgets/QMenu>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
class DisassemblyWidget final : public DebuggerWidget
|
||||
class DisassemblyView final : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DisassemblyWidget(const DebuggerWidgetParameters& parameters);
|
||||
~DisassemblyWidget();
|
||||
DisassemblyView(const DebuggerViewParameters& parameters);
|
||||
~DisassemblyView();
|
||||
|
||||
void toJson(JsonValueWrapper& json) override;
|
||||
bool fromJson(const JsonValueWrapper& json) override;
|
||||
@@ -65,7 +65,7 @@ public slots:
|
||||
void toggleBreakpoint(u32 address);
|
||||
|
||||
private:
|
||||
Ui::DisassemblyWidget m_ui;
|
||||
Ui::DisassemblyView m_ui;
|
||||
|
||||
u32 m_visibleStart = 0x100000; // The address of the first instruction shown.
|
||||
u32 m_visibleRows;
|
||||
@@ -80,6 +80,8 @@ private:
|
||||
bool m_goToProgramCounterOnPause = true;
|
||||
DisassemblyManager m_disassemblyManager;
|
||||
|
||||
QString GetDisassemblyTitleLine();
|
||||
QColor GetDisassemblyTitleLineColor();
|
||||
inline QString DisassemblyStringFromAddress(u32 address, QFont font, u32 pc, bool selected);
|
||||
QColor GetAddressFunctionColor(u32 address);
|
||||
enum class SelectionInfo
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DisassemblyWidget</class>
|
||||
<widget class="QWidget" name="DisassemblyWidget">
|
||||
<class>DisassemblyView</class>
|
||||
<widget class="QWidget" name="DisassemblyView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "DockLayout.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
#include "Debugger/DebuggerWindow.h"
|
||||
#include "Debugger/JsonValueWrapper.h"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
const char* DEBUGGER_LAYOUT_FILE_FORMAT = "PCSX2 Debugger User Interface Layout";
|
||||
|
||||
// Increment this whenever there is a breaking change to the JSON format.
|
||||
const u32 DEBUGGER_LAYOUT_FILE_VERSION_MAJOR = 1;
|
||||
const u32 DEBUGGER_LAYOUT_FILE_VERSION_MAJOR = 2;
|
||||
|
||||
// Increment this whenever there is a non-breaking change to the JSON format.
|
||||
const u32 DEBUGGER_LAYOUT_FILE_VERSION_MINOR = 0;
|
||||
@@ -70,23 +70,24 @@ DockLayout::DockLayout(
|
||||
: m_name(name)
|
||||
, m_cpu(cpu)
|
||||
, m_is_default(is_default)
|
||||
, m_next_unique_name(layout_to_clone.m_next_unique_name)
|
||||
, m_next_id(layout_to_clone.m_next_id)
|
||||
, m_base_layout(layout_to_clone.m_base_layout)
|
||||
, m_toolbars(layout_to_clone.m_toolbars)
|
||||
, m_geometry(layout_to_clone.m_geometry)
|
||||
{
|
||||
for (const auto& [unique_name, widget_to_clone] : layout_to_clone.m_widgets)
|
||||
{
|
||||
auto widget_description = DockTables::DEBUGGER_WIDGETS.find(widget_to_clone->metaObject()->className());
|
||||
if (widget_description == DockTables::DEBUGGER_WIDGETS.end())
|
||||
auto widget_description = DockTables::DEBUGGER_VIEWS.find(widget_to_clone->metaObject()->className());
|
||||
if (widget_description == DockTables::DEBUGGER_VIEWS.end())
|
||||
continue;
|
||||
|
||||
DebuggerWidgetParameters parameters;
|
||||
DebuggerViewParameters parameters;
|
||||
parameters.unique_name = unique_name;
|
||||
parameters.id = widget_to_clone->id();
|
||||
parameters.cpu = &DebugInterface::get(cpu);
|
||||
parameters.cpu_override = widget_to_clone->cpuOverride();
|
||||
|
||||
DebuggerWidget* new_widget = widget_description->second.create_widget(parameters);
|
||||
DebuggerView* new_widget = widget_description->second.create_widget(parameters);
|
||||
new_widget->setCustomDisplayName(widget_to_clone->customDisplayName());
|
||||
new_widget->setPrimary(widget_to_clone->isPrimary());
|
||||
m_widgets.emplace(unique_name, new_widget);
|
||||
@@ -143,7 +144,7 @@ void DockLayout::setCpu(BreakPointCpu cpu)
|
||||
pxAssert(widget.get());
|
||||
|
||||
if (!widget->setCpu(DebugInterface::get(cpu)))
|
||||
recreateDebuggerWidget(unique_name);
|
||||
recreateDebuggerView(unique_name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,24 +222,24 @@ void DockLayout::thaw()
|
||||
}
|
||||
|
||||
// Check that all the dock widgets have been restored correctly.
|
||||
std::vector<QString> orphaned_debugger_widgets;
|
||||
std::vector<QString> orphaned_debugger_views;
|
||||
for (auto& [unique_name, widget] : m_widgets)
|
||||
{
|
||||
auto [controller, view] = DockUtils::dockWidgetFromName(unique_name);
|
||||
if (!controller || !view)
|
||||
{
|
||||
Console.Error("Debugger: Failed to restore dock widget '%s'.", unique_name.toStdString().c_str());
|
||||
orphaned_debugger_widgets.emplace_back(unique_name);
|
||||
orphaned_debugger_views.emplace_back(unique_name);
|
||||
}
|
||||
}
|
||||
|
||||
// Delete any debugger widgets that haven't been restored correctly.
|
||||
for (const QString& unique_name : orphaned_debugger_widgets)
|
||||
// Delete any debugger views that haven't been restored correctly.
|
||||
for (const QString& unique_name : orphaned_debugger_views)
|
||||
{
|
||||
auto widget_iterator = m_widgets.find(unique_name);
|
||||
pxAssert(widget_iterator != m_widgets.end());
|
||||
|
||||
setPrimaryDebuggerWidget(widget_iterator->second.get(), false);
|
||||
setPrimaryDebuggerView(widget_iterator->second.get(), false);
|
||||
delete widget_iterator->second.get();
|
||||
m_widgets.erase(widget_iterator);
|
||||
}
|
||||
@@ -262,7 +263,7 @@ void DockLayout::reset()
|
||||
delete widget;
|
||||
}
|
||||
|
||||
m_next_unique_name = 0;
|
||||
m_next_id = 0;
|
||||
m_toolbars.clear();
|
||||
m_widgets.clear();
|
||||
m_geometry.clear();
|
||||
@@ -273,18 +274,19 @@ void DockLayout::reset()
|
||||
|
||||
for (size_t i = 0; i < base_layout->widgets.size(); i++)
|
||||
{
|
||||
auto iterator = DockTables::DEBUGGER_WIDGETS.find(base_layout->widgets[i].type);
|
||||
pxAssertRel(iterator != DockTables::DEBUGGER_WIDGETS.end(), "Invalid default layout.");
|
||||
const DockTables::DebuggerWidgetDescription& dock_description = iterator->second;
|
||||
auto iterator = DockTables::DEBUGGER_VIEWS.find(base_layout->widgets[i].type);
|
||||
pxAssertRel(iterator != DockTables::DEBUGGER_VIEWS.end(), "Invalid default layout.");
|
||||
const DockTables::DebuggerViewDescription& dock_description = iterator->second;
|
||||
|
||||
DebuggerWidgetParameters parameters;
|
||||
parameters.unique_name = generateNewUniqueName(base_layout->widgets[i].type.c_str());
|
||||
DebuggerViewParameters parameters;
|
||||
std::tie(parameters.unique_name, parameters.id) =
|
||||
generateNewUniqueName(base_layout->widgets[i].type.c_str());
|
||||
parameters.cpu = &DebugInterface::get(m_cpu);
|
||||
|
||||
if (parameters.unique_name.isEmpty())
|
||||
continue;
|
||||
|
||||
DebuggerWidget* widget = dock_description.create_widget(parameters);
|
||||
DebuggerView* widget = dock_description.create_widget(parameters);
|
||||
widget->setPrimary(true);
|
||||
m_widgets.emplace(parameters.unique_name, widget);
|
||||
}
|
||||
@@ -299,7 +301,7 @@ KDDockWidgets::Core::DockWidget* DockLayout::createDockWidget(const QString& nam
|
||||
if (widget_iterator == m_widgets.end())
|
||||
return nullptr;
|
||||
|
||||
DebuggerWidget* widget = widget_iterator->second;
|
||||
DebuggerView* widget = widget_iterator->second;
|
||||
if (!widget)
|
||||
return nullptr;
|
||||
|
||||
@@ -317,20 +319,20 @@ void DockLayout::updateDockWidgetTitles()
|
||||
if (!m_is_active)
|
||||
return;
|
||||
|
||||
// Translate default debugger widget names.
|
||||
// Translate default debugger view names.
|
||||
for (auto& [unique_name, widget] : m_widgets)
|
||||
widget->retranslateDisplayName();
|
||||
|
||||
// Determine if any widgets have duplicate display names.
|
||||
std::map<QString, std::vector<DebuggerWidget*>> display_name_to_widgets;
|
||||
std::map<QString, std::vector<DebuggerView*>> display_name_to_widgets;
|
||||
for (auto& [unique_name, widget] : m_widgets)
|
||||
display_name_to_widgets[widget->displayNameWithoutSuffix()].emplace_back(widget.get());
|
||||
|
||||
for (auto& [display_name, widgets] : display_name_to_widgets)
|
||||
{
|
||||
std::sort(widgets.begin(), widgets.end(),
|
||||
[&](const DebuggerWidget* lhs, const DebuggerWidget* rhs) {
|
||||
return lhs->uniqueName() < rhs->uniqueName();
|
||||
[&](const DebuggerView* lhs, const DebuggerView* rhs) {
|
||||
return lhs->id() < rhs->id();
|
||||
});
|
||||
|
||||
for (size_t i = 0; i < widgets.size(); i++)
|
||||
@@ -343,7 +345,7 @@ void DockLayout::updateDockWidgetTitles()
|
||||
}
|
||||
}
|
||||
|
||||
// Propagate the new names from the debugger widgets to the dock widgets.
|
||||
// Propagate the new names from the debugger views to the dock widgets.
|
||||
for (auto& [unique_name, widget] : m_widgets)
|
||||
{
|
||||
auto [controller, view] = DockUtils::dockWidgetFromName(widget->uniqueName());
|
||||
@@ -354,17 +356,17 @@ void DockLayout::updateDockWidgetTitles()
|
||||
}
|
||||
}
|
||||
|
||||
const std::map<QString, QPointer<DebuggerWidget>>& DockLayout::debuggerWidgets()
|
||||
const std::map<QString, QPointer<DebuggerView>>& DockLayout::debuggerViews()
|
||||
{
|
||||
return m_widgets;
|
||||
}
|
||||
|
||||
bool DockLayout::hasDebuggerWidget(const QString& unique_name)
|
||||
bool DockLayout::hasDebuggerView(const QString& unique_name)
|
||||
{
|
||||
return m_widgets.find(unique_name) != m_widgets.end();
|
||||
}
|
||||
|
||||
size_t DockLayout::countDebuggerWidgetsOfType(const char* type)
|
||||
size_t DockLayout::countDebuggerViewsOfType(const char* type)
|
||||
{
|
||||
size_t count = 0;
|
||||
for (const auto& [unique_name, widget] : m_widgets)
|
||||
@@ -376,29 +378,29 @@ size_t DockLayout::countDebuggerWidgetsOfType(const char* type)
|
||||
return count;
|
||||
}
|
||||
|
||||
void DockLayout::createDebuggerWidget(const std::string& type)
|
||||
void DockLayout::createDebuggerView(const std::string& type)
|
||||
{
|
||||
pxAssert(m_is_active);
|
||||
|
||||
if (!g_debugger_window)
|
||||
return;
|
||||
|
||||
auto description_iterator = DockTables::DEBUGGER_WIDGETS.find(type);
|
||||
pxAssert(description_iterator != DockTables::DEBUGGER_WIDGETS.end());
|
||||
auto description_iterator = DockTables::DEBUGGER_VIEWS.find(type);
|
||||
pxAssert(description_iterator != DockTables::DEBUGGER_VIEWS.end());
|
||||
|
||||
const DockTables::DebuggerWidgetDescription& description = description_iterator->second;
|
||||
const DockTables::DebuggerViewDescription& description = description_iterator->second;
|
||||
|
||||
DebuggerWidgetParameters parameters;
|
||||
parameters.unique_name = generateNewUniqueName(type.c_str());
|
||||
DebuggerViewParameters parameters;
|
||||
std::tie(parameters.unique_name, parameters.id) = generateNewUniqueName(type.c_str());
|
||||
parameters.cpu = &DebugInterface::get(m_cpu);
|
||||
|
||||
if (parameters.unique_name.isEmpty())
|
||||
return;
|
||||
|
||||
DebuggerWidget* widget = description.create_widget(parameters);
|
||||
DebuggerView* widget = description.create_widget(parameters);
|
||||
m_widgets.emplace(parameters.unique_name, widget);
|
||||
|
||||
setPrimaryDebuggerWidget(widget, countDebuggerWidgetsOfType(type.c_str()) == 0);
|
||||
setPrimaryDebuggerView(widget, countDebuggerViewsOfType(type.c_str()) == 0);
|
||||
|
||||
auto view = static_cast<KDDockWidgets::QtWidgets::DockWidget*>(
|
||||
KDDockWidgets::Config::self().viewFactory()->createDockWidget(widget->uniqueName()));
|
||||
@@ -411,55 +413,56 @@ void DockLayout::createDebuggerWidget(const std::string& type)
|
||||
updateDockWidgetTitles();
|
||||
}
|
||||
|
||||
void DockLayout::recreateDebuggerWidget(const QString& unique_name)
|
||||
void DockLayout::recreateDebuggerView(const QString& unique_name)
|
||||
{
|
||||
if (!g_debugger_window)
|
||||
return;
|
||||
|
||||
auto debugger_widget_iterator = m_widgets.find(unique_name);
|
||||
pxAssert(debugger_widget_iterator != m_widgets.end());
|
||||
auto debugger_view_iterator = m_widgets.find(unique_name);
|
||||
pxAssert(debugger_view_iterator != m_widgets.end());
|
||||
|
||||
DebuggerWidget* old_debugger_widget = debugger_widget_iterator->second;
|
||||
DebuggerView* old_debugger_view = debugger_view_iterator->second;
|
||||
|
||||
auto description_iterator = DockTables::DEBUGGER_WIDGETS.find(old_debugger_widget->metaObject()->className());
|
||||
pxAssert(description_iterator != DockTables::DEBUGGER_WIDGETS.end());
|
||||
auto description_iterator = DockTables::DEBUGGER_VIEWS.find(old_debugger_view->metaObject()->className());
|
||||
pxAssert(description_iterator != DockTables::DEBUGGER_VIEWS.end());
|
||||
|
||||
const DockTables::DebuggerWidgetDescription& description = description_iterator->second;
|
||||
const DockTables::DebuggerViewDescription& description = description_iterator->second;
|
||||
|
||||
DebuggerWidgetParameters parameters;
|
||||
parameters.unique_name = old_debugger_widget->uniqueName();
|
||||
DebuggerViewParameters parameters;
|
||||
parameters.unique_name = old_debugger_view->uniqueName();
|
||||
parameters.id = old_debugger_view->id();
|
||||
parameters.cpu = &DebugInterface::get(m_cpu);
|
||||
parameters.cpu_override = old_debugger_widget->cpuOverride();
|
||||
parameters.cpu_override = old_debugger_view->cpuOverride();
|
||||
|
||||
DebuggerWidget* new_debugger_widget = description.create_widget(parameters);
|
||||
new_debugger_widget->setCustomDisplayName(old_debugger_widget->customDisplayName());
|
||||
new_debugger_widget->setPrimary(old_debugger_widget->isPrimary());
|
||||
debugger_widget_iterator->second = new_debugger_widget;
|
||||
DebuggerView* new_debugger_view = description.create_widget(parameters);
|
||||
new_debugger_view->setCustomDisplayName(old_debugger_view->customDisplayName());
|
||||
new_debugger_view->setPrimary(old_debugger_view->isPrimary());
|
||||
debugger_view_iterator->second = new_debugger_view;
|
||||
|
||||
if (m_is_active)
|
||||
{
|
||||
auto [controller, view] = DockUtils::dockWidgetFromName(unique_name);
|
||||
if (view)
|
||||
view->setWidget(new_debugger_widget);
|
||||
view->setWidget(new_debugger_view);
|
||||
}
|
||||
|
||||
delete old_debugger_widget;
|
||||
delete old_debugger_view;
|
||||
}
|
||||
|
||||
void DockLayout::destroyDebuggerWidget(const QString& unique_name)
|
||||
void DockLayout::destroyDebuggerView(const QString& unique_name)
|
||||
{
|
||||
pxAssert(m_is_active);
|
||||
|
||||
if (!g_debugger_window)
|
||||
return;
|
||||
|
||||
auto debugger_widget_iterator = m_widgets.find(unique_name);
|
||||
if (debugger_widget_iterator == m_widgets.end())
|
||||
auto debugger_view_iterator = m_widgets.find(unique_name);
|
||||
if (debugger_view_iterator == m_widgets.end())
|
||||
return;
|
||||
|
||||
setPrimaryDebuggerWidget(debugger_widget_iterator->second.get(), false);
|
||||
delete debugger_widget_iterator->second.get();
|
||||
m_widgets.erase(debugger_widget_iterator);
|
||||
setPrimaryDebuggerView(debugger_view_iterator->second.get(), false);
|
||||
delete debugger_view_iterator->second.get();
|
||||
m_widgets.erase(debugger_view_iterator);
|
||||
|
||||
auto [controller, view] = DockUtils::dockWidgetFromName(unique_name);
|
||||
if (!controller)
|
||||
@@ -470,7 +473,7 @@ void DockLayout::destroyDebuggerWidget(const QString& unique_name)
|
||||
updateDockWidgetTitles();
|
||||
}
|
||||
|
||||
void DockLayout::setPrimaryDebuggerWidget(DebuggerWidget* widget, bool is_primary)
|
||||
void DockLayout::setPrimaryDebuggerView(DebuggerView* widget, bool is_primary)
|
||||
{
|
||||
bool present = false;
|
||||
for (auto& [unique_name, test_widget] : m_widgets)
|
||||
@@ -545,24 +548,22 @@ bool DockLayout::save(DockLayout::Index layout_index)
|
||||
rapidjson::Document geometry;
|
||||
|
||||
const char* cpu_name = DebugInterface::cpuName(m_cpu);
|
||||
const std::string& default_layouts_hash = DockTables::hashDefaultLayouts();
|
||||
u32 default_layout_hash = DockTables::hashDefaultLayouts();
|
||||
|
||||
rapidjson::Value format;
|
||||
format.SetString(DEBUGGER_LAYOUT_FILE_FORMAT, strlen(DEBUGGER_LAYOUT_FILE_FORMAT));
|
||||
json.AddMember("format", format, json.GetAllocator());
|
||||
|
||||
json.AddMember("version_major", DEBUGGER_LAYOUT_FILE_VERSION_MAJOR, json.GetAllocator());
|
||||
json.AddMember("version_minor", DEBUGGER_LAYOUT_FILE_VERSION_MINOR, json.GetAllocator());
|
||||
rapidjson::Value version_hash;
|
||||
version_hash.SetString(default_layouts_hash.c_str(), default_layouts_hash.size());
|
||||
json.AddMember("version_hash", version_hash, json.GetAllocator());
|
||||
json.AddMember("versionMajor", DEBUGGER_LAYOUT_FILE_VERSION_MAJOR, json.GetAllocator());
|
||||
json.AddMember("versionMinor", DEBUGGER_LAYOUT_FILE_VERSION_MINOR, json.GetAllocator());
|
||||
json.AddMember("defaultLayoutHash", default_layout_hash, json.GetAllocator());
|
||||
|
||||
std::string name_str = m_name.toStdString();
|
||||
json.AddMember("name", rapidjson::Value().SetString(name_str.c_str(), name_str.size()), json.GetAllocator());
|
||||
json.AddMember("target", rapidjson::Value().SetString(cpu_name, strlen(cpu_name)), json.GetAllocator());
|
||||
json.AddMember("index", static_cast<int>(layout_index), json.GetAllocator());
|
||||
json.AddMember("isDefault", m_is_default, json.GetAllocator());
|
||||
json.AddMember("nextUniqueName", m_next_unique_name, json.GetAllocator());
|
||||
json.AddMember("nextId", m_next_id, json.GetAllocator());
|
||||
|
||||
if (!m_base_layout.empty())
|
||||
{
|
||||
@@ -579,7 +580,7 @@ bool DockLayout::save(DockLayout::Index layout_index)
|
||||
json.AddMember("toolbars", toolbars, json.GetAllocator());
|
||||
}
|
||||
|
||||
rapidjson::Value widgets(rapidjson::kArrayType);
|
||||
rapidjson::Value dock_widgets(rapidjson::kArrayType);
|
||||
for (auto& [unique_name, widget] : m_widgets)
|
||||
{
|
||||
pxAssert(widget.get());
|
||||
@@ -590,6 +591,7 @@ bool DockLayout::save(DockLayout::Index layout_index)
|
||||
rapidjson::Value name;
|
||||
name.SetString(name_str.c_str(), name_str.size(), json.GetAllocator());
|
||||
object.AddMember("uniqueName", name, json.GetAllocator());
|
||||
object.AddMember("id", widget->id(), json.GetAllocator());
|
||||
|
||||
const char* type_str = widget->metaObject()->className();
|
||||
rapidjson::Value type;
|
||||
@@ -608,9 +610,9 @@ bool DockLayout::save(DockLayout::Index layout_index)
|
||||
JsonValueWrapper wrapper(object, json.GetAllocator());
|
||||
widget->toJson(wrapper);
|
||||
|
||||
widgets.PushBack(object, json.GetAllocator());
|
||||
dock_widgets.PushBack(object, json.GetAllocator());
|
||||
}
|
||||
json.AddMember("widgets", widgets, json.GetAllocator());
|
||||
json.AddMember("dockWidgets", dock_widgets, json.GetAllocator());
|
||||
|
||||
if (!m_geometry.isEmpty() && !geometry.Parse(m_geometry).HasParseError())
|
||||
json.AddMember("geometry", geometry, json.GetAllocator());
|
||||
@@ -687,11 +689,11 @@ void DockLayout::load(
|
||||
return;
|
||||
}
|
||||
|
||||
auto version_major = json.FindMember("version_major");
|
||||
auto version_major = json.FindMember("versionMajor");
|
||||
if (version_major == json.MemberEnd() || !version_major->value.IsInt())
|
||||
{
|
||||
Console.Error("Debugger: Layout file '%s' has missing or invalid 'version_major' property.", path.c_str());
|
||||
result = INVALID_FORMAT;
|
||||
Console.Error("Debugger: Layout file '%s' has missing or invalid 'versionMajor' property.", path.c_str());
|
||||
result = MAJOR_VERSION_MISMATCH;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -701,23 +703,23 @@ void DockLayout::load(
|
||||
return;
|
||||
}
|
||||
|
||||
auto version_minor = json.FindMember("version_minor");
|
||||
auto version_minor = json.FindMember("versionMinor");
|
||||
if (version_minor == json.MemberEnd() || !version_minor->value.IsInt())
|
||||
{
|
||||
Console.Error("Debugger: Layout file '%s' has missing or invalid 'version_minor' property.", path.c_str());
|
||||
result = INVALID_FORMAT;
|
||||
Console.Error("Debugger: Layout file '%s' has missing or invalid 'versionMinor' property.", path.c_str());
|
||||
result = MAJOR_VERSION_MISMATCH;
|
||||
return;
|
||||
}
|
||||
|
||||
auto version_hash = json.FindMember("version_hash");
|
||||
if (version_hash == json.MemberEnd() || !version_hash->value.IsString())
|
||||
auto default_layout_hash = json.FindMember("defaultLayoutHash");
|
||||
if (default_layout_hash == json.MemberEnd() || !default_layout_hash->value.IsUint())
|
||||
{
|
||||
Console.Error("Debugger: Layout file '%s' has missing or invalid 'version_hash' property.", path.c_str());
|
||||
result = INVALID_FORMAT;
|
||||
Console.Error("Debugger: Layout file '%s' has missing or invalid 'defaultLayoutHash' property.", path.c_str());
|
||||
result = MAJOR_VERSION_MISMATCH;
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(version_hash->value.GetString(), DockTables::hashDefaultLayouts().c_str()) != 0)
|
||||
if (default_layout_hash->value.GetUint() != DockTables::hashDefaultLayouts())
|
||||
result = DEFAULT_LAYOUT_HASH_MISMATCH;
|
||||
|
||||
auto name = json.FindMember("name");
|
||||
@@ -745,9 +747,9 @@ void DockLayout::load(
|
||||
if (is_default != json.MemberEnd() && is_default->value.IsBool())
|
||||
m_is_default = is_default->value.GetBool();
|
||||
|
||||
auto next_unique_name = json.FindMember("nextUniqueName");
|
||||
if (next_unique_name != json.MemberBegin() && next_unique_name->value.IsInt())
|
||||
m_next_unique_name = next_unique_name->value.GetInt();
|
||||
auto next_id = json.FindMember("nextId");
|
||||
if (next_id != json.MemberBegin() && next_id->value.IsUint64())
|
||||
m_next_id = next_id->value.GetUint64();
|
||||
|
||||
auto base_layout = json.FindMember("baseLayout");
|
||||
if (base_layout != json.MemberEnd() && base_layout->value.IsString())
|
||||
@@ -757,15 +759,19 @@ void DockLayout::load(
|
||||
if (toolbars != json.MemberEnd() && toolbars->value.IsString())
|
||||
m_toolbars = QByteArray::fromBase64(toolbars->value.GetString());
|
||||
|
||||
auto widgets = json.FindMember("widgets");
|
||||
if (widgets != json.MemberEnd() && widgets->value.IsArray())
|
||||
auto dock_widgets = json.FindMember("dockWidgets");
|
||||
if (dock_widgets != json.MemberEnd() && dock_widgets->value.IsArray())
|
||||
{
|
||||
for (rapidjson::Value& object : widgets->value.GetArray())
|
||||
for (rapidjson::Value& object : dock_widgets->value.GetArray())
|
||||
{
|
||||
auto unique_name = object.FindMember("uniqueName");
|
||||
if (unique_name == object.MemberEnd() || !unique_name->value.IsString())
|
||||
continue;
|
||||
|
||||
auto id = object.FindMember("id");
|
||||
if (id == object.MemberEnd() || !id->value.IsUint64())
|
||||
continue;
|
||||
|
||||
auto widgets_iterator = m_widgets.find(unique_name->value.GetString());
|
||||
if (widgets_iterator != m_widgets.end())
|
||||
continue;
|
||||
@@ -774,8 +780,8 @@ void DockLayout::load(
|
||||
if (type == object.MemberEnd() || !type->value.IsString())
|
||||
continue;
|
||||
|
||||
auto description = DockTables::DEBUGGER_WIDGETS.find(type->value.GetString());
|
||||
if (description == DockTables::DEBUGGER_WIDGETS.end())
|
||||
auto description = DockTables::DEBUGGER_VIEWS.find(type->value.GetString());
|
||||
if (description == DockTables::DEBUGGER_VIEWS.end())
|
||||
continue;
|
||||
|
||||
std::optional<BreakPointCpu> cpu_override;
|
||||
@@ -788,12 +794,13 @@ void DockLayout::load(
|
||||
cpu_override = cpu;
|
||||
}
|
||||
|
||||
DebuggerWidgetParameters parameters;
|
||||
DebuggerViewParameters parameters;
|
||||
parameters.unique_name = unique_name->value.GetString();
|
||||
parameters.id = id->value.GetUint64();
|
||||
parameters.cpu = &DebugInterface::get(m_cpu);
|
||||
parameters.cpu_override = cpu_override;
|
||||
|
||||
DebuggerWidget* widget = description->second.create_widget(parameters);
|
||||
DebuggerView* widget = description->second.create_widget(parameters);
|
||||
|
||||
JsonValueWrapper wrapper(object, json.GetAllocator());
|
||||
if (!widget->fromJson(wrapper))
|
||||
@@ -818,12 +825,12 @@ void DockLayout::load(
|
||||
|
||||
m_layout_file_path = path;
|
||||
|
||||
validatePrimaryDebuggerWidgets();
|
||||
validatePrimaryDebuggerViews();
|
||||
}
|
||||
|
||||
void DockLayout::validatePrimaryDebuggerWidgets()
|
||||
void DockLayout::validatePrimaryDebuggerViews()
|
||||
{
|
||||
std::map<std::string, std::vector<DebuggerWidget*>> type_to_widgets;
|
||||
std::map<std::string, std::vector<DebuggerView*>> type_to_widgets;
|
||||
for (const auto& [unique_name, widget] : m_widgets)
|
||||
type_to_widgets[widget->metaObject()->className()].emplace_back(widget.get());
|
||||
|
||||
@@ -832,7 +839,7 @@ void DockLayout::validatePrimaryDebuggerWidgets()
|
||||
u32 primary_widgets = 0;
|
||||
|
||||
// Make sure at most one widget is marked as primary.
|
||||
for (DebuggerWidget* widget : widgets)
|
||||
for (DebuggerView* widget : widgets)
|
||||
{
|
||||
if (widget->isPrimary())
|
||||
{
|
||||
@@ -868,7 +875,7 @@ void DockLayout::setupDefaultLayout()
|
||||
const DockTables::DefaultDockGroupDescription& group =
|
||||
base_layout->groups[static_cast<u32>(dock_description.group)];
|
||||
|
||||
DebuggerWidget* widget = nullptr;
|
||||
DebuggerView* widget = nullptr;
|
||||
for (auto& [unique_name, test_widget] : m_widgets)
|
||||
if (test_widget->metaObject()->className() == dock_description.type)
|
||||
widget = test_widget;
|
||||
@@ -900,19 +907,20 @@ void DockLayout::setupDefaultLayout()
|
||||
group->setCurrentTabIndex(0);
|
||||
}
|
||||
|
||||
QString DockLayout::generateNewUniqueName(const char* type)
|
||||
std::pair<QString, u64> DockLayout::generateNewUniqueName(const char* type)
|
||||
{
|
||||
QString name;
|
||||
u64 id;
|
||||
|
||||
do
|
||||
{
|
||||
if (m_next_unique_name == INT_MAX)
|
||||
return QString();
|
||||
if (m_next_id == INT_MAX)
|
||||
return {QString(), 0};
|
||||
|
||||
// Produce unique names that will lexicographically sort in the order
|
||||
// they were allocated. This ensures the #1, #2, etc suffixes for dock
|
||||
// widgets with conflicting names will be assigned in the correct order.
|
||||
name = QStringLiteral("%1-%2").arg(m_next_unique_name, 16, 10, QLatin1Char('0')).arg(type);
|
||||
m_next_unique_name++;
|
||||
} while (hasDebuggerWidget(name));
|
||||
return name;
|
||||
id = m_next_id;
|
||||
name = QStringLiteral("%1-%2").arg(type).arg(static_cast<qulonglong>(m_next_id));
|
||||
m_next_id++;
|
||||
} while (hasDebuggerView(name));
|
||||
|
||||
return {name, id};
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
class DebuggerWidget;
|
||||
class DebuggerView;
|
||||
class DebuggerWindow;
|
||||
|
||||
extern const char* DEBUGGER_LAYOUT_FILE_FORMAT;
|
||||
@@ -97,13 +97,13 @@ public:
|
||||
KDDockWidgets::Core::DockWidget* createDockWidget(const QString& name);
|
||||
void updateDockWidgetTitles();
|
||||
|
||||
const std::map<QString, QPointer<DebuggerWidget>>& debuggerWidgets();
|
||||
bool hasDebuggerWidget(const QString& unique_name);
|
||||
size_t countDebuggerWidgetsOfType(const char* type);
|
||||
void createDebuggerWidget(const std::string& type);
|
||||
void recreateDebuggerWidget(const QString& unique_name);
|
||||
void destroyDebuggerWidget(const QString& unique_name);
|
||||
void setPrimaryDebuggerWidget(DebuggerWidget* widget, bool is_primary);
|
||||
const std::map<QString, QPointer<DebuggerView>>& debuggerViews();
|
||||
bool hasDebuggerView(const QString& unique_name);
|
||||
size_t countDebuggerViewsOfType(const char* type);
|
||||
void createDebuggerView(const std::string& type);
|
||||
void recreateDebuggerView(const QString& unique_name);
|
||||
void destroyDebuggerView(const QString& unique_name);
|
||||
void setPrimaryDebuggerView(DebuggerView* widget, bool is_primary);
|
||||
|
||||
void deleteFile();
|
||||
|
||||
@@ -115,12 +115,12 @@ private:
|
||||
DockLayout::LoadResult& result,
|
||||
DockLayout::Index& index_last_session);
|
||||
|
||||
// Make sure there is only a single primary debugger widget of each type.
|
||||
void validatePrimaryDebuggerWidgets();
|
||||
// Make sure there is only a single primary debugger view of each type.
|
||||
void validatePrimaryDebuggerViews();
|
||||
|
||||
void setupDefaultLayout();
|
||||
|
||||
QString generateNewUniqueName(const char* type);
|
||||
std::pair<QString, u64> generateNewUniqueName(const char* type);
|
||||
|
||||
// The name displayed in the user interface. Also used to determine the
|
||||
// file name for the layout file.
|
||||
@@ -134,7 +134,7 @@ private:
|
||||
bool m_is_default = false;
|
||||
|
||||
// A counter used to generate new unique names for dock widgets.
|
||||
int m_next_unique_name = 0;
|
||||
u64 m_next_id = 0;
|
||||
|
||||
// The name of the default layout which this layout was based on. This will
|
||||
// be used if the m_geometry variable above is empty.
|
||||
@@ -147,7 +147,7 @@ private:
|
||||
// All the dock widgets currently open in this layout. If this is the active
|
||||
// layout then these will be owned by the docking system, otherwise they
|
||||
// won't be and will need to be cleaned up separately.
|
||||
std::map<QString, QPointer<DebuggerWidget>> m_widgets;
|
||||
std::map<QString, QPointer<DebuggerView>> m_widgets;
|
||||
|
||||
// The geometry of all the dock widgets, converted to JSON by the
|
||||
// LayoutSaver class from KDDockWidgets.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "DockManager.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
#include "Debugger/DebuggerWindow.h"
|
||||
#include "Debugger/Docking/DockTables.h"
|
||||
#include "Debugger/Docking/DockViews.h"
|
||||
@@ -25,7 +25,8 @@
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QtTranslation>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <QtWidgets/QPushButton>
|
||||
#include <QtWidgets/QProxyStyle>
|
||||
#include <QtWidgets/QStyleFactory>
|
||||
|
||||
DockManager::DockManager(QObject* parent)
|
||||
: QObject(parent)
|
||||
@@ -33,9 +34,6 @@ DockManager::DockManager(QObject* parent)
|
||||
QTimer* autosave_timer = new QTimer(this);
|
||||
connect(autosave_timer, &QTimer::timeout, this, &DockManager::saveCurrentLayout);
|
||||
autosave_timer->start(60 * 1000);
|
||||
|
||||
m_blink_timer = new QTimer(this);
|
||||
connect(m_blink_timer, &QTimer::timeout, this, &DockManager::layoutSwitcherUpdateBlink);
|
||||
}
|
||||
|
||||
void DockManager::configureDockingSystem()
|
||||
@@ -144,17 +142,13 @@ void DockManager::switchToLayout(DockLayout::Index layout_index, bool blink_tab)
|
||||
layout.thaw();
|
||||
|
||||
int tab_index = static_cast<int>(layout_index);
|
||||
if (m_switcher && tab_index >= 0 && tab_index < m_plus_tab_index)
|
||||
{
|
||||
m_ignore_current_tab_changed = true;
|
||||
m_switcher->setCurrentIndex(tab_index);
|
||||
m_ignore_current_tab_changed = false;
|
||||
}
|
||||
if (m_menu_bar && tab_index >= 0)
|
||||
m_menu_bar->onCurrentLayoutChanged(layout_index);
|
||||
}
|
||||
}
|
||||
|
||||
if (blink_tab)
|
||||
layoutSwitcherStartBlink();
|
||||
m_menu_bar->startBlink(m_current_layout);
|
||||
}
|
||||
|
||||
bool DockManager::switchToLayoutWithCPU(BreakPointCpu cpu, bool blink_tab)
|
||||
@@ -191,7 +185,6 @@ void DockManager::loadLayouts()
|
||||
&files);
|
||||
|
||||
bool needs_reset = false;
|
||||
bool order_changed = false;
|
||||
std::vector<DockLayout::Index> indices_last_session;
|
||||
|
||||
for (const FILESYSTEM_FIND_DATA& ffd : files)
|
||||
@@ -240,29 +233,30 @@ void DockManager::loadLayouts()
|
||||
layout.save(index);
|
||||
}
|
||||
|
||||
if (index_last_session != index)
|
||||
order_changed = true;
|
||||
|
||||
indices_last_session.emplace_back(index_last_session);
|
||||
}
|
||||
|
||||
// Make sure the layouts remain in the same order they were in previously.
|
||||
std::vector<DockLayout*> layout_pointers;
|
||||
for (DockLayout& layout : m_layouts)
|
||||
layout_pointers.emplace_back(&layout);
|
||||
std::vector<size_t> layout_indices;
|
||||
for (size_t i = 0; i < m_layouts.size(); i++)
|
||||
layout_indices.emplace_back(i);
|
||||
|
||||
std::sort(layout_pointers.begin(), layout_pointers.end(),
|
||||
[this, &indices_last_session](const DockLayout* lhs, const DockLayout* rhs) {
|
||||
size_t lhs_index = lhs - m_layouts.data();
|
||||
size_t rhs_index = rhs - m_layouts.data();
|
||||
DockLayout::Index lhs_index_last_session = indices_last_session.at(lhs_index);
|
||||
DockLayout::Index rhs_index_last_session = indices_last_session.at(rhs_index);
|
||||
std::sort(layout_indices.begin(), layout_indices.end(),
|
||||
[&indices_last_session](size_t lhs, size_t rhs) {
|
||||
DockLayout::Index lhs_index_last_session = indices_last_session.at(lhs);
|
||||
DockLayout::Index rhs_index_last_session = indices_last_session.at(rhs);
|
||||
return lhs_index_last_session < rhs_index_last_session;
|
||||
});
|
||||
|
||||
bool order_changed = false;
|
||||
std::vector<DockLayout> sorted_layouts;
|
||||
for (size_t i = 0; i < layout_pointers.size(); i++)
|
||||
sorted_layouts.emplace_back(std::move(*layout_pointers[i]));
|
||||
for (size_t i = 0; i < layout_indices.size(); i++)
|
||||
{
|
||||
if (i != indices_last_session[layout_indices[i]])
|
||||
order_changed = true;
|
||||
|
||||
sorted_layouts.emplace_back(std::move(m_layouts[layout_indices[i]]));
|
||||
}
|
||||
|
||||
m_layouts = std::move(sorted_layouts);
|
||||
|
||||
@@ -365,9 +359,9 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
// be opened.
|
||||
QMenu* add_another_menu = menu->addMenu(tr("Add Another..."));
|
||||
|
||||
std::vector<DebuggerWidget*> add_another_widgets;
|
||||
std::vector<DebuggerView*> add_another_widgets;
|
||||
std::set<std::string> add_another_types;
|
||||
for (const auto& [unique_name, widget] : layout.debuggerWidgets())
|
||||
for (const auto& [unique_name, widget] : layout.debuggerViews())
|
||||
{
|
||||
std::string type = widget->metaObject()->className();
|
||||
|
||||
@@ -379,26 +373,26 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
}
|
||||
|
||||
std::sort(add_another_widgets.begin(), add_another_widgets.end(),
|
||||
[](const DebuggerWidget* lhs, const DebuggerWidget* rhs) {
|
||||
[](const DebuggerView* lhs, const DebuggerView* rhs) {
|
||||
if (lhs->displayNameWithoutSuffix() == rhs->displayNameWithoutSuffix())
|
||||
return lhs->displayNameSuffixNumber() < rhs->displayNameSuffixNumber();
|
||||
|
||||
return lhs->displayNameWithoutSuffix() < rhs->displayNameWithoutSuffix();
|
||||
});
|
||||
|
||||
for (DebuggerWidget* widget : add_another_widgets)
|
||||
for (DebuggerView* widget : add_another_widgets)
|
||||
{
|
||||
const char* type = widget->metaObject()->className();
|
||||
|
||||
const auto description_iterator = DockTables::DEBUGGER_WIDGETS.find(type);
|
||||
pxAssert(description_iterator != DockTables::DEBUGGER_WIDGETS.end());
|
||||
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);
|
||||
connect(action, &QAction::triggered, this, [this, type]() {
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_layouts.at(m_current_layout).createDebuggerWidget(type);
|
||||
m_layouts.at(m_current_layout).createDebuggerView(type);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -407,18 +401,18 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
struct DebuggerWidgetToggle
|
||||
struct DebuggerViewToggle
|
||||
{
|
||||
QString display_name;
|
||||
std::optional<int> suffix_number;
|
||||
QAction* action;
|
||||
};
|
||||
|
||||
std::vector<DebuggerWidgetToggle> toggles;
|
||||
std::vector<DebuggerViewToggle> toggles;
|
||||
std::set<std::string> toggle_types;
|
||||
|
||||
// Create a menu item for each open debugger widget.
|
||||
for (const auto& [unique_name, widget] : layout.debuggerWidgets())
|
||||
// Create a menu item for each open debugger view.
|
||||
for (const auto& [unique_name, widget] : layout.debuggerViews())
|
||||
{
|
||||
QAction* action = new QAction(menu);
|
||||
action->setText(widget->displayName());
|
||||
@@ -428,10 +422,10 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_layouts.at(m_current_layout).destroyDebuggerWidget(unique_name);
|
||||
m_layouts.at(m_current_layout).destroyDebuggerView(unique_name);
|
||||
});
|
||||
|
||||
DebuggerWidgetToggle& toggle = toggles.emplace_back();
|
||||
DebuggerViewToggle& toggle = toggles.emplace_back();
|
||||
toggle.display_name = widget->displayNameWithoutSuffix();
|
||||
toggle.suffix_number = widget->displayNameSuffixNumber();
|
||||
toggle.action = action;
|
||||
@@ -439,12 +433,12 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
toggle_types.emplace(widget->metaObject()->className());
|
||||
}
|
||||
|
||||
// Create menu items to open debugger widgets without any open instances.
|
||||
for (const auto& [type, desc] : DockTables::DEBUGGER_WIDGETS)
|
||||
// Create menu items to open debugger views without any open instances.
|
||||
for (const auto& [type, desc] : DockTables::DEBUGGER_VIEWS)
|
||||
{
|
||||
if (!toggle_types.contains(type))
|
||||
{
|
||||
QString display_name = QCoreApplication::translate("DebuggerWidget", desc.display_name);
|
||||
QString display_name = QCoreApplication::translate("DebuggerView", desc.display_name);
|
||||
|
||||
QAction* action = new QAction(menu);
|
||||
action->setText(display_name);
|
||||
@@ -454,10 +448,10 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_layouts.at(m_current_layout).createDebuggerWidget(type);
|
||||
m_layouts.at(m_current_layout).createDebuggerView(type);
|
||||
});
|
||||
|
||||
DebuggerWidgetToggle& toggle = toggles.emplace_back();
|
||||
DebuggerViewToggle& toggle = toggles.emplace_back();
|
||||
toggle.display_name = display_name;
|
||||
toggle.suffix_number = std::nullopt;
|
||||
toggle.action = action;
|
||||
@@ -465,179 +459,206 @@ void DockManager::createWindowsMenu(QMenu* menu)
|
||||
}
|
||||
|
||||
std::sort(toggles.begin(), toggles.end(),
|
||||
[](const DebuggerWidgetToggle& lhs, const DebuggerWidgetToggle& rhs) {
|
||||
[](const DebuggerViewToggle& lhs, const DebuggerViewToggle& rhs) {
|
||||
if (lhs.display_name == rhs.display_name)
|
||||
return lhs.suffix_number < rhs.suffix_number;
|
||||
|
||||
return lhs.display_name < rhs.display_name;
|
||||
});
|
||||
|
||||
for (const DebuggerWidgetToggle& toggle : toggles)
|
||||
for (const DebuggerViewToggle& toggle : toggles)
|
||||
menu->addAction(toggle.action);
|
||||
}
|
||||
|
||||
QWidget* DockManager::createLayoutSwitcher(QWidget* menu_bar)
|
||||
QWidget* DockManager::createMenuBar(QWidget* original_menu_bar)
|
||||
{
|
||||
QWidget* container = new QWidget;
|
||||
pxAssert(!m_menu_bar);
|
||||
|
||||
QHBoxLayout* layout = new QHBoxLayout;
|
||||
layout->setContentsMargins(0, 2, 2, 0);
|
||||
container->setLayout(layout);
|
||||
m_menu_bar = new DockMenuBar(original_menu_bar);
|
||||
|
||||
QWidget* menu_wrapper = new QWidget;
|
||||
menu_wrapper->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
|
||||
layout->addWidget(menu_wrapper);
|
||||
connect(m_menu_bar, &DockMenuBar::currentLayoutChanged, this, [this](DockLayout::Index layout_index) {
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
QHBoxLayout* menu_layout = new QHBoxLayout;
|
||||
menu_layout->setContentsMargins(0, 4, 0, 4);
|
||||
menu_wrapper->setLayout(menu_layout);
|
||||
|
||||
menu_layout->addWidget(menu_bar);
|
||||
|
||||
m_switcher = new QTabBar;
|
||||
m_switcher->setContentsMargins(0, 0, 0, 0);
|
||||
m_switcher->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
|
||||
m_switcher->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
m_switcher->setMovable(true);
|
||||
layout->addWidget(m_switcher);
|
||||
switchToLayout(layout_index);
|
||||
});
|
||||
connect(m_menu_bar, &DockMenuBar::newButtonClicked, this, &DockManager::newLayoutClicked);
|
||||
connect(m_menu_bar, &DockMenuBar::layoutMoved, this, &DockManager::layoutSwitcherTabMoved);
|
||||
connect(m_menu_bar, &DockMenuBar::lockButtonToggled, this, &DockManager::setLayoutLockedAndSaveSetting);
|
||||
connect(m_menu_bar, &DockMenuBar::layoutSwitcherContextMenuRequested,
|
||||
this, &DockManager::openLayoutSwitcherContextMenu);
|
||||
|
||||
updateLayoutSwitcher();
|
||||
|
||||
connect(m_switcher, &QTabBar::tabMoved, this, &DockManager::layoutSwitcherTabMoved);
|
||||
connect(m_switcher, &QTabBar::customContextMenuRequested, this, &DockManager::layoutSwitcherContextMenu);
|
||||
|
||||
QWidget* spacer = new QWidget;
|
||||
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
layout->addWidget(spacer);
|
||||
|
||||
bool layout_locked = Host::GetBaseBoolSettingValue("Debugger/UserInterface", "LayoutLocked", true);
|
||||
setLayoutLocked(layout_locked, false);
|
||||
|
||||
QPushButton* lock_layout_toggle = new QPushButton;
|
||||
lock_layout_toggle->setCheckable(true);
|
||||
lock_layout_toggle->setChecked(layout_locked);
|
||||
lock_layout_toggle->setFlat(true);
|
||||
connect(lock_layout_toggle, &QPushButton::toggled, this, [this, lock_layout_toggle](bool checked) {
|
||||
setLayoutLocked(checked, lock_layout_toggle, true);
|
||||
});
|
||||
layout->addWidget(lock_layout_toggle);
|
||||
|
||||
setLayoutLocked(layout_locked, lock_layout_toggle, false);
|
||||
|
||||
return container;
|
||||
return m_menu_bar;
|
||||
}
|
||||
|
||||
void DockManager::updateLayoutSwitcher()
|
||||
{
|
||||
if (!m_switcher)
|
||||
return;
|
||||
|
||||
disconnect(m_tab_connection);
|
||||
|
||||
for (int i = m_switcher->count(); i > 0; i--)
|
||||
m_switcher->removeTab(i - 1);
|
||||
|
||||
for (DockLayout& layout : m_layouts)
|
||||
{
|
||||
const char* cpu_name = DebugInterface::cpuName(layout.cpu());
|
||||
QString tab_name = QString("%1 (%2)").arg(layout.name()).arg(cpu_name);
|
||||
m_switcher->addTab(tab_name);
|
||||
}
|
||||
|
||||
m_plus_tab_index = m_switcher->addTab("+");
|
||||
m_current_tab_index = m_current_layout;
|
||||
|
||||
if (m_current_layout != DockLayout::INVALID_INDEX)
|
||||
m_switcher->setCurrentIndex(m_current_layout);
|
||||
|
||||
// If we don't have any layouts, the currently selected tab will never be
|
||||
// changed, so we respond to all clicks instead.
|
||||
if (!m_layouts.empty())
|
||||
m_tab_connection = connect(m_switcher, &QTabBar::currentChanged, this, &DockManager::layoutSwitcherTabChanged);
|
||||
else
|
||||
m_tab_connection = connect(m_switcher, &QTabBar::tabBarClicked, this, &DockManager::layoutSwitcherTabChanged);
|
||||
|
||||
layoutSwitcherStopBlink();
|
||||
if (m_menu_bar)
|
||||
m_menu_bar->updateLayoutSwitcher(m_current_layout, m_layouts);
|
||||
}
|
||||
|
||||
void DockManager::layoutSwitcherTabChanged(int index)
|
||||
void DockManager::newLayoutClicked()
|
||||
{
|
||||
// Prevent recursion.
|
||||
if (m_ignore_current_tab_changed)
|
||||
return;
|
||||
// The plus button has just been made the current tab, so set it back to the
|
||||
// one corresponding to the current layout again.
|
||||
m_menu_bar->onCurrentLayoutChanged(m_current_layout);
|
||||
|
||||
if (index == m_plus_tab_index)
|
||||
auto name_validator = [this](const QString& name) {
|
||||
return !hasNameConflict(name, DockLayout::INVALID_INDEX);
|
||||
};
|
||||
|
||||
bool can_clone_current_layout = m_current_layout != DockLayout::INVALID_INDEX;
|
||||
|
||||
QPointer<LayoutEditorDialog> dialog = new LayoutEditorDialog(
|
||||
name_validator, can_clone_current_layout, g_debugger_window);
|
||||
|
||||
if (dialog->exec() == QDialog::Accepted && name_validator(dialog->name()))
|
||||
{
|
||||
if (m_current_tab_index >= 0 && m_current_tab_index < m_plus_tab_index)
|
||||
DockLayout::Index new_layout = DockLayout::INVALID_INDEX;
|
||||
|
||||
const auto [mode, index] = dialog->initialState();
|
||||
switch (mode)
|
||||
{
|
||||
m_ignore_current_tab_changed = true;
|
||||
m_switcher->setCurrentIndex(m_current_tab_index);
|
||||
m_ignore_current_tab_changed = false;
|
||||
case LayoutEditorDialog::DEFAULT_LAYOUT:
|
||||
{
|
||||
const DockTables::DefaultDockLayout& default_layout = DockTables::DEFAULT_DOCK_LAYOUTS.at(index);
|
||||
new_layout = createLayout(dialog->name(), dialog->cpu(), false, default_layout.name);
|
||||
break;
|
||||
}
|
||||
case LayoutEditorDialog::BLANK_LAYOUT:
|
||||
{
|
||||
new_layout = createLayout(dialog->name(), dialog->cpu(), false);
|
||||
break;
|
||||
}
|
||||
case LayoutEditorDialog::CLONE_LAYOUT:
|
||||
{
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
break;
|
||||
|
||||
DockLayout::Index old_layout = m_current_layout;
|
||||
|
||||
// Freeze the current layout so we can copy the geometry.
|
||||
switchToLayout(DockLayout::INVALID_INDEX);
|
||||
|
||||
new_layout = createLayout(dialog->name(), dialog->cpu(), false, m_layouts.at(old_layout));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
auto name_validator = [this](const QString& name) {
|
||||
return !hasNameConflict(name, DockLayout::INVALID_INDEX);
|
||||
};
|
||||
|
||||
bool can_clone_current_layout = m_current_layout != DockLayout::INVALID_INDEX;
|
||||
|
||||
QPointer<LayoutEditorDialog> dialog = new LayoutEditorDialog(
|
||||
name_validator, can_clone_current_layout, g_debugger_window);
|
||||
|
||||
if (dialog->exec() == QDialog::Accepted && name_validator(dialog->name()))
|
||||
if (new_layout != DockLayout::INVALID_INDEX)
|
||||
{
|
||||
DockLayout::Index new_layout = DockLayout::INVALID_INDEX;
|
||||
|
||||
const auto [mode, index] = dialog->initialState();
|
||||
switch (mode)
|
||||
{
|
||||
case LayoutEditorDialog::DEFAULT_LAYOUT:
|
||||
{
|
||||
const DockTables::DefaultDockLayout& default_layout = DockTables::DEFAULT_DOCK_LAYOUTS.at(index);
|
||||
new_layout = createLayout(dialog->name(), dialog->cpu(), false, default_layout.name);
|
||||
break;
|
||||
}
|
||||
case LayoutEditorDialog::BLANK_LAYOUT:
|
||||
{
|
||||
new_layout = createLayout(dialog->name(), dialog->cpu(), false);
|
||||
break;
|
||||
}
|
||||
case LayoutEditorDialog::CLONE_LAYOUT:
|
||||
{
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
DockLayout::Index old_layout = m_current_layout;
|
||||
|
||||
// Freeze the current layout so we can copy the geometry.
|
||||
switchToLayout(DockLayout::INVALID_INDEX);
|
||||
|
||||
new_layout = createLayout(dialog->name(), dialog->cpu(), false, m_layouts.at(old_layout));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateLayoutSwitcher();
|
||||
switchToLayout(new_layout);
|
||||
}
|
||||
|
||||
delete dialog.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
DockLayout::Index layout_index = static_cast<DockLayout::Index>(index);
|
||||
if (layout_index < 0 || layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
switchToLayout(layout_index);
|
||||
m_current_tab_index = index;
|
||||
}
|
||||
delete dialog.get();
|
||||
}
|
||||
|
||||
void DockManager::layoutSwitcherTabMoved(int from, int to)
|
||||
void DockManager::openLayoutSwitcherContextMenu(const QPoint& pos, QTabBar* layout_switcher)
|
||||
{
|
||||
DockLayout::Index from_index = static_cast<DockLayout::Index>(from);
|
||||
DockLayout::Index to_index = static_cast<DockLayout::Index>(to);
|
||||
DockLayout::Index layout_index = static_cast<DockLayout::Index>(layout_switcher->tabAt(pos));
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
|
||||
QMenu* menu = new QMenu(layout_switcher);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QAction* edit_action = menu->addAction(tr("Edit Layout"));
|
||||
connect(edit_action, &QAction::triggered, [this, layout_index]() {
|
||||
editLayoutClicked(layout_index);
|
||||
});
|
||||
|
||||
QAction* reset_action = menu->addAction(tr("Reset Layout"));
|
||||
reset_action->setEnabled(layout.canReset());
|
||||
reset_action->connect(reset_action, &QAction::triggered, [this, layout_index]() {
|
||||
resetLayoutClicked(layout_index);
|
||||
});
|
||||
|
||||
QAction* delete_action = menu->addAction(tr("Delete Layout"));
|
||||
connect(delete_action, &QAction::triggered, [this, layout_index]() {
|
||||
deleteLayoutClicked(layout_index);
|
||||
});
|
||||
|
||||
menu->popup(layout_switcher->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void DockManager::editLayoutClicked(DockLayout::Index layout_index)
|
||||
{
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
|
||||
auto name_validator = [this, layout_index](const QString& name) {
|
||||
return !hasNameConflict(name, layout_index);
|
||||
};
|
||||
|
||||
QPointer<LayoutEditorDialog> dialog = new LayoutEditorDialog(
|
||||
layout.name(), layout.cpu(), name_validator, g_debugger_window);
|
||||
|
||||
if (dialog->exec() != QDialog::Accepted || !name_validator(dialog->name()))
|
||||
return;
|
||||
|
||||
layout.setName(dialog->name());
|
||||
layout.setCpu(dialog->cpu());
|
||||
|
||||
layout.save(layout_index);
|
||||
|
||||
delete dialog.get();
|
||||
|
||||
updateLayoutSwitcher();
|
||||
}
|
||||
|
||||
void DockManager::resetLayoutClicked(DockLayout::Index layout_index)
|
||||
{
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
if (!layout.canReset())
|
||||
return;
|
||||
|
||||
QString text = tr("Are you sure you want to reset layout '%1'?").arg(layout.name());
|
||||
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
bool current_layout = layout_index == m_current_layout;
|
||||
|
||||
if (current_layout)
|
||||
switchToLayout(DockLayout::INVALID_INDEX);
|
||||
|
||||
layout.reset();
|
||||
layout.save(layout_index);
|
||||
|
||||
if (current_layout)
|
||||
switchToLayout(layout_index);
|
||||
}
|
||||
|
||||
void DockManager::deleteLayoutClicked(DockLayout::Index layout_index)
|
||||
{
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
|
||||
QString text = tr("Are you sure you want to delete layout '%1'?").arg(layout.name());
|
||||
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
deleteLayout(layout_index);
|
||||
updateLayoutSwitcher();
|
||||
}
|
||||
|
||||
void DockManager::layoutSwitcherTabMoved(DockLayout::Index from_index, DockLayout::Index to_index)
|
||||
{
|
||||
if (from_index >= m_layouts.size() || to_index >= m_layouts.size())
|
||||
{
|
||||
// This happens when the user tries to move a layout to the right of the
|
||||
@@ -660,135 +681,6 @@ void DockManager::layoutSwitcherTabMoved(int from, int to)
|
||||
m_current_layout = from_index;
|
||||
}
|
||||
|
||||
void DockManager::layoutSwitcherContextMenu(QPoint pos)
|
||||
{
|
||||
DockLayout::Index layout_index = static_cast<DockLayout::Index>(m_switcher->tabAt(pos));
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
|
||||
QMenu* menu = new QMenu(m_switcher);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QAction* edit_action = menu->addAction(tr("Edit Layout"));
|
||||
connect(edit_action, &QAction::triggered, [this, layout_index]() {
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
|
||||
auto name_validator = [this, layout_index](const QString& name) {
|
||||
return !hasNameConflict(name, layout_index);
|
||||
};
|
||||
|
||||
QPointer<LayoutEditorDialog> dialog = new LayoutEditorDialog(
|
||||
layout.name(), layout.cpu(), name_validator, g_debugger_window);
|
||||
|
||||
if (dialog->exec() != QDialog::Accepted || !name_validator(dialog->name()))
|
||||
return;
|
||||
|
||||
layout.setName(dialog->name());
|
||||
layout.setCpu(dialog->cpu());
|
||||
|
||||
layout.save(layout_index);
|
||||
|
||||
delete dialog.get();
|
||||
|
||||
updateLayoutSwitcher();
|
||||
});
|
||||
|
||||
QAction* reset_action = menu->addAction(tr("Reset Layout"));
|
||||
reset_action->setEnabled(layout.canReset());
|
||||
reset_action->connect(reset_action, &QAction::triggered, [this, layout_index]() {
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
if (!layout.canReset())
|
||||
return;
|
||||
|
||||
QString text = tr("Are you sure you want to reset layout '%1'?").arg(layout.name());
|
||||
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
bool current_layout = layout_index == m_current_layout;
|
||||
|
||||
if (current_layout)
|
||||
switchToLayout(DockLayout::INVALID_INDEX);
|
||||
|
||||
layout.reset();
|
||||
layout.save(layout_index);
|
||||
|
||||
if (current_layout)
|
||||
switchToLayout(layout_index);
|
||||
});
|
||||
|
||||
QAction* delete_action = menu->addAction(tr("Delete Layout"));
|
||||
connect(delete_action, &QAction::triggered, [this, layout_index]() {
|
||||
if (layout_index >= m_layouts.size())
|
||||
return;
|
||||
|
||||
DockLayout& layout = m_layouts[layout_index];
|
||||
|
||||
QString text = tr("Are you sure you want to delete layout '%1'?").arg(layout.name());
|
||||
if (QMessageBox::question(g_debugger_window, tr("Confirmation"), text) != QMessageBox::Yes)
|
||||
return;
|
||||
|
||||
deleteLayout(layout_index);
|
||||
updateLayoutSwitcher();
|
||||
});
|
||||
|
||||
menu->popup(m_switcher->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void DockManager::layoutSwitcherStartBlink()
|
||||
{
|
||||
if (!m_switcher)
|
||||
return;
|
||||
|
||||
layoutSwitcherStopBlink();
|
||||
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_blink_tab = m_current_layout;
|
||||
m_blink_stage = 0;
|
||||
m_blink_timer->start(500);
|
||||
|
||||
layoutSwitcherUpdateBlink();
|
||||
}
|
||||
|
||||
void DockManager::layoutSwitcherUpdateBlink()
|
||||
{
|
||||
if (!m_switcher)
|
||||
return;
|
||||
|
||||
if (m_blink_tab < m_switcher->count())
|
||||
{
|
||||
if (m_blink_stage % 2 == 0)
|
||||
m_switcher->setTabTextColor(m_blink_tab, Qt::red);
|
||||
else
|
||||
m_switcher->setTabTextColor(m_blink_tab, m_switcher->palette().text().color());
|
||||
}
|
||||
|
||||
m_blink_stage++;
|
||||
|
||||
if (m_blink_stage > 7)
|
||||
m_blink_timer->stop();
|
||||
}
|
||||
|
||||
void DockManager::layoutSwitcherStopBlink()
|
||||
{
|
||||
if (m_blink_timer->isActive())
|
||||
{
|
||||
if (m_blink_tab < m_switcher->count())
|
||||
m_switcher->setTabTextColor(m_blink_tab, m_switcher->palette().text().color());
|
||||
|
||||
m_blink_timer->stop();
|
||||
}
|
||||
}
|
||||
|
||||
bool DockManager::hasNameConflict(const QString& name, DockLayout::Index layout_index)
|
||||
{
|
||||
std::string safe_name = Path::SanitizeFileName(name.toStdString());
|
||||
@@ -810,53 +702,53 @@ void DockManager::updateDockWidgetTitles()
|
||||
m_layouts.at(m_current_layout).updateDockWidgetTitles();
|
||||
}
|
||||
|
||||
const std::map<QString, QPointer<DebuggerWidget>>& DockManager::debuggerWidgets()
|
||||
const std::map<QString, QPointer<DebuggerView>>& DockManager::debuggerViews()
|
||||
{
|
||||
static std::map<QString, QPointer<DebuggerWidget>> dummy;
|
||||
static std::map<QString, QPointer<DebuggerView>> dummy;
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return dummy;
|
||||
|
||||
return m_layouts.at(m_current_layout).debuggerWidgets();
|
||||
return m_layouts.at(m_current_layout).debuggerViews();
|
||||
}
|
||||
|
||||
size_t DockManager::countDebuggerWidgetsOfType(const char* type)
|
||||
size_t DockManager::countDebuggerViewsOfType(const char* type)
|
||||
{
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return 0;
|
||||
|
||||
return m_layouts.at(m_current_layout).countDebuggerWidgetsOfType(type);
|
||||
return m_layouts.at(m_current_layout).countDebuggerViewsOfType(type);
|
||||
}
|
||||
|
||||
void DockManager::recreateDebuggerWidget(const QString& unique_name)
|
||||
void DockManager::recreateDebuggerView(const QString& unique_name)
|
||||
{
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_layouts.at(m_current_layout).recreateDebuggerWidget(unique_name);
|
||||
m_layouts.at(m_current_layout).recreateDebuggerView(unique_name);
|
||||
}
|
||||
|
||||
void DockManager::destroyDebuggerWidget(const QString& unique_name)
|
||||
void DockManager::destroyDebuggerView(const QString& unique_name)
|
||||
{
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_layouts.at(m_current_layout).destroyDebuggerWidget(unique_name);
|
||||
m_layouts.at(m_current_layout).destroyDebuggerView(unique_name);
|
||||
}
|
||||
|
||||
void DockManager::setPrimaryDebuggerWidget(DebuggerWidget* widget, bool is_primary)
|
||||
void DockManager::setPrimaryDebuggerView(DebuggerView* widget, bool is_primary)
|
||||
{
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_layouts.at(m_current_layout).setPrimaryDebuggerWidget(widget, is_primary);
|
||||
m_layouts.at(m_current_layout).setPrimaryDebuggerView(widget, is_primary);
|
||||
}
|
||||
|
||||
void DockManager::switchToDebuggerWidget(DebuggerWidget* widget)
|
||||
void DockManager::switchToDebuggerView(DebuggerView* widget)
|
||||
{
|
||||
if (m_current_layout == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
for (const auto& [unique_name, test_widget] : m_layouts.at(m_current_layout).debuggerWidgets())
|
||||
for (const auto& [unique_name, test_widget] : m_layouts.at(m_current_layout).debuggerViews())
|
||||
{
|
||||
if (widget == test_widget)
|
||||
{
|
||||
@@ -867,11 +759,23 @@ void DockManager::switchToDebuggerWidget(DebuggerWidget* widget)
|
||||
}
|
||||
}
|
||||
|
||||
void DockManager::updateStyleSheets()
|
||||
void DockManager::updateTheme()
|
||||
{
|
||||
if (m_menu_bar)
|
||||
m_menu_bar->updateTheme();
|
||||
|
||||
for (DockLayout& layout : m_layouts)
|
||||
for (const auto& [unique_name, widget] : layout.debuggerWidgets())
|
||||
for (const auto& [unique_name, widget] : layout.debuggerViews())
|
||||
widget->updateStyleSheet();
|
||||
|
||||
// KDDockWidgets::QtWidgets::TabBar sets its own style to a subclass of
|
||||
// QProxyStyle in its constructor, so we need to update that here.
|
||||
for (KDDockWidgets::Core::Group* group : KDDockWidgets::DockRegistry::self()->groups())
|
||||
{
|
||||
auto tab_bar = static_cast<KDDockWidgets::QtWidgets::TabBar*>(group->tabBar()->view());
|
||||
if (QProxyStyle* style = qobject_cast<QProxyStyle*>(tab_bar->style()))
|
||||
style->setBaseStyle(QStyleFactory::create(qApp->style()->name()));
|
||||
}
|
||||
}
|
||||
|
||||
bool DockManager::isLayoutLocked()
|
||||
@@ -879,23 +783,17 @@ bool DockManager::isLayoutLocked()
|
||||
return m_layout_locked;
|
||||
}
|
||||
|
||||
void DockManager::setLayoutLocked(bool locked, QPushButton* lock_layout_toggle, bool write_back)
|
||||
void DockManager::setLayoutLockedAndSaveSetting(bool locked)
|
||||
{
|
||||
setLayoutLocked(locked, true);
|
||||
}
|
||||
|
||||
void DockManager::setLayoutLocked(bool locked, bool save_setting)
|
||||
{
|
||||
m_layout_locked = locked;
|
||||
|
||||
if (lock_layout_toggle)
|
||||
{
|
||||
if (m_layout_locked)
|
||||
{
|
||||
lock_layout_toggle->setText(tr("Layout Locked"));
|
||||
lock_layout_toggle->setIcon(QIcon::fromTheme(QString::fromUtf8("padlock-lock")));
|
||||
}
|
||||
else
|
||||
{
|
||||
lock_layout_toggle->setText(tr("Layout Unlocked"));
|
||||
lock_layout_toggle->setIcon(QIcon::fromTheme(QString::fromUtf8("padlock-unlock")));
|
||||
}
|
||||
}
|
||||
if (m_menu_bar)
|
||||
m_menu_bar->onLockStateChanged(locked);
|
||||
|
||||
updateToolBarLockState();
|
||||
|
||||
@@ -909,7 +807,7 @@ void DockManager::setLayoutLocked(bool locked, QPushButton* lock_layout_toggle,
|
||||
stack->tabBar()->setTabText(0, stack->tabBar()->tabText(0));
|
||||
}
|
||||
|
||||
if (write_back)
|
||||
if (save_setting)
|
||||
{
|
||||
Host::SetBaseBoolSettingValue("Debugger/UserInterface", "LayoutLocked", m_layout_locked);
|
||||
Host::CommitBaseSettingChanges();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Debugger/Docking/DockLayout.h"
|
||||
#include "Debugger/Docking/DockMenuBar.h"
|
||||
|
||||
#include <kddockwidgets/MainWindow.h>
|
||||
#include <kddockwidgets/DockWidget.h>
|
||||
@@ -68,30 +69,31 @@ public:
|
||||
void createToolsMenu(QMenu* menu);
|
||||
void createWindowsMenu(QMenu* menu);
|
||||
|
||||
QWidget* createLayoutSwitcher(QWidget* menu_bar);
|
||||
QWidget* createMenuBar(QWidget* original_menu_bar);
|
||||
void updateLayoutSwitcher();
|
||||
void layoutSwitcherTabChanged(int index);
|
||||
void layoutSwitcherTabMoved(int from, int to);
|
||||
void layoutSwitcherContextMenu(QPoint pos);
|
||||
void layoutSwitcherStartBlink();
|
||||
void layoutSwitcherUpdateBlink();
|
||||
void layoutSwitcherStopBlink();
|
||||
void newLayoutClicked();
|
||||
void openLayoutSwitcherContextMenu(const QPoint& pos, QTabBar* layout_switcher);
|
||||
void editLayoutClicked(DockLayout::Index layout_index);
|
||||
void resetLayoutClicked(DockLayout::Index layout_index);
|
||||
void deleteLayoutClicked(DockLayout::Index layout_index);
|
||||
void layoutSwitcherTabMoved(DockLayout::Index from_index, DockLayout::Index to_index);
|
||||
|
||||
bool hasNameConflict(const QString& name, DockLayout::Index layout_index);
|
||||
|
||||
void updateDockWidgetTitles();
|
||||
|
||||
const std::map<QString, QPointer<DebuggerWidget>>& debuggerWidgets();
|
||||
size_t countDebuggerWidgetsOfType(const char* type);
|
||||
void recreateDebuggerWidget(const QString& unique_name);
|
||||
void destroyDebuggerWidget(const QString& unique_name);
|
||||
void setPrimaryDebuggerWidget(DebuggerWidget* widget, bool is_primary);
|
||||
void switchToDebuggerWidget(DebuggerWidget* widget);
|
||||
const std::map<QString, QPointer<DebuggerView>>& debuggerViews();
|
||||
size_t countDebuggerViewsOfType(const char* type);
|
||||
void recreateDebuggerView(const QString& unique_name);
|
||||
void destroyDebuggerView(const QString& unique_name);
|
||||
void setPrimaryDebuggerView(DebuggerView* widget, bool is_primary);
|
||||
void switchToDebuggerView(DebuggerView* widget);
|
||||
|
||||
void updateStyleSheets();
|
||||
void updateTheme();
|
||||
|
||||
bool isLayoutLocked();
|
||||
void setLayoutLocked(bool locked, QPushButton* lock_layout_toggle, bool write_back);
|
||||
void setLayoutLockedAndSaveSetting(bool locked);
|
||||
void setLayoutLocked(bool locked, bool save_setting);
|
||||
void updateToolBarLockState();
|
||||
|
||||
std::optional<BreakPointCpu> cpu();
|
||||
@@ -103,16 +105,7 @@ private:
|
||||
std::vector<DockLayout> m_layouts;
|
||||
DockLayout::Index m_current_layout = DockLayout::INVALID_INDEX;
|
||||
|
||||
QTabBar* m_switcher = nullptr;
|
||||
int m_plus_tab_index = -1;
|
||||
int m_current_tab_index = -1;
|
||||
bool m_ignore_current_tab_changed = false;
|
||||
|
||||
QMetaObject::Connection m_tab_connection;
|
||||
DockMenuBar* m_menu_bar = nullptr;
|
||||
|
||||
bool m_layout_locked = true;
|
||||
|
||||
QTimer* m_blink_timer = nullptr;
|
||||
int m_blink_tab = 0;
|
||||
int m_blink_stage = 0;
|
||||
};
|
||||
|
||||
342
pcsx2-qt/Debugger/Docking/DockMenuBar.cpp
Normal file
342
pcsx2-qt/Debugger/Docking/DockMenuBar.cpp
Normal file
@@ -0,0 +1,342 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "DockMenuBar.h"
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPaintEvent>
|
||||
#include <QtWidgets/QBoxLayout>
|
||||
#include <QtWidgets/QStyleFactory>
|
||||
#include <QtWidgets/QStyleOption>
|
||||
|
||||
static const int OUTER_MENU_MARGIN = 2;
|
||||
static const int INNER_MENU_MARGIN = 4;
|
||||
|
||||
DockMenuBar::DockMenuBar(QWidget* original_menu_bar, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_original_menu_bar(original_menu_bar)
|
||||
{
|
||||
QHBoxLayout* layout = new QHBoxLayout;
|
||||
layout->setContentsMargins(0, OUTER_MENU_MARGIN, OUTER_MENU_MARGIN, 0);
|
||||
setLayout(layout);
|
||||
|
||||
QWidget* menu_wrapper = new QWidget;
|
||||
menu_wrapper->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
|
||||
layout->addWidget(menu_wrapper);
|
||||
|
||||
QHBoxLayout* menu_layout = new QHBoxLayout;
|
||||
menu_layout->setContentsMargins(0, INNER_MENU_MARGIN, 0, INNER_MENU_MARGIN);
|
||||
menu_wrapper->setLayout(menu_layout);
|
||||
|
||||
menu_layout->addWidget(original_menu_bar);
|
||||
|
||||
m_layout_switcher = new QTabBar;
|
||||
m_layout_switcher->setContentsMargins(0, 0, 0, 0);
|
||||
m_layout_switcher->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||
m_layout_switcher->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
m_layout_switcher->setDrawBase(false);
|
||||
m_layout_switcher->setExpanding(false);
|
||||
m_layout_switcher->setMovable(true);
|
||||
layout->addWidget(m_layout_switcher);
|
||||
|
||||
connect(m_layout_switcher, &QTabBar::tabMoved, this, [this](int from, int to) {
|
||||
DockLayout::Index from_index = static_cast<DockLayout::Index>(from);
|
||||
DockLayout::Index to_index = static_cast<DockLayout::Index>(to);
|
||||
emit layoutMoved(from_index, to_index);
|
||||
});
|
||||
|
||||
connect(m_layout_switcher, &QTabBar::customContextMenuRequested, this, [this](const QPoint& pos) {
|
||||
emit layoutSwitcherContextMenuRequested(pos, m_layout_switcher);
|
||||
});
|
||||
|
||||
m_blink_timer = new QTimer(this);
|
||||
connect(m_blink_timer, &QTimer::timeout, this, &DockMenuBar::updateBlink);
|
||||
|
||||
m_layout_locked_toggle = new QPushButton;
|
||||
m_layout_locked_toggle->setCheckable(true);
|
||||
connect(m_layout_locked_toggle, &QPushButton::clicked, this, [this](bool checked) {
|
||||
if (m_ignore_lock_state_changed)
|
||||
return;
|
||||
|
||||
emit lockButtonToggled(checked);
|
||||
});
|
||||
layout->addWidget(m_layout_locked_toggle);
|
||||
|
||||
updateTheme();
|
||||
}
|
||||
|
||||
void DockMenuBar::updateTheme()
|
||||
{
|
||||
DockMenuBarStyle* style = new DockMenuBarStyle(m_layout_switcher);
|
||||
m_original_menu_bar->setStyle(style);
|
||||
m_layout_switcher->setStyle(style);
|
||||
m_layout_locked_toggle->setStyle(style);
|
||||
|
||||
delete m_style;
|
||||
m_style = style;
|
||||
}
|
||||
|
||||
void DockMenuBar::updateLayoutSwitcher(DockLayout::Index current_index, const std::vector<DockLayout>& layouts)
|
||||
{
|
||||
disconnect(m_tab_connection);
|
||||
|
||||
for (int i = m_layout_switcher->count(); i > 0; i--)
|
||||
m_layout_switcher->removeTab(i - 1);
|
||||
|
||||
for (const DockLayout& layout : layouts)
|
||||
{
|
||||
const char* cpu_name = DebugInterface::cpuName(layout.cpu());
|
||||
QString tab_name = QString("%1 (%2)").arg(layout.name()).arg(cpu_name);
|
||||
m_layout_switcher->addTab(tab_name);
|
||||
}
|
||||
|
||||
m_plus_tab_index = m_layout_switcher->addTab("+");
|
||||
m_current_tab_index = current_index;
|
||||
|
||||
if (current_index != DockLayout::INVALID_INDEX)
|
||||
m_layout_switcher->setCurrentIndex(current_index);
|
||||
else
|
||||
m_layout_switcher->setCurrentIndex(m_plus_tab_index);
|
||||
|
||||
// If we don't have any layouts, the currently selected tab will never be
|
||||
// changed, so we respond to all clicks instead.
|
||||
if (m_plus_tab_index > 0)
|
||||
m_tab_connection = connect(m_layout_switcher, &QTabBar::currentChanged, this, &DockMenuBar::tabChanged);
|
||||
else
|
||||
m_tab_connection = connect(m_layout_switcher, &QTabBar::tabBarClicked, this, &DockMenuBar::tabChanged);
|
||||
|
||||
stopBlink();
|
||||
}
|
||||
|
||||
void DockMenuBar::onCurrentLayoutChanged(DockLayout::Index current_index)
|
||||
{
|
||||
m_ignore_current_tab_changed = true;
|
||||
|
||||
if (current_index != DockLayout::INVALID_INDEX)
|
||||
m_layout_switcher->setCurrentIndex(current_index);
|
||||
else
|
||||
m_layout_switcher->setCurrentIndex(m_plus_tab_index);
|
||||
|
||||
m_ignore_current_tab_changed = false;
|
||||
}
|
||||
|
||||
void DockMenuBar::onLockStateChanged(bool layout_locked)
|
||||
{
|
||||
m_ignore_lock_state_changed = true;
|
||||
|
||||
m_layout_locked_toggle->setChecked(layout_locked);
|
||||
|
||||
if (layout_locked)
|
||||
{
|
||||
m_layout_locked_toggle->setText(tr("Layout Locked"));
|
||||
m_layout_locked_toggle->setIcon(QIcon::fromTheme(QString::fromUtf8("padlock-lock")));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_layout_locked_toggle->setText(tr("Layout Unlocked"));
|
||||
m_layout_locked_toggle->setIcon(QIcon::fromTheme(QString::fromUtf8("padlock-unlock")));
|
||||
}
|
||||
|
||||
m_ignore_lock_state_changed = false;
|
||||
}
|
||||
|
||||
void DockMenuBar::startBlink(DockLayout::Index layout_index)
|
||||
{
|
||||
stopBlink();
|
||||
|
||||
if (layout_index == DockLayout::INVALID_INDEX)
|
||||
return;
|
||||
|
||||
m_blink_tab = static_cast<int>(layout_index);
|
||||
m_blink_stage = 0;
|
||||
m_blink_timer->start(500);
|
||||
|
||||
updateBlink();
|
||||
}
|
||||
|
||||
void DockMenuBar::updateBlink()
|
||||
{
|
||||
if (m_blink_tab < m_layout_switcher->count())
|
||||
{
|
||||
if (m_blink_stage % 2 == 0)
|
||||
m_layout_switcher->setTabTextColor(m_blink_tab, Qt::red);
|
||||
else
|
||||
m_layout_switcher->setTabTextColor(m_blink_tab, m_layout_switcher->palette().text().color());
|
||||
}
|
||||
|
||||
m_blink_stage++;
|
||||
|
||||
if (m_blink_stage > 7)
|
||||
m_blink_timer->stop();
|
||||
}
|
||||
|
||||
void DockMenuBar::stopBlink()
|
||||
{
|
||||
if (m_blink_timer->isActive())
|
||||
{
|
||||
if (m_blink_tab < m_layout_switcher->count())
|
||||
m_layout_switcher->setTabTextColor(m_blink_tab, m_layout_switcher->palette().text().color());
|
||||
|
||||
m_blink_timer->stop();
|
||||
}
|
||||
}
|
||||
|
||||
int DockMenuBar::innerHeight() const
|
||||
{
|
||||
return m_original_menu_bar->sizeHint().height() + INNER_MENU_MARGIN * 2;
|
||||
}
|
||||
|
||||
void DockMenuBar::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
// This fixes the background colour of the menu bar when using the Windows
|
||||
// Vista style.
|
||||
QStyleOptionMenuItem menu_option;
|
||||
menu_option.palette = palette();
|
||||
menu_option.state = QStyle::State_None;
|
||||
menu_option.menuItemType = QStyleOptionMenuItem::EmptyArea;
|
||||
menu_option.checkType = QStyleOptionMenuItem::NotCheckable;
|
||||
menu_option.rect = rect();
|
||||
menu_option.menuRect = rect();
|
||||
style()->drawControl(QStyle::CE_MenuBarEmptyArea, &menu_option, &painter, this);
|
||||
}
|
||||
|
||||
void DockMenuBar::tabChanged(int index)
|
||||
{
|
||||
// Prevent recursion.
|
||||
if (m_ignore_current_tab_changed)
|
||||
return;
|
||||
|
||||
if (index < m_plus_tab_index)
|
||||
{
|
||||
DockLayout::Index layout_index = static_cast<DockLayout::Index>(index);
|
||||
emit currentLayoutChanged(layout_index);
|
||||
}
|
||||
else if (index == m_plus_tab_index)
|
||||
{
|
||||
emit newButtonClicked();
|
||||
}
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
DockMenuBarStyle::DockMenuBarStyle(QObject* parent)
|
||||
: QProxyStyle(QStyleFactory::create(qApp->style()->name()))
|
||||
{
|
||||
setParent(parent);
|
||||
}
|
||||
|
||||
void DockMenuBarStyle::drawControl(
|
||||
ControlElement element,
|
||||
const QStyleOption* option,
|
||||
QPainter* painter,
|
||||
const QWidget* widget) const
|
||||
{
|
||||
switch (element)
|
||||
{
|
||||
case CE_MenuBarItem:
|
||||
{
|
||||
const QStyleOptionMenuItem* opt = qstyleoption_cast<const QStyleOptionMenuItem*>(option);
|
||||
if (!opt)
|
||||
break;
|
||||
|
||||
QWidget* menu_wrapper = widget->parentWidget();
|
||||
if (!menu_wrapper)
|
||||
break;
|
||||
|
||||
const DockMenuBar* menu_bar = qobject_cast<const DockMenuBar*>(menu_wrapper->parentWidget());
|
||||
if (!menu_bar)
|
||||
break;
|
||||
|
||||
if (baseStyle()->name() != "fusion")
|
||||
break;
|
||||
|
||||
// This mirrors a check in QFusionStyle::drawControl. If act is
|
||||
// false, QFusionStyle will try to draw a border along the bottom.
|
||||
bool act = opt->state & State_Selected && opt->state & State_Sunken;
|
||||
if (act)
|
||||
break;
|
||||
|
||||
// Extend the menu item to the bottom of the menu bar to fix the
|
||||
// position in which it draws its bottom border. We also need to
|
||||
// extend it up by the same amount so that the text isn't moved.
|
||||
QStyleOptionMenuItem menu_opt = *opt;
|
||||
int difference = (menu_bar->innerHeight() - option->rect.top()) - menu_opt.rect.height();
|
||||
menu_opt.rect.adjust(0, -difference, 0, difference);
|
||||
QProxyStyle::drawControl(element, &menu_opt, painter, widget);
|
||||
|
||||
return;
|
||||
}
|
||||
case CE_TabBarTab:
|
||||
{
|
||||
QProxyStyle::drawControl(element, option, painter, widget);
|
||||
|
||||
// Draw a slick-looking highlight under the currently selected tab.
|
||||
if (baseStyle()->name() == "fusion")
|
||||
{
|
||||
const QStyleOptionTab* tab = qstyleoption_cast<const QStyleOptionTab*>(option);
|
||||
if (tab && (tab->state & State_Selected))
|
||||
{
|
||||
painter->setPen(tab->palette.highlight().color());
|
||||
painter->drawLine(tab->rect.bottomLeft(), tab->rect.bottomRight());
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
case CE_MenuBarEmptyArea:
|
||||
{
|
||||
// Prevent it from drawing a border in the wrong position.
|
||||
return;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QProxyStyle::drawControl(element, option, painter, widget);
|
||||
}
|
||||
|
||||
QSize DockMenuBarStyle::sizeFromContents(
|
||||
QStyle::ContentsType type, const QStyleOption* option, const QSize& contents_size, const QWidget* widget) const
|
||||
{
|
||||
QSize size = QProxyStyle::sizeFromContents(type, option, contents_size, widget);
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
// Adjust the sizes of the layout switcher tabs depending on the theme.
|
||||
if (type == CT_TabBarTab)
|
||||
{
|
||||
const QStyleOptionTab* opt = qstyleoption_cast<const QStyleOptionTab*>(option);
|
||||
if (!opt)
|
||||
return size;
|
||||
|
||||
const QTabBar* tab_bar = qobject_cast<const QTabBar*>(widget);
|
||||
if (!tab_bar)
|
||||
return size;
|
||||
|
||||
const DockMenuBar* menu_bar = qobject_cast<const DockMenuBar*>(tab_bar->parentWidget());
|
||||
if (!menu_bar)
|
||||
return size;
|
||||
|
||||
if (baseStyle()->name() == "fusion" || baseStyle()->name() == "windowsvista")
|
||||
{
|
||||
// Make sure the tab extends to the bottom of the widget.
|
||||
size.setHeight(menu_bar->innerHeight() - opt->rect.top());
|
||||
}
|
||||
else if (baseStyle()->name() == "windows11")
|
||||
{
|
||||
// Adjust the size of the tab such that it is vertically centred.
|
||||
size.setHeight(menu_bar->innerHeight() - opt->rect.top() * 2 - OUTER_MENU_MARGIN);
|
||||
|
||||
// Make the plus button square.
|
||||
if (opt->tabIndex + 1 == tab_bar->count())
|
||||
size.setWidth(size.height());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return size;
|
||||
}
|
||||
93
pcsx2-qt/Debugger/Docking/DockMenuBar.h
Normal file
93
pcsx2-qt/Debugger/Docking/DockMenuBar.h
Normal file
@@ -0,0 +1,93 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Debugger/Docking/DockLayout.h"
|
||||
|
||||
#include <QtWidgets/QMenuBar>
|
||||
#include <QtWidgets/QProxyStyle>
|
||||
#include <QtWidgets/QPushButton>
|
||||
#include <QtWidgets/QTabBar>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
class DockMenuBarStyle;
|
||||
|
||||
// The widget that replaces the normal menu bar. This contains the original menu
|
||||
// bar, the layout switcher and the layout locked/unlocked toggle button.
|
||||
class DockMenuBar : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DockMenuBar(QWidget* original_menu_bar, QWidget* parent = nullptr);
|
||||
|
||||
void updateLayoutSwitcher(DockLayout::Index current_index, const std::vector<DockLayout>& layouts);
|
||||
|
||||
void updateTheme();
|
||||
|
||||
// Notify the menu bar that a new layout has been selected.
|
||||
void onCurrentLayoutChanged(DockLayout::Index current_index);
|
||||
|
||||
// Notify the menu bar that the layout has been locked/unlocked.
|
||||
void onLockStateChanged(bool layout_locked);
|
||||
|
||||
void startBlink(DockLayout::Index layout_index);
|
||||
void updateBlink();
|
||||
void stopBlink();
|
||||
|
||||
int innerHeight() const;
|
||||
|
||||
Q_SIGNALS:
|
||||
void currentLayoutChanged(DockLayout::Index layout_index);
|
||||
void newButtonClicked();
|
||||
void layoutMoved(DockLayout::Index from_index, DockLayout::Index to_index);
|
||||
void lockButtonToggled(bool locked);
|
||||
|
||||
void layoutSwitcherContextMenuRequested(const QPoint& pos, QTabBar* layout_switcher);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent* event) override;
|
||||
|
||||
private:
|
||||
void tabChanged(int index);
|
||||
|
||||
QWidget* m_original_menu_bar;
|
||||
|
||||
QTabBar* m_layout_switcher;
|
||||
QMetaObject::Connection m_tab_connection;
|
||||
int m_plus_tab_index = -1;
|
||||
int m_current_tab_index = -1;
|
||||
bool m_ignore_current_tab_changed = false;
|
||||
|
||||
QTimer* m_blink_timer = nullptr;
|
||||
int m_blink_tab = 0;
|
||||
int m_blink_stage = 0;
|
||||
|
||||
QPushButton* m_layout_locked_toggle;
|
||||
bool m_ignore_lock_state_changed = false;
|
||||
|
||||
DockMenuBarStyle* m_style = nullptr;
|
||||
};
|
||||
|
||||
// Fixes some theming issues relating to the menu bar, the layout switcher and
|
||||
// the layout locked/unlocked toggle button.
|
||||
class DockMenuBarStyle : public QProxyStyle
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DockMenuBarStyle(QObject* parent = nullptr);
|
||||
|
||||
void drawControl(
|
||||
ControlElement element,
|
||||
const QStyleOption* option,
|
||||
QPainter* painter,
|
||||
const QWidget* widget = nullptr) const override;
|
||||
|
||||
QSize sizeFromContents(
|
||||
QStyle::ContentsType type,
|
||||
const QStyleOption* option,
|
||||
const QSize& contents_size,
|
||||
const QWidget* widget = nullptr) const override;
|
||||
};
|
||||
@@ -4,28 +4,30 @@
|
||||
#include "DockTables.h"
|
||||
|
||||
#include "Debugger/DebuggerEvents.h"
|
||||
#include "Debugger/DisassemblyWidget.h"
|
||||
#include "Debugger/RegisterWidget.h"
|
||||
#include "Debugger/StackWidget.h"
|
||||
#include "Debugger/ThreadWidget.h"
|
||||
#include "Debugger/Breakpoints/BreakpointWidget.h"
|
||||
#include "Debugger/Memory/MemorySearchWidget.h"
|
||||
#include "Debugger/Memory/MemoryViewWidget.h"
|
||||
#include "Debugger/Memory/SavedAddressesWidget.h"
|
||||
#include "Debugger/SymbolTree/SymbolTreeWidgets.h"
|
||||
|
||||
#include "common/MD5Digest.h"
|
||||
|
||||
#include "fmt/format.h"
|
||||
#include "Debugger/DisassemblyView.h"
|
||||
#include "Debugger/RegisterView.h"
|
||||
#include "Debugger/StackView.h"
|
||||
#include "Debugger/ThreadView.h"
|
||||
#include "Debugger/Breakpoints/BreakpointView.h"
|
||||
#include "Debugger/Memory/MemorySearchView.h"
|
||||
#include "Debugger/Memory/MemoryView.h"
|
||||
#include "Debugger/Memory/SavedAddressesView.h"
|
||||
#include "Debugger/SymbolTree/SymbolTreeViews.h"
|
||||
|
||||
using namespace DockUtils;
|
||||
|
||||
#define DEBUGGER_WIDGET(type, display_name, preferred_location) \
|
||||
static void hashDefaultLayout(const DockTables::DefaultDockLayout& layout, u32& hash);
|
||||
static void hashDefaultGroup(const DockTables::DefaultDockGroupDescription& group, u32& hash);
|
||||
static void hashDefaultDockWidget(const DockTables::DefaultDockWidgetDescription& widget, u32& hash);
|
||||
static void hashNumber(u32 number, u32& hash);
|
||||
static void hashString(const char* string, u32& hash);
|
||||
|
||||
#define DEBUGGER_VIEW(type, display_name, preferred_location) \
|
||||
{ \
|
||||
#type, \
|
||||
{ \
|
||||
[](const DebuggerWidgetParameters& parameters) -> DebuggerWidget* { \
|
||||
DebuggerWidget* widget = new type(parameters); \
|
||||
[](const DebuggerViewParameters& parameters) -> DebuggerView* { \
|
||||
DebuggerView* widget = new type(parameters); \
|
||||
widget->handleEvent(DebuggerEvents::Refresh()); \
|
||||
return widget; \
|
||||
}, \
|
||||
@@ -34,22 +36,22 @@ using namespace DockUtils;
|
||||
} \
|
||||
}
|
||||
|
||||
const std::map<std::string, DockTables::DebuggerWidgetDescription> DockTables::DEBUGGER_WIDGETS = {
|
||||
DEBUGGER_WIDGET(BreakpointWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Breakpoints"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_WIDGET(DisassemblyWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Disassembly"), TOP_RIGHT),
|
||||
DEBUGGER_WIDGET(FunctionTreeWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Functions"), TOP_LEFT),
|
||||
DEBUGGER_WIDGET(GlobalVariableTreeWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Globals"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_WIDGET(LocalVariableTreeWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Locals"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_WIDGET(MemorySearchWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Memory Search"), TOP_LEFT),
|
||||
DEBUGGER_WIDGET(MemoryViewWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Memory"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_WIDGET(ParameterVariableTreeWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Parameters"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_WIDGET(RegisterWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Registers"), TOP_LEFT),
|
||||
DEBUGGER_WIDGET(SavedAddressesWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Saved Addresses"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_WIDGET(StackWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Stack"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_WIDGET(ThreadWidget, QT_TRANSLATE_NOOP("DebuggerWidget", "Threads"), BOTTOM_MIDDLE),
|
||||
const std::map<std::string, DockTables::DebuggerViewDescription> DockTables::DEBUGGER_VIEWS = {
|
||||
DEBUGGER_VIEW(BreakpointView, QT_TRANSLATE_NOOP("DebuggerView", "Breakpoints"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_VIEW(DisassemblyView, QT_TRANSLATE_NOOP("DebuggerView", "Disassembly"), TOP_RIGHT),
|
||||
DEBUGGER_VIEW(FunctionTreeView, QT_TRANSLATE_NOOP("DebuggerView", "Functions"), TOP_LEFT),
|
||||
DEBUGGER_VIEW(GlobalVariableTreeView, QT_TRANSLATE_NOOP("DebuggerView", "Globals"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_VIEW(LocalVariableTreeView, QT_TRANSLATE_NOOP("DebuggerView", "Locals"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_VIEW(MemorySearchView, QT_TRANSLATE_NOOP("DebuggerView", "Memory Search"), TOP_LEFT),
|
||||
DEBUGGER_VIEW(MemoryView, QT_TRANSLATE_NOOP("DebuggerView", "Memory"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_VIEW(ParameterVariableTreeView, QT_TRANSLATE_NOOP("DebuggerView", "Parameters"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_VIEW(RegisterView, QT_TRANSLATE_NOOP("DebuggerView", "Registers"), TOP_LEFT),
|
||||
DEBUGGER_VIEW(SavedAddressesView, QT_TRANSLATE_NOOP("DebuggerView", "Saved Addresses"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_VIEW(StackView, QT_TRANSLATE_NOOP("DebuggerView", "Stack"), BOTTOM_MIDDLE),
|
||||
DEBUGGER_VIEW(ThreadView, QT_TRANSLATE_NOOP("DebuggerView", "Threads"), BOTTOM_MIDDLE),
|
||||
};
|
||||
|
||||
#undef DEBUGGER_WIDGET
|
||||
#undef DEBUGGER_VIEW
|
||||
|
||||
const std::vector<DockTables::DefaultDockLayout> DockTables::DEFAULT_DOCK_LAYOUTS = {
|
||||
{
|
||||
@@ -62,20 +64,20 @@ const std::vector<DockTables::DefaultDockLayout> DockTables::DEFAULT_DOCK_LAYOUT
|
||||
},
|
||||
.widgets = {
|
||||
/* DefaultDockGroup::TOP_RIGHT */
|
||||
{"DisassemblyWidget", DefaultDockGroup::TOP_RIGHT},
|
||||
{"DisassemblyView", DefaultDockGroup::TOP_RIGHT},
|
||||
/* DefaultDockGroup::BOTTOM */
|
||||
{"MemoryViewWidget", DefaultDockGroup::BOTTOM},
|
||||
{"BreakpointWidget", DefaultDockGroup::BOTTOM},
|
||||
{"ThreadWidget", DefaultDockGroup::BOTTOM},
|
||||
{"StackWidget", DefaultDockGroup::BOTTOM},
|
||||
{"SavedAddressesWidget", DefaultDockGroup::BOTTOM},
|
||||
{"GlobalVariableTreeWidget", DefaultDockGroup::BOTTOM},
|
||||
{"LocalVariableTreeWidget", DefaultDockGroup::BOTTOM},
|
||||
{"ParameterVariableTreeWidget", DefaultDockGroup::BOTTOM},
|
||||
{"MemoryView", DefaultDockGroup::BOTTOM},
|
||||
{"BreakpointView", DefaultDockGroup::BOTTOM},
|
||||
{"ThreadView", DefaultDockGroup::BOTTOM},
|
||||
{"StackView", DefaultDockGroup::BOTTOM},
|
||||
{"SavedAddressesView", DefaultDockGroup::BOTTOM},
|
||||
{"GlobalVariableTreeView", DefaultDockGroup::BOTTOM},
|
||||
{"LocalVariableTreeView", DefaultDockGroup::BOTTOM},
|
||||
{"ParameterVariableTreeView", DefaultDockGroup::BOTTOM},
|
||||
/* DefaultDockGroup::TOP_LEFT */
|
||||
{"RegisterWidget", DefaultDockGroup::TOP_LEFT},
|
||||
{"FunctionTreeWidget", DefaultDockGroup::TOP_LEFT},
|
||||
{"MemorySearchWidget", DefaultDockGroup::TOP_LEFT},
|
||||
{"RegisterView", DefaultDockGroup::TOP_LEFT},
|
||||
{"FunctionTreeView", DefaultDockGroup::TOP_LEFT},
|
||||
{"MemorySearchView", DefaultDockGroup::TOP_LEFT},
|
||||
},
|
||||
.toolbars = {
|
||||
"toolBarDebug",
|
||||
@@ -92,20 +94,20 @@ const std::vector<DockTables::DefaultDockLayout> DockTables::DEFAULT_DOCK_LAYOUT
|
||||
},
|
||||
.widgets = {
|
||||
/* DefaultDockGroup::TOP_RIGHT */
|
||||
{"DisassemblyWidget", DefaultDockGroup::TOP_RIGHT},
|
||||
{"DisassemblyView", DefaultDockGroup::TOP_RIGHT},
|
||||
/* DefaultDockGroup::BOTTOM */
|
||||
{"MemoryViewWidget", DefaultDockGroup::BOTTOM},
|
||||
{"BreakpointWidget", DefaultDockGroup::BOTTOM},
|
||||
{"ThreadWidget", DefaultDockGroup::BOTTOM},
|
||||
{"StackWidget", DefaultDockGroup::BOTTOM},
|
||||
{"SavedAddressesWidget", DefaultDockGroup::BOTTOM},
|
||||
{"GlobalVariableTreeWidget", DefaultDockGroup::BOTTOM},
|
||||
{"LocalVariableTreeWidget", DefaultDockGroup::BOTTOM},
|
||||
{"ParameterVariableTreeWidget", DefaultDockGroup::BOTTOM},
|
||||
{"MemoryView", DefaultDockGroup::BOTTOM},
|
||||
{"BreakpointView", DefaultDockGroup::BOTTOM},
|
||||
{"ThreadView", DefaultDockGroup::BOTTOM},
|
||||
{"StackView", DefaultDockGroup::BOTTOM},
|
||||
{"SavedAddressesView", DefaultDockGroup::BOTTOM},
|
||||
{"GlobalVariableTreeView", DefaultDockGroup::BOTTOM},
|
||||
{"LocalVariableTreeView", DefaultDockGroup::BOTTOM},
|
||||
{"ParameterVariableTreeView", DefaultDockGroup::BOTTOM},
|
||||
/* DefaultDockGroup::TOP_LEFT */
|
||||
{"RegisterWidget", DefaultDockGroup::TOP_LEFT},
|
||||
{"FunctionTreeWidget", DefaultDockGroup::TOP_LEFT},
|
||||
{"MemorySearchWidget", DefaultDockGroup::TOP_LEFT},
|
||||
{"RegisterView", DefaultDockGroup::TOP_LEFT},
|
||||
{"FunctionTreeView", DefaultDockGroup::TOP_LEFT},
|
||||
{"MemorySearchView", DefaultDockGroup::TOP_LEFT},
|
||||
},
|
||||
.toolbars = {
|
||||
"toolBarDebug",
|
||||
@@ -123,67 +125,43 @@ const DockTables::DefaultDockLayout* DockTables::defaultLayout(const std::string
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const std::string& DockTables::hashDefaultLayouts()
|
||||
u32 DockTables::hashDefaultLayouts()
|
||||
{
|
||||
static std::string hash;
|
||||
if (!hash.empty())
|
||||
return hash;
|
||||
static std::optional<u32> hash;
|
||||
if (hash.has_value())
|
||||
return *hash;
|
||||
|
||||
MD5Digest md5;
|
||||
hash.emplace(0);
|
||||
|
||||
u32 hash_version = 1;
|
||||
md5.Update(&hash_version, sizeof(hash_version));
|
||||
|
||||
u32 layout_count = static_cast<u32>(DEFAULT_DOCK_LAYOUTS.size());
|
||||
md5.Update(&layout_count, sizeof(layout_count));
|
||||
u32 hash_version = 2;
|
||||
hashNumber(hash_version, *hash);
|
||||
|
||||
hashNumber(static_cast<u32>(DEFAULT_DOCK_LAYOUTS.size()), *hash);
|
||||
for (const DefaultDockLayout& layout : DEFAULT_DOCK_LAYOUTS)
|
||||
hashDefaultLayout(layout, md5);
|
||||
hashDefaultLayout(layout, *hash);
|
||||
|
||||
u8 digest[16];
|
||||
md5.Final(digest);
|
||||
hash = fmt::format(
|
||||
"{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}{:02x}",
|
||||
digest[0], digest[1], digest[2], digest[3], digest[4], digest[5], digest[6], digest[7],
|
||||
digest[8], digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], digest[15]);
|
||||
|
||||
return hash;
|
||||
return *hash;
|
||||
}
|
||||
|
||||
void DockTables::hashDefaultLayout(const DefaultDockLayout& layout, MD5Digest& md5)
|
||||
static void hashDefaultLayout(const DockTables::DefaultDockLayout& layout, u32& hash)
|
||||
{
|
||||
u32 layout_name_size = static_cast<u32>(layout.name.size());
|
||||
md5.Update(&layout_name_size, sizeof(layout_name_size));
|
||||
md5.Update(layout.name.data(), layout_name_size);
|
||||
hashString(layout.name.c_str(), hash);
|
||||
hashString(DebugInterface::cpuName(layout.cpu), hash);
|
||||
|
||||
const char* cpu_name = DebugInterface::cpuName(layout.cpu);
|
||||
u32 cpu_name_size = static_cast<u32>(strlen(cpu_name));
|
||||
md5.Update(&cpu_name_size, sizeof(cpu_name_size));
|
||||
md5.Update(cpu_name, cpu_name_size);
|
||||
hashNumber(static_cast<u32>(layout.groups.size()), hash);
|
||||
for (const DockTables::DefaultDockGroupDescription& group : layout.groups)
|
||||
hashDefaultGroup(group, hash);
|
||||
|
||||
u32 group_count = static_cast<u32>(layout.groups.size());
|
||||
md5.Update(&group_count, sizeof(group_count));
|
||||
hashNumber(static_cast<u32>(layout.widgets.size()), hash);
|
||||
for (const DockTables::DefaultDockWidgetDescription& widget : layout.widgets)
|
||||
hashDefaultDockWidget(widget, hash);
|
||||
|
||||
for (const DefaultDockGroupDescription& group : layout.groups)
|
||||
hashDefaultGroup(group, md5);
|
||||
|
||||
u32 widget_count = static_cast<u32>(layout.widgets.size());
|
||||
md5.Update(&widget_count, sizeof(widget_count));
|
||||
|
||||
for (const DefaultDockWidgetDescription& widget : layout.widgets)
|
||||
hashDefaultDockWidget(widget, md5);
|
||||
|
||||
u32 toolbar_count = static_cast<u32>(layout.toolbars.size());
|
||||
md5.Update(&toolbar_count, sizeof(toolbar_count));
|
||||
hashNumber(static_cast<u32>(layout.toolbars.size()), hash);
|
||||
for (const std::string& toolbar : layout.toolbars)
|
||||
{
|
||||
u32 toolbar_size = toolbar.size();
|
||||
md5.Update(&toolbar_size, sizeof(toolbar_size));
|
||||
md5.Update(toolbar.data(), toolbar.size());
|
||||
}
|
||||
hashString(toolbar.c_str(), hash);
|
||||
}
|
||||
|
||||
void DockTables::hashDefaultGroup(const DefaultDockGroupDescription& group, MD5Digest& md5)
|
||||
static void hashDefaultGroup(const DockTables::DefaultDockGroupDescription& group, u32& hash)
|
||||
{
|
||||
// This is inline here so that it's obvious that changing it will affect the
|
||||
// result of the hash.
|
||||
@@ -207,20 +185,25 @@ void DockTables::hashDefaultGroup(const DefaultDockGroupDescription& group, MD5D
|
||||
break;
|
||||
}
|
||||
|
||||
u32 location_size = static_cast<u32>(strlen(location));
|
||||
md5.Update(&location_size, sizeof(location_size));
|
||||
md5.Update(location, location_size);
|
||||
|
||||
u32 parent = static_cast<u32>(group.parent);
|
||||
md5.Update(&parent, sizeof(parent));
|
||||
hashString(location, hash);
|
||||
hashNumber(static_cast<u32>(group.parent), hash);
|
||||
}
|
||||
|
||||
void DockTables::hashDefaultDockWidget(const DefaultDockWidgetDescription& widget, MD5Digest& md5)
|
||||
static void hashDefaultDockWidget(const DockTables::DefaultDockWidgetDescription& widget, u32& hash)
|
||||
{
|
||||
u32 type_size = static_cast<u32>(widget.type.size());
|
||||
md5.Update(&type_size, sizeof(type_size));
|
||||
md5.Update(widget.type.data(), type_size);
|
||||
|
||||
u32 group = static_cast<u32>(widget.group);
|
||||
md5.Update(&group, sizeof(group));
|
||||
hashString(widget.type.c_str(), hash);
|
||||
hashNumber(static_cast<u32>(widget.group), hash);
|
||||
}
|
||||
|
||||
static void hashNumber(u32 number, u32& hash)
|
||||
{
|
||||
hash = hash * 31 + number;
|
||||
}
|
||||
|
||||
static void hashString(const char* string, u32& hash)
|
||||
{
|
||||
u32 size = static_cast<u32>(strlen(string));
|
||||
hash = hash * 31 + size;
|
||||
for (u32 i = 0; i < size; i++)
|
||||
hash = hash * 31 + string[i];
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
|
||||
class MD5Digest;
|
||||
|
||||
class DebuggerWidget;
|
||||
struct DebuggerWidgetParameters;
|
||||
class DebuggerView;
|
||||
struct DebuggerViewParameters;
|
||||
|
||||
namespace DockTables
|
||||
{
|
||||
struct DebuggerWidgetDescription
|
||||
struct DebuggerViewDescription
|
||||
{
|
||||
DebuggerWidget* (*create_widget)(const DebuggerWidgetParameters& parameters);
|
||||
DebuggerView* (*create_widget)(const DebuggerViewParameters& parameters);
|
||||
|
||||
// The untranslated string displayed as the dock widget tab text.
|
||||
const char* display_name;
|
||||
@@ -28,7 +28,7 @@ namespace DockTables
|
||||
DockUtils::PreferredLocation preferred_location;
|
||||
};
|
||||
|
||||
extern const std::map<std::string, DebuggerWidgetDescription> DEBUGGER_WIDGETS;
|
||||
extern const std::map<std::string, DebuggerViewDescription> DEBUGGER_VIEWS;
|
||||
|
||||
enum class DefaultDockGroup
|
||||
{
|
||||
@@ -67,9 +67,5 @@ namespace DockTables
|
||||
|
||||
// This is used to determine if the user has updated and we need to recreate
|
||||
// the default layouts.
|
||||
const std::string& hashDefaultLayouts();
|
||||
|
||||
void hashDefaultLayout(const DefaultDockLayout& layout, MD5Digest& md5);
|
||||
void hashDefaultGroup(const DefaultDockGroupDescription& group, MD5Digest& md5);
|
||||
void hashDefaultDockWidget(const DefaultDockWidgetDescription& widget, MD5Digest& md5);
|
||||
u32 hashDefaultLayouts();
|
||||
} // namespace DockTables
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "DockViews.h"
|
||||
|
||||
#include "QtUtils.h"
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
#include "Debugger/DebuggerWindow.h"
|
||||
#include "Debugger/Docking/DockManager.h"
|
||||
#include "Debugger/Docking/DropIndicators.h"
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <QtWidgets/QInputDialog>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <QtWidgets/QMenu>
|
||||
#include <QtWidgets/QStyleFactory>
|
||||
|
||||
KDDockWidgets::Core::View* DockViewFactory::createDockWidget(
|
||||
const QString& unique_name,
|
||||
@@ -92,7 +93,7 @@ void DockWidget::openStateChanged(bool open)
|
||||
return;
|
||||
|
||||
if (!open && g_debugger_window)
|
||||
g_debugger_window->dockManager().destroyDebuggerWidget(uniqueName());
|
||||
g_debugger_window->dockManager().destroyDebuggerView(uniqueName());
|
||||
}
|
||||
|
||||
// *****************************************************************************
|
||||
@@ -143,6 +144,14 @@ DockTabBar::DockTabBar(KDDockWidgets::Core::TabBar* controller, QWidget* parent)
|
||||
{
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &DockTabBar::customContextMenuRequested, this, &DockTabBar::openContextMenu);
|
||||
|
||||
// The constructor of KDDockWidgets::QtWidgets::TabBar makes a QProxyStyle
|
||||
// that ends up taking ownerhsip of the style for the entire application!
|
||||
if (QProxyStyle* proxy_style = qobject_cast<QProxyStyle*>(style()))
|
||||
{
|
||||
proxy_style->baseStyle()->setParent(qApp);
|
||||
proxy_style->setBaseStyle(QStyleFactory::create(qApp->style()->name()));
|
||||
}
|
||||
}
|
||||
|
||||
void DockTabBar::openContextMenu(QPoint pos)
|
||||
@@ -157,7 +166,7 @@ void DockTabBar::openContextMenu(QPoint pos)
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
size_t dock_widgets_of_type = g_debugger_window->dockManager().countDebuggerWidgetsOfType(
|
||||
size_t dock_widgets_of_type = g_debugger_window->dockManager().countDebuggerViewsOfType(
|
||||
widget->metaObject()->className());
|
||||
|
||||
QMenu* menu = new QMenu(this);
|
||||
@@ -213,7 +222,7 @@ void DockTabBar::openContextMenu(QPoint pos)
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
g_debugger_window->dockManager().setPrimaryDebuggerWidget(widget, checked);
|
||||
g_debugger_window->dockManager().setPrimaryDebuggerView(widget, checked);
|
||||
});
|
||||
|
||||
QMenu* set_target_menu = menu->addMenu(tr("Set Target"));
|
||||
@@ -254,7 +263,7 @@ void DockTabBar::openContextMenu(QPoint pos)
|
||||
if (!widget)
|
||||
return;
|
||||
|
||||
g_debugger_window->dockManager().destroyDebuggerWidget(widget->uniqueName());
|
||||
g_debugger_window->dockManager().destroyDebuggerView(widget->uniqueName());
|
||||
});
|
||||
|
||||
menu->popup(mapToGlobal(pos));
|
||||
@@ -270,7 +279,7 @@ void DockTabBar::setCpuOverrideForTab(int tab_index, std::optional<BreakPointCpu
|
||||
return;
|
||||
|
||||
if (!widget->setCpuOverride(cpu_override))
|
||||
g_debugger_window->dockManager().recreateDebuggerWidget(view->uniqueName());
|
||||
g_debugger_window->dockManager().recreateDebuggerView(view->uniqueName());
|
||||
|
||||
g_debugger_window->dockManager().updateDockWidgetTitles();
|
||||
}
|
||||
@@ -287,7 +296,7 @@ DockTabBar::WidgetsFromTabIndexResult DockTabBar::widgetsFromTabIndex(int tab_in
|
||||
|
||||
auto dock_view = static_cast<KDDockWidgets::QtWidgets::DockWidget*>(dock_controller->view());
|
||||
|
||||
DebuggerWidget* widget = qobject_cast<DebuggerWidget*>(dock_view->widget());
|
||||
DebuggerView* widget = qobject_cast<DebuggerView*>(dock_view->widget());
|
||||
if (!widget)
|
||||
return {};
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <kddockwidgets/qtwidgets/views/TitleBar.h>
|
||||
#include <kddockwidgets/qtwidgets/views/TabBar.h>
|
||||
|
||||
class DebuggerWidget;
|
||||
class DebuggerView;
|
||||
class DockManager;
|
||||
|
||||
class DockViewFactory : public KDDockWidgets::QtWidgets::ViewFactory
|
||||
@@ -101,7 +101,7 @@ protected:
|
||||
|
||||
struct WidgetsFromTabIndexResult
|
||||
{
|
||||
DebuggerWidget* debugger_widget = nullptr;
|
||||
DebuggerView* widget = nullptr;
|
||||
KDDockWidgets::Core::DockWidget* controller = nullptr;
|
||||
KDDockWidgets::QtWidgets::DockWidget* view = nullptr;
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "MemorySearchWidget.h"
|
||||
#include "MemorySearchView.h"
|
||||
|
||||
#include "DebugTools/DebugInterface.h"
|
||||
|
||||
@@ -17,33 +17,33 @@
|
||||
#include <QtCore/QFutureWatcher>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
using SearchComparison = MemorySearchWidget::SearchComparison;
|
||||
using SearchType = MemorySearchWidget::SearchType;
|
||||
using SearchResult = MemorySearchWidget::SearchResult;
|
||||
using SearchComparison = MemorySearchView::SearchComparison;
|
||||
using SearchType = MemorySearchView::SearchType;
|
||||
using SearchResult = MemorySearchView::SearchResult;
|
||||
|
||||
using namespace QtUtils;
|
||||
|
||||
MemorySearchWidget::MemorySearchWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, MONOSPACE_FONT)
|
||||
MemorySearchView::MemorySearchView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, MONOSPACE_FONT)
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
this->repaint();
|
||||
|
||||
m_ui.listSearchResults->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_ui.btnSearch, &QPushButton::clicked, this, &MemorySearchWidget::onSearchButtonClicked);
|
||||
connect(m_ui.btnFilterSearch, &QPushButton::clicked, this, &MemorySearchWidget::onSearchButtonClicked);
|
||||
connect(m_ui.btnSearch, &QPushButton::clicked, this, &MemorySearchView::onSearchButtonClicked);
|
||||
connect(m_ui.btnFilterSearch, &QPushButton::clicked, this, &MemorySearchView::onSearchButtonClicked);
|
||||
connect(m_ui.listSearchResults, &QListWidget::itemDoubleClicked, [](QListWidgetItem* item) {
|
||||
goToInMemoryView(item->text().toUInt(nullptr, 16), true);
|
||||
});
|
||||
connect(m_ui.listSearchResults->verticalScrollBar(), &QScrollBar::valueChanged, this, &MemorySearchWidget::onSearchResultsListScroll);
|
||||
connect(m_ui.listSearchResults, &QListView::customContextMenuRequested, this, &MemorySearchWidget::onListSearchResultsContextMenu);
|
||||
connect(m_ui.cmbSearchType, &QComboBox::currentIndexChanged, this, &MemorySearchWidget::onSearchTypeChanged);
|
||||
connect(m_ui.cmbSearchComparison, &QComboBox::currentIndexChanged, this, &MemorySearchWidget::onSearchComparisonChanged);
|
||||
connect(m_ui.listSearchResults->verticalScrollBar(), &QScrollBar::valueChanged, this, &MemorySearchView::onSearchResultsListScroll);
|
||||
connect(m_ui.listSearchResults, &QListView::customContextMenuRequested, this, &MemorySearchView::onListSearchResultsContextMenu);
|
||||
connect(m_ui.cmbSearchType, &QComboBox::currentIndexChanged, this, &MemorySearchView::onSearchTypeChanged);
|
||||
connect(m_ui.cmbSearchComparison, &QComboBox::currentIndexChanged, this, &MemorySearchView::onSearchComparisonChanged);
|
||||
|
||||
// Ensures we don't retrigger the load results function unintentionally
|
||||
m_resultsLoadTimer.setInterval(100);
|
||||
m_resultsLoadTimer.setSingleShot(true);
|
||||
connect(&m_resultsLoadTimer, &QTimer::timeout, this, &MemorySearchWidget::loadSearchResults);
|
||||
connect(&m_resultsLoadTimer, &QTimer::timeout, this, &MemorySearchView::loadSearchResults);
|
||||
|
||||
receiveEvent<DebuggerEvents::Refresh>([this](const DebuggerEvents::Refresh& event) -> bool {
|
||||
update();
|
||||
@@ -51,7 +51,7 @@ MemorySearchWidget::MemorySearchWidget(const DebuggerWidgetParameters& parameter
|
||||
});
|
||||
}
|
||||
|
||||
void MemorySearchWidget::contextRemoveSearchResult()
|
||||
void MemorySearchView::contextRemoveSearchResult()
|
||||
{
|
||||
const QItemSelectionModel* selModel = m_ui.listSearchResults->selectionModel();
|
||||
if (!selModel->hasSelection())
|
||||
@@ -67,7 +67,7 @@ void MemorySearchWidget::contextRemoveSearchResult()
|
||||
delete rowToRemove;
|
||||
}
|
||||
|
||||
void MemorySearchWidget::contextCopySearchResultAddress()
|
||||
void MemorySearchView::contextCopySearchResultAddress()
|
||||
{
|
||||
if (!m_ui.listSearchResults->selectionModel()->hasSelection())
|
||||
return;
|
||||
@@ -78,7 +78,7 @@ void MemorySearchWidget::contextCopySearchResultAddress()
|
||||
QApplication::clipboard()->setText(addressString);
|
||||
}
|
||||
|
||||
void MemorySearchWidget::onListSearchResultsContextMenu(QPoint pos)
|
||||
void MemorySearchView::onListSearchResultsContextMenu(QPoint pos)
|
||||
{
|
||||
const QItemSelectionModel* selection_model = m_ui.listSearchResults->selectionModel();
|
||||
const QListWidget* list_search_results = m_ui.listSearchResults;
|
||||
@@ -89,7 +89,7 @@ void MemorySearchWidget::onListSearchResultsContextMenu(QPoint pos)
|
||||
if (selection_model->hasSelection())
|
||||
{
|
||||
connect(menu->addAction(tr("Copy Address")), &QAction::triggered,
|
||||
this, &MemorySearchWidget::contextCopySearchResultAddress);
|
||||
this, &MemorySearchView::contextCopySearchResultAddress);
|
||||
|
||||
createEventActions<DebuggerEvents::GoToAddress>(menu, [list_search_results]() {
|
||||
u32 selected_address = list_search_results->selectedItems().first()->data(Qt::UserRole).toUInt();
|
||||
@@ -106,7 +106,7 @@ void MemorySearchWidget::onListSearchResultsContextMenu(QPoint pos)
|
||||
});
|
||||
|
||||
connect(menu->addAction(tr("Remove Result")), &QAction::triggered,
|
||||
this, &MemorySearchWidget::contextRemoveSearchResult);
|
||||
this, &MemorySearchView::contextRemoveSearchResult);
|
||||
}
|
||||
|
||||
menu->popup(m_ui.listSearchResults->viewport()->mapToGlobal(pos));
|
||||
@@ -297,7 +297,7 @@ void searchWorker(DebugInterface* cpu, std::vector<SearchResult>& searchResults,
|
||||
T readValue = readValueAtAddress<T>(cpu, addr);
|
||||
if (handleSearchComparison(searchComparison, addr, nullptr, searchValue, readValue))
|
||||
{
|
||||
searchResults.push_back(MemorySearchWidget::SearchResult(addr, QVariant::fromValue(readValue), searchType));
|
||||
searchResults.push_back(MemorySearchView::SearchResult(addr, QVariant::fromValue(readValue), searchType));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,7 +312,7 @@ void searchWorker(DebugInterface* cpu, std::vector<SearchResult>& searchResults,
|
||||
|
||||
const bool doesMatch = handleSearchComparison(searchComparison, addr, &searchResult, searchValue, readValue);
|
||||
if (!doesMatch)
|
||||
searchResult = MemorySearchWidget::SearchResult(addr, QVariant::fromValue(readValue), searchType);
|
||||
searchResult = MemorySearchView::SearchResult(addr, QVariant::fromValue(readValue), searchType);
|
||||
|
||||
return !doesMatch;
|
||||
});
|
||||
@@ -399,7 +399,7 @@ static void searchWorkerByteArray(DebugInterface* cpu, SearchType searchType, Se
|
||||
continue;
|
||||
if (handleArraySearchComparison(cpu, searchComparison, addr, nullptr, searchValue))
|
||||
{
|
||||
searchResults.push_back(MemorySearchWidget::SearchResult(addr, searchValue, searchType));
|
||||
searchResults.push_back(MemorySearchView::SearchResult(addr, searchValue, searchType));
|
||||
addr += searchValue.length() - 1;
|
||||
}
|
||||
}
|
||||
@@ -421,7 +421,7 @@ static void searchWorkerByteArray(DebugInterface* cpu, SearchType searchType, Se
|
||||
matchValue = searchResult.getArrayValue();
|
||||
else
|
||||
matchValue = readArrayAtAddress(cpu, addr, searchValue.length() - 1);
|
||||
searchResult = MemorySearchWidget::SearchResult(addr, matchValue, searchType);
|
||||
searchResult = MemorySearchView::SearchResult(addr, matchValue, searchType);
|
||||
}
|
||||
return !doesMatch;
|
||||
});
|
||||
@@ -465,7 +465,7 @@ std::vector<SearchResult> startWorker(DebugInterface* cpu, const SearchType type
|
||||
return searchResults;
|
||||
}
|
||||
|
||||
void MemorySearchWidget::onSearchButtonClicked()
|
||||
void MemorySearchView::onSearchButtonClicked()
|
||||
{
|
||||
if (!cpu().isAlive())
|
||||
return;
|
||||
@@ -612,7 +612,7 @@ void MemorySearchWidget::onSearchButtonClicked()
|
||||
m_ui.resultsCountLabel->setVisible(true);
|
||||
}
|
||||
|
||||
void MemorySearchWidget::onSearchResultsListScroll(u32 value)
|
||||
void MemorySearchView::onSearchResultsListScroll(u32 value)
|
||||
{
|
||||
const bool hasResultsToLoad = static_cast<size_t>(m_ui.listSearchResults->count()) < m_searchResults.size();
|
||||
const bool scrolledSufficiently = value > (m_ui.listSearchResults->verticalScrollBar()->maximum() * 0.95);
|
||||
@@ -623,7 +623,7 @@ void MemorySearchWidget::onSearchResultsListScroll(u32 value)
|
||||
}
|
||||
}
|
||||
|
||||
void MemorySearchWidget::loadSearchResults()
|
||||
void MemorySearchView::loadSearchResults()
|
||||
{
|
||||
const u32 numLoaded = m_ui.listSearchResults->count();
|
||||
const u32 amountLeftToLoad = m_searchResults.size() - numLoaded;
|
||||
@@ -643,18 +643,18 @@ void MemorySearchWidget::loadSearchResults()
|
||||
}
|
||||
}
|
||||
|
||||
SearchType MemorySearchWidget::getCurrentSearchType()
|
||||
SearchType MemorySearchView::getCurrentSearchType()
|
||||
{
|
||||
return static_cast<SearchType>(m_ui.cmbSearchType->currentIndex());
|
||||
}
|
||||
|
||||
SearchComparison MemorySearchWidget::getCurrentSearchComparison()
|
||||
SearchComparison MemorySearchView::getCurrentSearchComparison()
|
||||
{
|
||||
// Note: The index can't be converted directly to the enum value since we change what comparisons are shown.
|
||||
return m_searchComparisonLabelMap.labelToEnum(m_ui.cmbSearchComparison->currentText());
|
||||
}
|
||||
|
||||
bool MemorySearchWidget::doesSearchComparisonTakeInput(const SearchComparison comparison)
|
||||
bool MemorySearchView::doesSearchComparisonTakeInput(const SearchComparison comparison)
|
||||
{
|
||||
switch (comparison)
|
||||
{
|
||||
@@ -672,7 +672,7 @@ bool MemorySearchWidget::doesSearchComparisonTakeInput(const SearchComparison co
|
||||
}
|
||||
}
|
||||
|
||||
void MemorySearchWidget::onSearchTypeChanged(int newIndex)
|
||||
void MemorySearchView::onSearchTypeChanged(int newIndex)
|
||||
{
|
||||
if (newIndex < 4)
|
||||
m_ui.chkSearchHex->setEnabled(true);
|
||||
@@ -689,12 +689,12 @@ void MemorySearchWidget::onSearchTypeChanged(int newIndex)
|
||||
updateSearchComparisonSelections();
|
||||
}
|
||||
|
||||
void MemorySearchWidget::onSearchComparisonChanged(int newValue)
|
||||
void MemorySearchView::onSearchComparisonChanged(int newValue)
|
||||
{
|
||||
m_ui.txtSearchValue->setEnabled(getCurrentSearchComparison() != SearchComparison::UnknownValue);
|
||||
}
|
||||
|
||||
void MemorySearchWidget::updateSearchComparisonSelections()
|
||||
void MemorySearchView::updateSearchComparisonSelections()
|
||||
{
|
||||
const QString selectedComparisonLabel = m_ui.cmbSearchComparison->currentText();
|
||||
const SearchComparison selectedComparison = m_searchComparisonLabelMap.labelToEnum(selectedComparisonLabel);
|
||||
@@ -713,7 +713,7 @@ void MemorySearchWidget::updateSearchComparisonSelections()
|
||||
m_ui.cmbSearchComparison->setCurrentText(selectedComparisonLabel);
|
||||
}
|
||||
|
||||
std::vector<SearchComparison> MemorySearchWidget::getValidSearchComparisonsForState(SearchType type, std::vector<SearchResult>& existingResults)
|
||||
std::vector<SearchComparison> MemorySearchView::getValidSearchComparisonsForState(SearchType type, std::vector<SearchResult>& existingResults)
|
||||
{
|
||||
const bool hasResults = existingResults.size() > 0;
|
||||
std::vector<SearchComparison> comparisons = {SearchComparison::Equals};
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_MemorySearchWidget.h"
|
||||
#include "ui_MemorySearchView.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
|
||||
#include "DebugTools/DebugInterface.h"
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
class MemorySearchWidget final : public DebuggerWidget
|
||||
class MemorySearchView final : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MemorySearchWidget(const DebuggerWidgetParameters& parameters);
|
||||
~MemorySearchWidget() = default;
|
||||
MemorySearchView(const DebuggerViewParameters& parameters);
|
||||
~MemorySearchView() = default;
|
||||
|
||||
enum class SearchType
|
||||
{
|
||||
@@ -136,7 +136,7 @@ public slots:
|
||||
private:
|
||||
std::vector<SearchResult> m_searchResults;
|
||||
SearchComparisonLabelMap m_searchComparisonLabelMap;
|
||||
Ui::MemorySearchWidget m_ui;
|
||||
Ui::MemorySearchView m_ui;
|
||||
QTimer m_resultsLoadTimer;
|
||||
|
||||
u32 m_initialResultsLoadLimit = 20000;
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MemorySearchWidget</class>
|
||||
<widget class="QWidget" name="MemorySearchWidget">
|
||||
<class>MemorySearchView</class>
|
||||
<widget class="QWidget" name="MemorySearchView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "MemoryViewWidget.h"
|
||||
#include "MemoryView.h"
|
||||
|
||||
#include "Debugger/JsonValueWrapper.h"
|
||||
|
||||
@@ -451,10 +451,10 @@ bool MemoryViewTable::KeyPress(int key, QChar keychar, DebugInterface& cpu)
|
||||
}
|
||||
|
||||
/*
|
||||
MemoryViewWidget
|
||||
MemoryView
|
||||
*/
|
||||
MemoryViewWidget::MemoryViewWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, MONOSPACE_FONT)
|
||||
MemoryView::MemoryView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, MONOSPACE_FONT)
|
||||
, m_table(this)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
@@ -462,7 +462,7 @@ MemoryViewWidget::MemoryViewWidget(const DebuggerWidgetParameters& parameters)
|
||||
setFocusPolicy(Qt::FocusPolicy::ClickFocus);
|
||||
|
||||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &MemoryViewWidget::customContextMenuRequested, this, &MemoryViewWidget::openContextMenu);
|
||||
connect(this, &MemoryView::customContextMenuRequested, this, &MemoryView::openContextMenu);
|
||||
|
||||
m_table.UpdateStartAddress(0x100000);
|
||||
|
||||
@@ -485,20 +485,20 @@ MemoryViewWidget::MemoryViewWidget(const DebuggerWidgetParameters& parameters)
|
||||
});
|
||||
}
|
||||
|
||||
MemoryViewWidget::~MemoryViewWidget() = default;
|
||||
MemoryView::~MemoryView() = default;
|
||||
|
||||
void MemoryViewWidget::toJson(JsonValueWrapper& json)
|
||||
void MemoryView::toJson(JsonValueWrapper& json)
|
||||
{
|
||||
DebuggerWidget::toJson(json);
|
||||
DebuggerView::toJson(json);
|
||||
|
||||
json.value().AddMember("startAddress", m_table.startAddress, json.allocator());
|
||||
json.value().AddMember("viewType", static_cast<int>(m_table.GetViewType()), json.allocator());
|
||||
json.value().AddMember("littleEndian", m_table.GetLittleEndian(), json.allocator());
|
||||
}
|
||||
|
||||
bool MemoryViewWidget::fromJson(const JsonValueWrapper& json)
|
||||
bool MemoryView::fromJson(const JsonValueWrapper& json)
|
||||
{
|
||||
if (!DebuggerWidget::fromJson(json))
|
||||
if (!DebuggerView::fromJson(json))
|
||||
return false;
|
||||
|
||||
auto start_address = json.value().FindMember("startAddress");
|
||||
@@ -525,7 +525,7 @@ bool MemoryViewWidget::fromJson(const JsonValueWrapper& json)
|
||||
return true;
|
||||
}
|
||||
|
||||
void MemoryViewWidget::paintEvent(QPaintEvent* event)
|
||||
void MemoryView::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
@@ -537,7 +537,7 @@ void MemoryViewWidget::paintEvent(QPaintEvent* event)
|
||||
m_table.DrawTable(painter, this->palette(), this->height(), cpu());
|
||||
}
|
||||
|
||||
void MemoryViewWidget::mousePressEvent(QMouseEvent* event)
|
||||
void MemoryView::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
if (!cpu().isAlive())
|
||||
return;
|
||||
@@ -546,7 +546,7 @@ void MemoryViewWidget::mousePressEvent(QMouseEvent* event)
|
||||
repaint();
|
||||
}
|
||||
|
||||
void MemoryViewWidget::openContextMenu(QPoint pos)
|
||||
void MemoryView::openContextMenu(QPoint pos)
|
||||
{
|
||||
if (!cpu().isAlive())
|
||||
return;
|
||||
@@ -615,10 +615,10 @@ void MemoryViewWidget::openContextMenu(QPoint pos)
|
||||
return std::optional(event);
|
||||
});
|
||||
|
||||
connect(menu->addAction(tr("Copy Byte")), &QAction::triggered, this, &MemoryViewWidget::contextCopyByte);
|
||||
connect(menu->addAction(tr("Copy Segment")), &QAction::triggered, this, &MemoryViewWidget::contextCopySegment);
|
||||
connect(menu->addAction(tr("Copy Character")), &QAction::triggered, this, &MemoryViewWidget::contextCopyCharacter);
|
||||
connect(menu->addAction(tr("Paste")), &QAction::triggered, this, &MemoryViewWidget::contextPaste);
|
||||
connect(menu->addAction(tr("Copy Byte")), &QAction::triggered, this, &MemoryView::contextCopyByte);
|
||||
connect(menu->addAction(tr("Copy Segment")), &QAction::triggered, this, &MemoryView::contextCopySegment);
|
||||
connect(menu->addAction(tr("Copy Character")), &QAction::triggered, this, &MemoryView::contextCopyCharacter);
|
||||
connect(menu->addAction(tr("Paste")), &QAction::triggered, this, &MemoryView::contextPaste);
|
||||
|
||||
menu->popup(this->mapToGlobal(pos));
|
||||
|
||||
@@ -626,27 +626,27 @@ void MemoryViewWidget::openContextMenu(QPoint pos)
|
||||
return;
|
||||
}
|
||||
|
||||
void MemoryViewWidget::contextCopyByte()
|
||||
void MemoryView::contextCopyByte()
|
||||
{
|
||||
QApplication::clipboard()->setText(QString::number(cpu().read8(m_table.selectedAddress), 16).toUpper());
|
||||
}
|
||||
|
||||
void MemoryViewWidget::contextCopySegment()
|
||||
void MemoryView::contextCopySegment()
|
||||
{
|
||||
QApplication::clipboard()->setText(QString::number(m_table.GetSelectedSegment(cpu()).lo, 16).toUpper());
|
||||
}
|
||||
|
||||
void MemoryViewWidget::contextCopyCharacter()
|
||||
void MemoryView::contextCopyCharacter()
|
||||
{
|
||||
QApplication::clipboard()->setText(QChar::fromLatin1(cpu().read8(m_table.selectedAddress)).toUpper());
|
||||
}
|
||||
|
||||
void MemoryViewWidget::contextPaste()
|
||||
void MemoryView::contextPaste()
|
||||
{
|
||||
m_table.InsertAtCurrentSelection(QApplication::clipboard()->text(), cpu());
|
||||
}
|
||||
|
||||
void MemoryViewWidget::contextGoToAddress()
|
||||
void MemoryView::contextGoToAddress()
|
||||
{
|
||||
bool ok;
|
||||
QString targetString = QInputDialog::getText(this, tr("Go To In Memory View"), "",
|
||||
@@ -666,11 +666,11 @@ void MemoryViewWidget::contextGoToAddress()
|
||||
gotoAddress(static_cast<u32>(address));
|
||||
}
|
||||
|
||||
void MemoryViewWidget::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
void MemoryView::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
{
|
||||
}
|
||||
|
||||
void MemoryViewWidget::wheelEvent(QWheelEvent* event)
|
||||
void MemoryView::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
if (event->angleDelta().y() < 0)
|
||||
{
|
||||
@@ -683,7 +683,7 @@ void MemoryViewWidget::wheelEvent(QWheelEvent* event)
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void MemoryViewWidget::keyPressEvent(QKeyEvent* event)
|
||||
void MemoryView::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
if (!m_table.KeyPress(event->key(), event->text().size() ? event->text()[0] : '\0', cpu()))
|
||||
{
|
||||
@@ -701,10 +701,10 @@ void MemoryViewWidget::keyPressEvent(QKeyEvent* event)
|
||||
}
|
||||
}
|
||||
this->repaint();
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
}
|
||||
|
||||
void MemoryViewWidget::gotoAddress(u32 address)
|
||||
void MemoryView::gotoAddress(u32 address)
|
||||
{
|
||||
m_table.UpdateStartAddress(address & ~0xF);
|
||||
m_table.selectedAddress = address;
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_MemoryViewWidget.h"
|
||||
#include "ui_MemoryView.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
|
||||
#include "DebugTools/DebugInterface.h"
|
||||
#include "DebugTools/DisassemblyManager.h"
|
||||
@@ -104,13 +104,13 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class MemoryViewWidget final : public DebuggerWidget
|
||||
class MemoryView final : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MemoryViewWidget(const DebuggerWidgetParameters& parameters);
|
||||
~MemoryViewWidget();
|
||||
MemoryView(const DebuggerViewParameters& parameters);
|
||||
~MemoryView();
|
||||
|
||||
void toJson(JsonValueWrapper& json) override;
|
||||
bool fromJson(const JsonValueWrapper& json) override;
|
||||
@@ -133,7 +133,7 @@ public slots:
|
||||
void gotoAddress(u32 address);
|
||||
|
||||
private:
|
||||
Ui::MemoryViewWidget ui;
|
||||
Ui::MemoryView ui;
|
||||
|
||||
MemoryViewTable m_table;
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MemoryViewWidget</class>
|
||||
<widget class="QWidget" name="MemoryViewWidget">
|
||||
<class>MemoryView</class>
|
||||
<widget class="QWidget" name="MemoryView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "SavedAddressesWidget.h"
|
||||
#include "SavedAddressesView.h"
|
||||
|
||||
#include "QtUtils.h"
|
||||
#include "Debugger/DebuggerSettingsManager.h"
|
||||
@@ -9,8 +9,8 @@
|
||||
#include <QtGui/QClipboard>
|
||||
#include <QtWidgets/QMenu>
|
||||
|
||||
SavedAddressesWidget::SavedAddressesWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, DISALLOW_MULTIPLE_INSTANCES)
|
||||
SavedAddressesView::SavedAddressesView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, DISALLOW_MULTIPLE_INSTANCES)
|
||||
, m_model(SavedAddressesModel::getInstance(cpu()))
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
@@ -19,7 +19,7 @@ SavedAddressesWidget::SavedAddressesWidget(const DebuggerWidgetParameters& param
|
||||
|
||||
m_ui.savedAddressesList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_ui.savedAddressesList, &QTableView::customContextMenuRequested,
|
||||
this, &SavedAddressesWidget::openContextMenu);
|
||||
this, &SavedAddressesView::openContextMenu);
|
||||
|
||||
connect(g_emu_thread, &EmuThread::onGameChanged, this, [this](const QString& title) {
|
||||
if (title.isEmpty())
|
||||
@@ -51,13 +51,13 @@ SavedAddressesWidget::SavedAddressesWidget(const DebuggerWidgetParameters& param
|
||||
});
|
||||
}
|
||||
|
||||
void SavedAddressesWidget::openContextMenu(QPoint pos)
|
||||
void SavedAddressesView::openContextMenu(QPoint pos)
|
||||
{
|
||||
QMenu* menu = new QMenu(this);
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QAction* new_action = menu->addAction(tr("New"));
|
||||
connect(new_action, &QAction::triggered, this, &SavedAddressesWidget::contextNew);
|
||||
connect(new_action, &QAction::triggered, this, &SavedAddressesView::contextNew);
|
||||
|
||||
const QModelIndex index_at_pos = m_ui.savedAddressesList->indexAt(pos);
|
||||
const bool is_index_valid = index_at_pos.isValid();
|
||||
@@ -92,7 +92,7 @@ void SavedAddressesWidget::openContextMenu(QPoint pos)
|
||||
}
|
||||
|
||||
QAction* paste_from_csv_action = menu->addAction(tr("Paste from CSV"));
|
||||
connect(paste_from_csv_action, &QAction::triggered, this, &SavedAddressesWidget::contextPasteCSV);
|
||||
connect(paste_from_csv_action, &QAction::triggered, this, &SavedAddressesView::contextPasteCSV);
|
||||
|
||||
QAction* load_action = menu->addAction(tr("Load from Settings"));
|
||||
load_action->setEnabled(is_cpu_alive);
|
||||
@@ -103,7 +103,7 @@ void SavedAddressesWidget::openContextMenu(QPoint pos)
|
||||
|
||||
QAction* save_action = menu->addAction(tr("Save to Settings"));
|
||||
save_action->setEnabled(is_cpu_alive);
|
||||
connect(save_action, &QAction::triggered, this, &SavedAddressesWidget::saveToDebuggerSettings);
|
||||
connect(save_action, &QAction::triggered, this, &SavedAddressesView::saveToDebuggerSettings);
|
||||
|
||||
QAction* delete_action = menu->addAction(tr("Delete"));
|
||||
connect(delete_action, &QAction::triggered, this, [this, index_at_pos]() {
|
||||
@@ -114,7 +114,7 @@ void SavedAddressesWidget::openContextMenu(QPoint pos)
|
||||
menu->popup(m_ui.savedAddressesList->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void SavedAddressesWidget::contextPasteCSV()
|
||||
void SavedAddressesView::contextPasteCSV()
|
||||
{
|
||||
QString csv = QGuiApplication::clipboard()->text();
|
||||
// Skip header
|
||||
@@ -139,14 +139,14 @@ void SavedAddressesWidget::contextPasteCSV()
|
||||
}
|
||||
}
|
||||
|
||||
void SavedAddressesWidget::contextNew()
|
||||
void SavedAddressesView::contextNew()
|
||||
{
|
||||
m_model->addRow();
|
||||
const u32 row_count = m_model->rowCount();
|
||||
m_ui.savedAddressesList->edit(m_model->index(row_count - 1, 0));
|
||||
}
|
||||
|
||||
void SavedAddressesWidget::addAddress(u32 address)
|
||||
void SavedAddressesView::addAddress(u32 address)
|
||||
{
|
||||
m_model->addRow();
|
||||
|
||||
@@ -160,7 +160,7 @@ void SavedAddressesWidget::addAddress(u32 address)
|
||||
m_ui.savedAddressesList->edit(label_index);
|
||||
}
|
||||
|
||||
void SavedAddressesWidget::saveToDebuggerSettings()
|
||||
void SavedAddressesView::saveToDebuggerSettings()
|
||||
{
|
||||
DebuggerSettingsManager::saveGameSettings(m_model);
|
||||
}
|
||||
@@ -3,18 +3,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_SavedAddressesWidget.h"
|
||||
#include "ui_SavedAddressesView.h"
|
||||
|
||||
#include "SavedAddressesModel.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
|
||||
class SavedAddressesWidget : public DebuggerWidget
|
||||
class SavedAddressesView : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SavedAddressesWidget(const DebuggerWidgetParameters& parameters);
|
||||
SavedAddressesView(const DebuggerViewParameters& parameters);
|
||||
|
||||
void openContextMenu(QPoint pos);
|
||||
void contextPasteCSV();
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
void saveToDebuggerSettings();
|
||||
|
||||
private:
|
||||
Ui::SavedAddressesWidget m_ui;
|
||||
Ui::SavedAddressesView m_ui;
|
||||
|
||||
SavedAddressesModel* m_model;
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SavedAddressesWidget</class>
|
||||
<widget class="QWidget" name="SavedAddressesWidget">
|
||||
<class>SavedAddressesView</class>
|
||||
<widget class="QWidget" name="SavedAddressesView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "RegisterWidget.h"
|
||||
#include "RegisterView.h"
|
||||
|
||||
#include "Debugger/JsonValueWrapper.h"
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
|
||||
using namespace QtUtils;
|
||||
|
||||
RegisterWidget::RegisterWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, MONOSPACE_FONT)
|
||||
RegisterView::RegisterView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, MONOSPACE_FONT)
|
||||
{
|
||||
this->setContextMenuPolicy(Qt::ContextMenuPolicy::CustomContextMenu);
|
||||
|
||||
ui.setupUi(this);
|
||||
ui.registerTabs->setDrawBase(false);
|
||||
|
||||
connect(this, &RegisterWidget::customContextMenuRequested, this, &RegisterWidget::customMenuRequested);
|
||||
connect(ui.registerTabs, &QTabBar::currentChanged, this, &RegisterWidget::tabCurrentChanged);
|
||||
connect(this, &RegisterView::customContextMenuRequested, this, &RegisterView::customMenuRequested);
|
||||
connect(ui.registerTabs, &QTabBar::currentChanged, this, &RegisterView::tabCurrentChanged);
|
||||
|
||||
for (int i = 0; i < cpu().getRegisterCategoryCount(); i++)
|
||||
{
|
||||
@@ -45,21 +45,21 @@ RegisterWidget::RegisterWidget(const DebuggerWidgetParameters& parameters)
|
||||
});
|
||||
}
|
||||
|
||||
RegisterWidget::~RegisterWidget()
|
||||
RegisterView::~RegisterView()
|
||||
{
|
||||
}
|
||||
|
||||
void RegisterWidget::toJson(JsonValueWrapper& json)
|
||||
void RegisterView::toJson(JsonValueWrapper& json)
|
||||
{
|
||||
DebuggerWidget::toJson(json);
|
||||
DebuggerView::toJson(json);
|
||||
|
||||
json.value().AddMember("showVU0FFloat", m_showVU0FFloat, json.allocator());
|
||||
json.value().AddMember("showFPRFloat", m_showFPRFloat, json.allocator());
|
||||
}
|
||||
|
||||
bool RegisterWidget::fromJson(const JsonValueWrapper& json)
|
||||
bool RegisterView::fromJson(const JsonValueWrapper& json)
|
||||
{
|
||||
if (!DebuggerWidget::fromJson(json))
|
||||
if (!DebuggerView::fromJson(json))
|
||||
return false;
|
||||
|
||||
auto show_vu0f_float = json.value().FindMember("showVU0FFloat");
|
||||
@@ -75,12 +75,12 @@ bool RegisterWidget::fromJson(const JsonValueWrapper& json)
|
||||
return true;
|
||||
}
|
||||
|
||||
void RegisterWidget::tabCurrentChanged(int cur)
|
||||
void RegisterView::tabCurrentChanged(int cur)
|
||||
{
|
||||
m_rowStart = 0;
|
||||
}
|
||||
|
||||
void RegisterWidget::paintEvent(QPaintEvent* event)
|
||||
void RegisterView::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.setPen(this->palette().text().color());
|
||||
@@ -190,7 +190,7 @@ void RegisterWidget::paintEvent(QPaintEvent* event)
|
||||
painter.end();
|
||||
}
|
||||
|
||||
void RegisterWidget::mousePressEvent(QMouseEvent* event)
|
||||
void RegisterView::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
m_selectedRow = static_cast<int>(((event->position().y() - m_renderStart.y()) / m_rowHeight)) + m_rowStart;
|
||||
@@ -213,7 +213,7 @@ void RegisterWidget::mousePressEvent(QMouseEvent* event)
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void RegisterWidget::wheelEvent(QWheelEvent* event)
|
||||
void RegisterView::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
if (event->angleDelta().y() < 0 && m_rowEnd < cpu().getRegisterCount(ui.registerTabs->currentIndex()))
|
||||
{
|
||||
@@ -227,7 +227,7 @@ void RegisterWidget::wheelEvent(QWheelEvent* event)
|
||||
this->repaint();
|
||||
}
|
||||
|
||||
void RegisterWidget::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
void RegisterView::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
{
|
||||
if (!cpu().isAlive())
|
||||
return;
|
||||
@@ -240,7 +240,7 @@ void RegisterWidget::mouseDoubleClickEvent(QMouseEvent* event)
|
||||
contextChangeValue();
|
||||
}
|
||||
|
||||
void RegisterWidget::customMenuRequested(QPoint pos)
|
||||
void RegisterView::customMenuRequested(QPoint pos)
|
||||
{
|
||||
if (!cpu().isAlive())
|
||||
return;
|
||||
@@ -281,13 +281,13 @@ void RegisterWidget::customMenuRequested(QPoint pos)
|
||||
|
||||
if (cpu().getRegisterSize(categoryIndex) == 128)
|
||||
{
|
||||
connect(menu->addAction(tr("Copy Top Half")), &QAction::triggered, this, &RegisterWidget::contextCopyTop);
|
||||
connect(menu->addAction(tr("Copy Bottom Half")), &QAction::triggered, this, &RegisterWidget::contextCopyBottom);
|
||||
connect(menu->addAction(tr("Copy Segment")), &QAction::triggered, this, &RegisterWidget::contextCopySegment);
|
||||
connect(menu->addAction(tr("Copy Top Half")), &QAction::triggered, this, &RegisterView::contextCopyTop);
|
||||
connect(menu->addAction(tr("Copy Bottom Half")), &QAction::triggered, this, &RegisterView::contextCopyBottom);
|
||||
connect(menu->addAction(tr("Copy Segment")), &QAction::triggered, this, &RegisterView::contextCopySegment);
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(menu->addAction(tr("Copy Value")), &QAction::triggered, this, &RegisterWidget::contextCopyValue);
|
||||
connect(menu->addAction(tr("Copy Value")), &QAction::triggered, this, &RegisterView::contextCopyValue);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
@@ -295,16 +295,16 @@ void RegisterWidget::customMenuRequested(QPoint pos)
|
||||
if (cpu().getRegisterSize(categoryIndex) == 128)
|
||||
{
|
||||
connect(menu->addAction(tr("Change Top Half")), &QAction::triggered,
|
||||
this, &RegisterWidget::contextChangeTop);
|
||||
this, &RegisterView::contextChangeTop);
|
||||
connect(menu->addAction(tr("Change Bottom Half")), &QAction::triggered,
|
||||
this, &RegisterWidget::contextChangeBottom);
|
||||
this, &RegisterView::contextChangeBottom);
|
||||
connect(menu->addAction(tr("Change Segment")), &QAction::triggered,
|
||||
this, &RegisterWidget::contextChangeSegment);
|
||||
this, &RegisterView::contextChangeSegment);
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(menu->addAction(tr("Change Value")), &QAction::triggered,
|
||||
this, &RegisterWidget::contextChangeValue);
|
||||
this, &RegisterView::contextChangeValue);
|
||||
}
|
||||
|
||||
menu->addSeparator();
|
||||
@@ -317,7 +317,7 @@ void RegisterWidget::customMenuRequested(QPoint pos)
|
||||
}
|
||||
|
||||
|
||||
void RegisterWidget::contextCopyValue()
|
||||
void RegisterView::contextCopyValue()
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
const u128 val = cpu().getRegister(categoryIndex, m_selectedRow);
|
||||
@@ -327,21 +327,21 @@ void RegisterWidget::contextCopyValue()
|
||||
QApplication::clipboard()->setText(QString("%1").arg(QString::number(val._u64[0], 16).toUpper(), 16));
|
||||
}
|
||||
|
||||
void RegisterWidget::contextCopyTop()
|
||||
void RegisterView::contextCopyTop()
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
const u128 val = cpu().getRegister(categoryIndex, m_selectedRow);
|
||||
QApplication::clipboard()->setText(FilledQStringFromValue(val.hi, 16));
|
||||
}
|
||||
|
||||
void RegisterWidget::contextCopyBottom()
|
||||
void RegisterView::contextCopyBottom()
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
const u128 val = cpu().getRegister(categoryIndex, m_selectedRow);
|
||||
QApplication::clipboard()->setText(FilledQStringFromValue(val.lo, 16));
|
||||
}
|
||||
|
||||
void RegisterWidget::contextCopySegment()
|
||||
void RegisterView::contextCopySegment()
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
const u128 val = cpu().getRegister(categoryIndex, m_selectedRow);
|
||||
@@ -351,7 +351,7 @@ void RegisterWidget::contextCopySegment()
|
||||
QApplication::clipboard()->setText(FilledQStringFromValue(val._u32[3 - m_selected128Field], 16));
|
||||
}
|
||||
|
||||
bool RegisterWidget::contextFetchNewValue(u64& out, u64 currentValue, bool segment)
|
||||
bool RegisterView::contextFetchNewValue(u64& out, u64 currentValue, bool segment)
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
const bool floatingPoint = CAT_SHOW_FLOAT && segment;
|
||||
@@ -394,18 +394,18 @@ bool RegisterWidget::contextFetchNewValue(u64& out, u64 currentValue, bool segme
|
||||
return true;
|
||||
}
|
||||
|
||||
void RegisterWidget::contextChangeValue()
|
||||
void RegisterView::contextChangeValue()
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
u64 newVal;
|
||||
if (contextFetchNewValue(newVal, cpu().getRegister(categoryIndex, m_selectedRow).lo))
|
||||
{
|
||||
cpu().setRegister(categoryIndex, m_selectedRow, u128::From64(newVal));
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterWidget::contextChangeTop()
|
||||
void RegisterView::contextChangeTop()
|
||||
{
|
||||
u64 newVal;
|
||||
u128 oldVal = cpu().getRegister(ui.registerTabs->currentIndex(), m_selectedRow);
|
||||
@@ -413,11 +413,11 @@ void RegisterWidget::contextChangeTop()
|
||||
{
|
||||
oldVal.hi = newVal;
|
||||
cpu().setRegister(ui.registerTabs->currentIndex(), m_selectedRow, oldVal);
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterWidget::contextChangeBottom()
|
||||
void RegisterView::contextChangeBottom()
|
||||
{
|
||||
u64 newVal;
|
||||
u128 oldVal = cpu().getRegister(ui.registerTabs->currentIndex(), m_selectedRow);
|
||||
@@ -425,11 +425,11 @@ void RegisterWidget::contextChangeBottom()
|
||||
{
|
||||
oldVal.lo = newVal;
|
||||
cpu().setRegister(ui.registerTabs->currentIndex(), m_selectedRow, oldVal);
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterWidget::contextChangeSegment()
|
||||
void RegisterView::contextChangeSegment()
|
||||
{
|
||||
u64 newVal;
|
||||
u128 oldVal = cpu().getRegister(ui.registerTabs->currentIndex(), m_selectedRow);
|
||||
@@ -437,11 +437,11 @@ void RegisterWidget::contextChangeSegment()
|
||||
{
|
||||
oldVal._u32[3 - m_selected128Field] = (u32)newVal;
|
||||
cpu().setRegister(ui.registerTabs->currentIndex(), m_selectedRow, oldVal);
|
||||
DebuggerWidget::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
DebuggerView::broadcastEvent(DebuggerEvents::VMUpdate());
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<DebuggerEvents::GoToAddress> RegisterWidget::contextCreateGotoEvent()
|
||||
std::optional<DebuggerEvents::GoToAddress> RegisterView::contextCreateGotoEvent()
|
||||
{
|
||||
const int categoryIndex = ui.registerTabs->currentIndex();
|
||||
u128 regVal = cpu().getRegister(categoryIndex, m_selectedRow);
|
||||
@@ -3,9 +3,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_RegisterWidget.h"
|
||||
#include "ui_RegisterView.h"
|
||||
|
||||
#include "DebuggerWidget.h"
|
||||
#include "DebuggerView.h"
|
||||
|
||||
#include "DebugTools/DebugInterface.h"
|
||||
#include "DebugTools/DisassemblyManager.h"
|
||||
@@ -14,13 +14,13 @@
|
||||
#include <QtWidgets/QTabBar>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
class RegisterWidget final : public DebuggerWidget
|
||||
class RegisterView final : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RegisterWidget(const DebuggerWidgetParameters& parameters);
|
||||
~RegisterWidget();
|
||||
RegisterView(const DebuggerViewParameters& parameters);
|
||||
~RegisterView();
|
||||
|
||||
void toJson(JsonValueWrapper& json) override;
|
||||
bool fromJson(const JsonValueWrapper& json) override;
|
||||
@@ -47,7 +47,7 @@ public slots:
|
||||
void tabCurrentChanged(int cur);
|
||||
|
||||
private:
|
||||
Ui::RegisterWidget ui;
|
||||
Ui::RegisterView ui;
|
||||
|
||||
// Returns true on success
|
||||
bool contextFetchNewValue(u64& out, u64 currentValue, bool segment = false);
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>RegisterWidget</class>
|
||||
<widget class="QWidget" name="RegisterWidget">
|
||||
<class>RegisterView</class>
|
||||
<widget class="QWidget" name="RegisterView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -1,22 +1,22 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "StackWidget.h"
|
||||
#include "StackView.h"
|
||||
|
||||
#include "QtUtils.h"
|
||||
|
||||
#include <QtGui/QClipboard>
|
||||
#include <QtWidgets/QMenu>
|
||||
|
||||
StackWidget::StackWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, NO_DEBUGGER_FLAGS)
|
||||
StackView::StackView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, NO_DEBUGGER_FLAGS)
|
||||
, m_model(new StackModel(cpu()))
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.stackList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_ui.stackList, &QTableView::customContextMenuRequested, this, &StackWidget::openContextMenu);
|
||||
connect(m_ui.stackList, &QTableView::doubleClicked, this, &StackWidget::onDoubleClick);
|
||||
connect(m_ui.stackList, &QTableView::customContextMenuRequested, this, &StackView::openContextMenu);
|
||||
connect(m_ui.stackList, &QTableView::doubleClicked, this, &StackView::onDoubleClick);
|
||||
|
||||
m_ui.stackList->setModel(m_model);
|
||||
for (std::size_t i = 0; auto mode : StackModel::HeaderResizeModes)
|
||||
@@ -31,7 +31,7 @@ StackWidget::StackWidget(const DebuggerWidgetParameters& parameters)
|
||||
});
|
||||
}
|
||||
|
||||
void StackWidget::openContextMenu(QPoint pos)
|
||||
void StackView::openContextMenu(QPoint pos)
|
||||
{
|
||||
if (!m_ui.stackList->selectionModel()->hasSelection())
|
||||
return;
|
||||
@@ -58,7 +58,7 @@ void StackWidget::openContextMenu(QPoint pos)
|
||||
menu->popup(m_ui.stackList->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void StackWidget::onDoubleClick(const QModelIndex& index)
|
||||
void StackView::onDoubleClick(const QModelIndex& index)
|
||||
{
|
||||
switch (index.column())
|
||||
{
|
||||
@@ -3,24 +3,24 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_StackWidget.h"
|
||||
#include "ui_StackView.h"
|
||||
|
||||
#include "StackModel.h"
|
||||
|
||||
#include "DebuggerWidget.h"
|
||||
#include "DebuggerView.h"
|
||||
|
||||
class StackWidget final : public DebuggerWidget
|
||||
class StackView final : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
StackWidget(const DebuggerWidgetParameters& parameters);
|
||||
StackView(const DebuggerViewParameters& parameters);
|
||||
|
||||
void openContextMenu(QPoint pos);
|
||||
void onDoubleClick(const QModelIndex& index);
|
||||
|
||||
private:
|
||||
Ui::StackWidget m_ui;
|
||||
Ui::StackView m_ui;
|
||||
|
||||
StackModel* m_model;
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>StackWidget</class>
|
||||
<widget class="QWidget" name="StackWidget">
|
||||
<class>StackView</class>
|
||||
<widget class="QWidget" name="StackView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SymbolTreeWidget</class>
|
||||
<widget class="QWidget" name="SymbolTreeWidget">
|
||||
<class>SymbolTreeView</class>
|
||||
<widget class="QWidget" name="SymbolTreeView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -1,7 +1,7 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "SymbolTreeWidgets.h"
|
||||
#include "SymbolTreeViews.h"
|
||||
|
||||
#include "Debugger/JsonValueWrapper.h"
|
||||
#include "Debugger/SymbolTree/NewSymbolDialogs.h"
|
||||
@@ -15,11 +15,11 @@
|
||||
|
||||
static bool testName(const QString& name, const QString& filter);
|
||||
|
||||
SymbolTreeWidget::SymbolTreeWidget(
|
||||
SymbolTreeView::SymbolTreeView(
|
||||
u32 flags,
|
||||
s32 symbol_address_alignment,
|
||||
const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, MONOSPACE_FONT)
|
||||
const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, MONOSPACE_FONT)
|
||||
, m_flags(flags)
|
||||
, m_symbol_address_alignment(symbol_address_alignment)
|
||||
, m_group_by_module(cpu().getCpuType() == BREAKPOINT_IOP)
|
||||
@@ -34,17 +34,17 @@ SymbolTreeWidget::SymbolTreeWidget(
|
||||
reset();
|
||||
});
|
||||
|
||||
connect(m_ui.filterBox, &QLineEdit::textEdited, this, &SymbolTreeWidget::reset);
|
||||
connect(m_ui.filterBox, &QLineEdit::textEdited, this, &SymbolTreeView::reset);
|
||||
|
||||
connect(m_ui.newButton, &QPushButton::clicked, this, &SymbolTreeWidget::onNewButtonPressed);
|
||||
connect(m_ui.deleteButton, &QPushButton::clicked, this, &SymbolTreeWidget::onDeleteButtonPressed);
|
||||
connect(m_ui.newButton, &QPushButton::clicked, this, &SymbolTreeView::onNewButtonPressed);
|
||||
connect(m_ui.deleteButton, &QPushButton::clicked, this, &SymbolTreeView::onDeleteButtonPressed);
|
||||
|
||||
connect(m_ui.treeView->verticalScrollBar(), &QScrollBar::valueChanged, this, [&]() {
|
||||
updateVisibleNodes(false);
|
||||
});
|
||||
|
||||
m_ui.treeView->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_ui.treeView, &QTreeView::customContextMenuRequested, this, &SymbolTreeWidget::openContextMenu);
|
||||
connect(m_ui.treeView, &QTreeView::customContextMenuRequested, this, &SymbolTreeView::openContextMenu);
|
||||
|
||||
connect(m_ui.treeView, &QTreeView::expanded, this, [&]() {
|
||||
updateVisibleNodes(true);
|
||||
@@ -56,18 +56,18 @@ SymbolTreeWidget::SymbolTreeWidget(
|
||||
});
|
||||
}
|
||||
|
||||
SymbolTreeWidget::~SymbolTreeWidget() = default;
|
||||
SymbolTreeView::~SymbolTreeView() = default;
|
||||
|
||||
void SymbolTreeWidget::resizeEvent(QResizeEvent* event)
|
||||
void SymbolTreeView::resizeEvent(QResizeEvent* event)
|
||||
{
|
||||
QWidget::resizeEvent(event);
|
||||
|
||||
updateVisibleNodes(false);
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::toJson(JsonValueWrapper& json)
|
||||
void SymbolTreeView::toJson(JsonValueWrapper& json)
|
||||
{
|
||||
DebuggerWidget::toJson(json);
|
||||
DebuggerView::toJson(json);
|
||||
|
||||
json.value().AddMember("showSizeColumn", m_show_size_column, json.allocator());
|
||||
if (m_flags & ALLOW_GROUPING)
|
||||
@@ -83,9 +83,9 @@ void SymbolTreeWidget::toJson(JsonValueWrapper& json)
|
||||
}
|
||||
}
|
||||
|
||||
bool SymbolTreeWidget::fromJson(const JsonValueWrapper& json)
|
||||
bool SymbolTreeView::fromJson(const JsonValueWrapper& json)
|
||||
{
|
||||
if (!DebuggerWidget::fromJson(json))
|
||||
if (!DebuggerView::fromJson(json))
|
||||
return false;
|
||||
|
||||
bool needs_reset = false;
|
||||
@@ -137,7 +137,7 @@ bool SymbolTreeWidget::fromJson(const JsonValueWrapper& json)
|
||||
return true;
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::updateModel()
|
||||
void SymbolTreeView::updateModel()
|
||||
{
|
||||
if (needsReset())
|
||||
reset();
|
||||
@@ -145,7 +145,7 @@ void SymbolTreeWidget::updateModel()
|
||||
updateVisibleNodes(true);
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::reset()
|
||||
void SymbolTreeView::reset()
|
||||
{
|
||||
if (!m_model)
|
||||
setupTree();
|
||||
@@ -170,7 +170,7 @@ void SymbolTreeWidget::reset()
|
||||
}
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::updateVisibleNodes(bool update_hashes)
|
||||
void SymbolTreeView::updateVisibleNodes(bool update_hashes)
|
||||
{
|
||||
if (!m_model)
|
||||
return;
|
||||
@@ -199,7 +199,7 @@ void SymbolTreeWidget::updateVisibleNodes(bool update_hashes)
|
||||
m_ui.treeView->update();
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::expandGroups(QModelIndex index)
|
||||
void SymbolTreeView::expandGroups(QModelIndex index)
|
||||
{
|
||||
if (!m_model)
|
||||
return;
|
||||
@@ -218,7 +218,7 @@ void SymbolTreeWidget::expandGroups(QModelIndex index)
|
||||
}
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::setupTree()
|
||||
void SymbolTreeView::setupTree()
|
||||
{
|
||||
m_model = new SymbolTreeModel(cpu(), this);
|
||||
m_ui.treeView->setModel(m_model);
|
||||
@@ -237,10 +237,10 @@ void SymbolTreeWidget::setupTree()
|
||||
|
||||
configureColumns();
|
||||
|
||||
connect(m_ui.treeView, &QTreeView::pressed, this, &SymbolTreeWidget::onTreeViewClicked);
|
||||
connect(m_ui.treeView, &QTreeView::pressed, this, &SymbolTreeView::onTreeViewClicked);
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::buildTree(const ccc::SymbolDatabase& database)
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeView::buildTree(const ccc::SymbolDatabase& database)
|
||||
{
|
||||
std::vector<SymbolWork> symbols = getSymbols(m_ui.filterBox->text(), database);
|
||||
|
||||
@@ -321,7 +321,7 @@ std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::buildTree(const ccc::SymbolDat
|
||||
return root;
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::groupBySourceFile(
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeView::groupBySourceFile(
|
||||
std::unique_ptr<SymbolTreeNode> child,
|
||||
const SymbolWork& child_work,
|
||||
SymbolTreeNode*& prev_group,
|
||||
@@ -364,7 +364,7 @@ std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::groupBySourceFile(
|
||||
return child;
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::groupBySection(
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeView::groupBySection(
|
||||
std::unique_ptr<SymbolTreeNode> child,
|
||||
const SymbolWork& child_work,
|
||||
SymbolTreeNode*& prev_group,
|
||||
@@ -403,7 +403,7 @@ std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::groupBySection(
|
||||
return child;
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::groupByModule(
|
||||
std::unique_ptr<SymbolTreeNode> SymbolTreeView::groupByModule(
|
||||
std::unique_ptr<SymbolTreeNode> child,
|
||||
const SymbolWork& child_work,
|
||||
SymbolTreeNode*& prev_group,
|
||||
@@ -448,7 +448,7 @@ std::unique_ptr<SymbolTreeNode> SymbolTreeWidget::groupByModule(
|
||||
return child;
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::openContextMenu(QPoint pos)
|
||||
void SymbolTreeView::openContextMenu(QPoint pos)
|
||||
{
|
||||
SymbolTreeNode* node = currentNode();
|
||||
if (!node)
|
||||
@@ -462,22 +462,22 @@ void SymbolTreeWidget::openContextMenu(QPoint pos)
|
||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
QAction* copy_name = menu->addAction(tr("Copy Name"));
|
||||
connect(copy_name, &QAction::triggered, this, &SymbolTreeWidget::onCopyName);
|
||||
connect(copy_name, &QAction::triggered, this, &SymbolTreeView::onCopyName);
|
||||
|
||||
if (m_flags & ALLOW_MANGLED_NAME_ACTIONS)
|
||||
{
|
||||
QAction* copy_mangled_name = menu->addAction(tr("Copy Mangled Name"));
|
||||
connect(copy_mangled_name, &QAction::triggered, this, &SymbolTreeWidget::onCopyMangledName);
|
||||
connect(copy_mangled_name, &QAction::triggered, this, &SymbolTreeView::onCopyMangledName);
|
||||
}
|
||||
|
||||
QAction* copy_location = menu->addAction(tr("Copy Location"));
|
||||
connect(copy_location, &QAction::triggered, this, &SymbolTreeWidget::onCopyLocation);
|
||||
connect(copy_location, &QAction::triggered, this, &SymbolTreeView::onCopyLocation);
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
QAction* rename_symbol = menu->addAction(tr("Rename Symbol"));
|
||||
rename_symbol->setEnabled(node_is_symbol);
|
||||
connect(rename_symbol, &QAction::triggered, this, &SymbolTreeWidget::onRenameSymbol);
|
||||
connect(rename_symbol, &QAction::triggered, this, &SymbolTreeView::onRenameSymbol);
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
@@ -551,22 +551,22 @@ void SymbolTreeWidget::openContextMenu(QPoint pos)
|
||||
|
||||
QAction* reset_children = menu->addAction(tr("Reset Children"));
|
||||
reset_children->setEnabled(node_is_object);
|
||||
connect(reset_children, &QAction::triggered, this, &SymbolTreeWidget::onResetChildren);
|
||||
connect(reset_children, &QAction::triggered, this, &SymbolTreeView::onResetChildren);
|
||||
|
||||
QAction* change_type_temporarily = menu->addAction(tr("Change Type Temporarily"));
|
||||
change_type_temporarily->setEnabled(node_is_object);
|
||||
connect(change_type_temporarily, &QAction::triggered, this, &SymbolTreeWidget::onChangeTypeTemporarily);
|
||||
connect(change_type_temporarily, &QAction::triggered, this, &SymbolTreeView::onChangeTypeTemporarily);
|
||||
}
|
||||
|
||||
menu->popup(m_ui.treeView->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
bool SymbolTreeWidget::needsReset() const
|
||||
bool SymbolTreeView::needsReset() const
|
||||
{
|
||||
return !m_model || m_model->needsReset();
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onDeleteButtonPressed()
|
||||
void SymbolTreeView::onDeleteButtonPressed()
|
||||
{
|
||||
SymbolTreeNode* node = currentNode();
|
||||
if (!node)
|
||||
@@ -585,7 +585,7 @@ void SymbolTreeWidget::onDeleteButtonPressed()
|
||||
reset();
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onCopyName()
|
||||
void SymbolTreeView::onCopyName()
|
||||
{
|
||||
SymbolTreeNode* node = currentNode();
|
||||
if (!node)
|
||||
@@ -594,7 +594,7 @@ void SymbolTreeWidget::onCopyName()
|
||||
QApplication::clipboard()->setText(node->name);
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onCopyMangledName()
|
||||
void SymbolTreeView::onCopyMangledName()
|
||||
{
|
||||
SymbolTreeNode* node = currentNode();
|
||||
if (!node)
|
||||
@@ -606,7 +606,7 @@ void SymbolTreeWidget::onCopyMangledName()
|
||||
QApplication::clipboard()->setText(node->name);
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onCopyLocation()
|
||||
void SymbolTreeView::onCopyLocation()
|
||||
{
|
||||
SymbolTreeNode* node = currentNode();
|
||||
if (!node)
|
||||
@@ -615,7 +615,7 @@ void SymbolTreeWidget::onCopyLocation()
|
||||
QApplication::clipboard()->setText(node->location.toString(cpu()));
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onRenameSymbol()
|
||||
void SymbolTreeView::onRenameSymbol()
|
||||
{
|
||||
SymbolTreeNode* node = currentNode();
|
||||
if (!node || !node->symbol.valid())
|
||||
@@ -643,7 +643,7 @@ void SymbolTreeWidget::onRenameSymbol()
|
||||
});
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onResetChildren()
|
||||
void SymbolTreeView::onResetChildren()
|
||||
{
|
||||
if (!m_model)
|
||||
return;
|
||||
@@ -655,7 +655,7 @@ void SymbolTreeWidget::onResetChildren()
|
||||
m_model->resetChildren(index);
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onChangeTypeTemporarily()
|
||||
void SymbolTreeView::onChangeTypeTemporarily()
|
||||
{
|
||||
if (!m_model)
|
||||
return;
|
||||
@@ -683,7 +683,7 @@ void SymbolTreeWidget::onChangeTypeTemporarily()
|
||||
QMessageBox::warning(this, tr("Cannot Change Type"), *error_message);
|
||||
}
|
||||
|
||||
void SymbolTreeWidget::onTreeViewClicked(const QModelIndex& index)
|
||||
void SymbolTreeView::onTreeViewClicked(const QModelIndex& index)
|
||||
{
|
||||
if (!index.isValid())
|
||||
return;
|
||||
@@ -701,7 +701,7 @@ void SymbolTreeWidget::onTreeViewClicked(const QModelIndex& index)
|
||||
goToInDisassembler(node->location.address, false);
|
||||
}
|
||||
|
||||
SymbolTreeNode* SymbolTreeWidget::currentNode()
|
||||
SymbolTreeNode* SymbolTreeView::currentNode()
|
||||
{
|
||||
if (!m_model)
|
||||
return nullptr;
|
||||
@@ -712,20 +712,20 @@ SymbolTreeNode* SymbolTreeWidget::currentNode()
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
FunctionTreeWidget::FunctionTreeWidget(const DebuggerWidgetParameters& parameters)
|
||||
: SymbolTreeWidget(
|
||||
FunctionTreeView::FunctionTreeView(const DebuggerViewParameters& parameters)
|
||||
: SymbolTreeView(
|
||||
ALLOW_GROUPING | ALLOW_MANGLED_NAME_ACTIONS | CLICK_TO_GO_TO_IN_DISASSEMBLER,
|
||||
4,
|
||||
parameters)
|
||||
{
|
||||
}
|
||||
|
||||
FunctionTreeWidget::~FunctionTreeWidget() = default;
|
||||
FunctionTreeView::~FunctionTreeView() = default;
|
||||
|
||||
std::vector<SymbolTreeWidget::SymbolWork> FunctionTreeWidget::getSymbols(
|
||||
std::vector<SymbolTreeView::SymbolWork> FunctionTreeView::getSymbols(
|
||||
const QString& filter, const ccc::SymbolDatabase& database)
|
||||
{
|
||||
std::vector<SymbolTreeWidget::SymbolWork> symbols;
|
||||
std::vector<SymbolTreeView::SymbolWork> symbols;
|
||||
|
||||
for (const ccc::Function& function : database.functions)
|
||||
{
|
||||
@@ -750,7 +750,7 @@ std::vector<SymbolTreeWidget::SymbolWork> FunctionTreeWidget::getSymbols(
|
||||
return symbols;
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> FunctionTreeWidget::buildNode(
|
||||
std::unique_ptr<SymbolTreeNode> FunctionTreeView::buildNode(
|
||||
SymbolWork& work, const ccc::SymbolDatabase& database) const
|
||||
{
|
||||
const ccc::Function& function = static_cast<const ccc::Function&>(*work.symbol);
|
||||
@@ -777,7 +777,7 @@ std::unique_ptr<SymbolTreeNode> FunctionTreeWidget::buildNode(
|
||||
return node;
|
||||
}
|
||||
|
||||
void FunctionTreeWidget::configureColumns()
|
||||
void FunctionTreeView::configureColumns()
|
||||
{
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::NAME, false);
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::LOCATION, false);
|
||||
@@ -790,7 +790,7 @@ void FunctionTreeWidget::configureColumns()
|
||||
m_ui.treeView->header()->setStretchLastSection(false);
|
||||
}
|
||||
|
||||
void FunctionTreeWidget::onNewButtonPressed()
|
||||
void FunctionTreeView::onNewButtonPressed()
|
||||
{
|
||||
NewFunctionDialog* dialog = new NewFunctionDialog(cpu(), this);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
@@ -800,20 +800,20 @@ void FunctionTreeWidget::onNewButtonPressed()
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
GlobalVariableTreeWidget::GlobalVariableTreeWidget(const DebuggerWidgetParameters& parameters)
|
||||
: SymbolTreeWidget(
|
||||
GlobalVariableTreeView::GlobalVariableTreeView(const DebuggerViewParameters& parameters)
|
||||
: SymbolTreeView(
|
||||
ALLOW_GROUPING | ALLOW_SORTING_BY_IF_TYPE_IS_KNOWN | ALLOW_TYPE_ACTIONS | ALLOW_MANGLED_NAME_ACTIONS,
|
||||
1,
|
||||
parameters)
|
||||
{
|
||||
}
|
||||
|
||||
GlobalVariableTreeWidget::~GlobalVariableTreeWidget() = default;
|
||||
GlobalVariableTreeView::~GlobalVariableTreeView() = default;
|
||||
|
||||
std::vector<SymbolTreeWidget::SymbolWork> GlobalVariableTreeWidget::getSymbols(
|
||||
std::vector<SymbolTreeView::SymbolWork> GlobalVariableTreeView::getSymbols(
|
||||
const QString& filter, const ccc::SymbolDatabase& database)
|
||||
{
|
||||
std::vector<SymbolTreeWidget::SymbolWork> symbols;
|
||||
std::vector<SymbolTreeView::SymbolWork> symbols;
|
||||
|
||||
for (const ccc::GlobalVariable& global_variable : database.global_variables)
|
||||
{
|
||||
@@ -875,7 +875,7 @@ std::vector<SymbolTreeWidget::SymbolWork> GlobalVariableTreeWidget::getSymbols(
|
||||
return symbols;
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> GlobalVariableTreeWidget::buildNode(
|
||||
std::unique_ptr<SymbolTreeNode> GlobalVariableTreeView::buildNode(
|
||||
SymbolWork& work, const ccc::SymbolDatabase& database) const
|
||||
{
|
||||
std::unique_ptr<SymbolTreeNode> node = std::make_unique<SymbolTreeNode>();
|
||||
@@ -918,7 +918,7 @@ std::unique_ptr<SymbolTreeNode> GlobalVariableTreeWidget::buildNode(
|
||||
return node;
|
||||
}
|
||||
|
||||
void GlobalVariableTreeWidget::configureColumns()
|
||||
void GlobalVariableTreeView::configureColumns()
|
||||
{
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::NAME, false);
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::LOCATION, false);
|
||||
@@ -933,7 +933,7 @@ void GlobalVariableTreeWidget::configureColumns()
|
||||
m_ui.treeView->header()->setStretchLastSection(false);
|
||||
}
|
||||
|
||||
void GlobalVariableTreeWidget::onNewButtonPressed()
|
||||
void GlobalVariableTreeView::onNewButtonPressed()
|
||||
{
|
||||
NewGlobalVariableDialog* dialog = new NewGlobalVariableDialog(cpu(), this);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
@@ -943,17 +943,17 @@ void GlobalVariableTreeWidget::onNewButtonPressed()
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
LocalVariableTreeWidget::LocalVariableTreeWidget(const DebuggerWidgetParameters& parameters)
|
||||
: SymbolTreeWidget(
|
||||
LocalVariableTreeView::LocalVariableTreeView(const DebuggerViewParameters& parameters)
|
||||
: SymbolTreeView(
|
||||
ALLOW_TYPE_ACTIONS,
|
||||
1,
|
||||
parameters)
|
||||
{
|
||||
}
|
||||
|
||||
LocalVariableTreeWidget::~LocalVariableTreeWidget() = default;
|
||||
LocalVariableTreeView::~LocalVariableTreeView() = default;
|
||||
|
||||
bool LocalVariableTreeWidget::needsReset() const
|
||||
bool LocalVariableTreeView::needsReset() const
|
||||
{
|
||||
if (!m_function.valid())
|
||||
return true;
|
||||
@@ -975,10 +975,10 @@ bool LocalVariableTreeWidget::needsReset() const
|
||||
if (left_function)
|
||||
return true;
|
||||
|
||||
return SymbolTreeWidget::needsReset();
|
||||
return SymbolTreeView::needsReset();
|
||||
}
|
||||
|
||||
std::vector<SymbolTreeWidget::SymbolWork> LocalVariableTreeWidget::getSymbols(
|
||||
std::vector<SymbolTreeView::SymbolWork> LocalVariableTreeView::getSymbols(
|
||||
const QString& filter, const ccc::SymbolDatabase& database)
|
||||
{
|
||||
u32 program_counter = cpu().getPC();
|
||||
@@ -992,7 +992,7 @@ std::vector<SymbolTreeWidget::SymbolWork> LocalVariableTreeWidget::getSymbols(
|
||||
m_function = function->handle();
|
||||
m_caller_stack_pointer = cpu().getCallerStackPointer(*function);
|
||||
|
||||
std::vector<SymbolTreeWidget::SymbolWork> symbols;
|
||||
std::vector<SymbolTreeView::SymbolWork> symbols;
|
||||
|
||||
for (const ccc::LocalVariableHandle local_variable_handle : *function->local_variables())
|
||||
{
|
||||
@@ -1024,7 +1024,7 @@ std::vector<SymbolTreeWidget::SymbolWork> LocalVariableTreeWidget::getSymbols(
|
||||
return symbols;
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> LocalVariableTreeWidget::buildNode(
|
||||
std::unique_ptr<SymbolTreeNode> LocalVariableTreeView::buildNode(
|
||||
SymbolWork& work, const ccc::SymbolDatabase& database) const
|
||||
{
|
||||
const ccc::LocalVariable& local_variable = static_cast<const ccc::LocalVariable&>(*work.symbol);
|
||||
@@ -1047,7 +1047,7 @@ std::unique_ptr<SymbolTreeNode> LocalVariableTreeWidget::buildNode(
|
||||
return node;
|
||||
}
|
||||
|
||||
void LocalVariableTreeWidget::configureColumns()
|
||||
void LocalVariableTreeView::configureColumns()
|
||||
{
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::NAME, false);
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::LOCATION, false);
|
||||
@@ -1062,7 +1062,7 @@ void LocalVariableTreeWidget::configureColumns()
|
||||
m_ui.treeView->header()->setStretchLastSection(false);
|
||||
}
|
||||
|
||||
void LocalVariableTreeWidget::onNewButtonPressed()
|
||||
void LocalVariableTreeView::onNewButtonPressed()
|
||||
{
|
||||
NewLocalVariableDialog* dialog = new NewLocalVariableDialog(cpu(), this);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
@@ -1072,17 +1072,17 @@ void LocalVariableTreeWidget::onNewButtonPressed()
|
||||
|
||||
// *****************************************************************************
|
||||
|
||||
ParameterVariableTreeWidget::ParameterVariableTreeWidget(const DebuggerWidgetParameters& parameters)
|
||||
: SymbolTreeWidget(
|
||||
ParameterVariableTreeView::ParameterVariableTreeView(const DebuggerViewParameters& parameters)
|
||||
: SymbolTreeView(
|
||||
ALLOW_TYPE_ACTIONS,
|
||||
1,
|
||||
parameters)
|
||||
{
|
||||
}
|
||||
|
||||
ParameterVariableTreeWidget::~ParameterVariableTreeWidget() = default;
|
||||
ParameterVariableTreeView::~ParameterVariableTreeView() = default;
|
||||
|
||||
bool ParameterVariableTreeWidget::needsReset() const
|
||||
bool ParameterVariableTreeView::needsReset() const
|
||||
{
|
||||
if (!m_function.valid())
|
||||
return true;
|
||||
@@ -1104,13 +1104,13 @@ bool ParameterVariableTreeWidget::needsReset() const
|
||||
if (left_function)
|
||||
return true;
|
||||
|
||||
return SymbolTreeWidget::needsReset();
|
||||
return SymbolTreeView::needsReset();
|
||||
}
|
||||
|
||||
std::vector<SymbolTreeWidget::SymbolWork> ParameterVariableTreeWidget::getSymbols(
|
||||
std::vector<SymbolTreeView::SymbolWork> ParameterVariableTreeView::getSymbols(
|
||||
const QString& filter, const ccc::SymbolDatabase& database)
|
||||
{
|
||||
std::vector<SymbolTreeWidget::SymbolWork> symbols;
|
||||
std::vector<SymbolTreeView::SymbolWork> symbols;
|
||||
|
||||
u32 program_counter = cpu().getPC();
|
||||
const ccc::Function* function = database.functions.symbol_overlapping_address(program_counter);
|
||||
@@ -1154,7 +1154,7 @@ std::vector<SymbolTreeWidget::SymbolWork> ParameterVariableTreeWidget::getSymbol
|
||||
return symbols;
|
||||
}
|
||||
|
||||
std::unique_ptr<SymbolTreeNode> ParameterVariableTreeWidget::buildNode(
|
||||
std::unique_ptr<SymbolTreeNode> ParameterVariableTreeView::buildNode(
|
||||
SymbolWork& work, const ccc::SymbolDatabase& database) const
|
||||
{
|
||||
const ccc::ParameterVariable& parameter_variable = static_cast<const ccc::ParameterVariable&>(*work.symbol);
|
||||
@@ -1174,7 +1174,7 @@ std::unique_ptr<SymbolTreeNode> ParameterVariableTreeWidget::buildNode(
|
||||
return node;
|
||||
}
|
||||
|
||||
void ParameterVariableTreeWidget::configureColumns()
|
||||
void ParameterVariableTreeView::configureColumns()
|
||||
{
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::NAME, false);
|
||||
m_ui.treeView->setColumnHidden(SymbolTreeModel::LOCATION, false);
|
||||
@@ -1189,7 +1189,7 @@ void ParameterVariableTreeWidget::configureColumns()
|
||||
m_ui.treeView->header()->setStretchLastSection(false);
|
||||
}
|
||||
|
||||
void ParameterVariableTreeWidget::onNewButtonPressed()
|
||||
void ParameterVariableTreeView::onNewButtonPressed()
|
||||
{
|
||||
NewParameterVariableDialog* dialog = new NewParameterVariableDialog(cpu(), this);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
@@ -3,19 +3,19 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_SymbolTreeWidget.h"
|
||||
#include "ui_SymbolTreeView.h"
|
||||
|
||||
#include "Debugger/DebuggerWidget.h"
|
||||
#include "Debugger/DebuggerView.h"
|
||||
#include "Debugger/SymbolTree/SymbolTreeModel.h"
|
||||
|
||||
// A symbol tree widget with its associated refresh button, filter box and
|
||||
// A symbol tree view with its associated refresh button, filter box and
|
||||
// right-click menu. Supports grouping, sorting and various other settings.
|
||||
class SymbolTreeWidget : public DebuggerWidget
|
||||
class SymbolTreeView : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual ~SymbolTreeWidget();
|
||||
virtual ~SymbolTreeView();
|
||||
|
||||
void updateModel();
|
||||
void reset();
|
||||
@@ -33,10 +33,10 @@ protected:
|
||||
const ccc::SourceFile* source_file = nullptr;
|
||||
};
|
||||
|
||||
SymbolTreeWidget(
|
||||
SymbolTreeView(
|
||||
u32 flags,
|
||||
s32 symbol_address_alignment,
|
||||
const DebuggerWidgetParameters& parameters);
|
||||
const DebuggerViewParameters& parameters);
|
||||
|
||||
void resizeEvent(QResizeEvent* event) override;
|
||||
|
||||
@@ -90,7 +90,7 @@ protected:
|
||||
|
||||
SymbolTreeNode* currentNode();
|
||||
|
||||
Ui::SymbolTreeWidget m_ui;
|
||||
Ui::SymbolTreeView m_ui;
|
||||
|
||||
SymbolTreeModel* m_model = nullptr;
|
||||
|
||||
@@ -114,12 +114,12 @@ protected:
|
||||
bool m_sort_by_if_type_is_known = false;
|
||||
};
|
||||
|
||||
class FunctionTreeWidget : public SymbolTreeWidget
|
||||
class FunctionTreeView : public SymbolTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FunctionTreeWidget(const DebuggerWidgetParameters& parameters);
|
||||
virtual ~FunctionTreeWidget();
|
||||
explicit FunctionTreeView(const DebuggerViewParameters& parameters);
|
||||
virtual ~FunctionTreeView();
|
||||
|
||||
protected:
|
||||
std::vector<SymbolWork> getSymbols(
|
||||
@@ -133,12 +133,12 @@ protected:
|
||||
void onNewButtonPressed() override;
|
||||
};
|
||||
|
||||
class GlobalVariableTreeWidget : public SymbolTreeWidget
|
||||
class GlobalVariableTreeView : public SymbolTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GlobalVariableTreeWidget(const DebuggerWidgetParameters& parameters);
|
||||
virtual ~GlobalVariableTreeWidget();
|
||||
explicit GlobalVariableTreeView(const DebuggerViewParameters& parameters);
|
||||
virtual ~GlobalVariableTreeView();
|
||||
|
||||
protected:
|
||||
std::vector<SymbolWork> getSymbols(
|
||||
@@ -152,12 +152,12 @@ protected:
|
||||
void onNewButtonPressed() override;
|
||||
};
|
||||
|
||||
class LocalVariableTreeWidget : public SymbolTreeWidget
|
||||
class LocalVariableTreeView : public SymbolTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LocalVariableTreeWidget(const DebuggerWidgetParameters& parameters);
|
||||
virtual ~LocalVariableTreeWidget();
|
||||
explicit LocalVariableTreeView(const DebuggerViewParameters& parameters);
|
||||
virtual ~LocalVariableTreeView();
|
||||
|
||||
protected:
|
||||
bool needsReset() const override;
|
||||
@@ -176,12 +176,12 @@ protected:
|
||||
std::optional<u32> m_caller_stack_pointer;
|
||||
};
|
||||
|
||||
class ParameterVariableTreeWidget : public SymbolTreeWidget
|
||||
class ParameterVariableTreeView : public SymbolTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ParameterVariableTreeWidget(const DebuggerWidgetParameters& parameters);
|
||||
virtual ~ParameterVariableTreeWidget();
|
||||
explicit ParameterVariableTreeView(const DebuggerViewParameters& parameters);
|
||||
virtual ~ParameterVariableTreeView();
|
||||
|
||||
protected:
|
||||
bool needsReset() const override;
|
||||
@@ -1,23 +1,23 @@
|
||||
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
|
||||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "ThreadWidget.h"
|
||||
#include "ThreadView.h"
|
||||
|
||||
#include "QtUtils.h"
|
||||
|
||||
#include <QtGui/QClipboard>
|
||||
#include <QtWidgets/QMenu>
|
||||
|
||||
ThreadWidget::ThreadWidget(const DebuggerWidgetParameters& parameters)
|
||||
: DebuggerWidget(parameters, NO_DEBUGGER_FLAGS)
|
||||
ThreadView::ThreadView(const DebuggerViewParameters& parameters)
|
||||
: DebuggerView(parameters, NO_DEBUGGER_FLAGS)
|
||||
, m_model(new ThreadModel(cpu()))
|
||||
, m_proxy_model(new QSortFilterProxyModel())
|
||||
{
|
||||
m_ui.setupUi(this);
|
||||
|
||||
m_ui.threadList->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(m_ui.threadList, &QTableView::customContextMenuRequested, this, &ThreadWidget::openContextMenu);
|
||||
connect(m_ui.threadList, &QTableView::doubleClicked, this, &ThreadWidget::onDoubleClick);
|
||||
connect(m_ui.threadList, &QTableView::customContextMenuRequested, this, &ThreadView::openContextMenu);
|
||||
connect(m_ui.threadList, &QTableView::doubleClicked, this, &ThreadView::onDoubleClick);
|
||||
|
||||
m_proxy_model->setSourceModel(m_model);
|
||||
m_proxy_model->setSortRole(Qt::UserRole);
|
||||
@@ -36,7 +36,7 @@ ThreadWidget::ThreadWidget(const DebuggerWidgetParameters& parameters)
|
||||
});
|
||||
}
|
||||
|
||||
void ThreadWidget::openContextMenu(QPoint pos)
|
||||
void ThreadView::openContextMenu(QPoint pos)
|
||||
{
|
||||
if (!m_ui.threadList->selectionModel()->hasSelection())
|
||||
return;
|
||||
@@ -63,7 +63,7 @@ void ThreadWidget::openContextMenu(QPoint pos)
|
||||
menu->popup(m_ui.threadList->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void ThreadWidget::onDoubleClick(const QModelIndex& index)
|
||||
void ThreadView::onDoubleClick(const QModelIndex& index)
|
||||
{
|
||||
switch (index.column())
|
||||
{
|
||||
@@ -3,25 +3,25 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ui_ThreadWidget.h"
|
||||
#include "ui_ThreadView.h"
|
||||
|
||||
#include "DebuggerWidget.h"
|
||||
#include "DebuggerView.h"
|
||||
#include "ThreadModel.h"
|
||||
|
||||
#include <QtCore/QSortFilterProxyModel>
|
||||
|
||||
class ThreadWidget final : public DebuggerWidget
|
||||
class ThreadView final : public DebuggerView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ThreadWidget(const DebuggerWidgetParameters& parameters);
|
||||
ThreadView(const DebuggerViewParameters& parameters);
|
||||
|
||||
void openContextMenu(QPoint pos);
|
||||
void onDoubleClick(const QModelIndex& index);
|
||||
|
||||
private:
|
||||
Ui::ThreadWidget m_ui;
|
||||
Ui::ThreadView m_ui;
|
||||
|
||||
ThreadModel* m_model;
|
||||
QSortFilterProxyModel* m_proxy_model;
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ThreadWidget</class>
|
||||
<widget class="QWidget" name="ThreadWidget">
|
||||
<class>ThreadView</class>
|
||||
<widget class="QWidget" name="ThreadView">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <QtCore/QSortFilterProxyModel>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QPixmapCache>
|
||||
#include <QtGui/QWheelEvent>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QHeaderView>
|
||||
@@ -113,20 +114,51 @@ namespace
|
||||
// https://stackoverflow.com/questions/32216568/how-to-set-icon-center-in-qtableview
|
||||
Q_ASSERT(index.isValid());
|
||||
|
||||
// draw default item
|
||||
// Draw the base item, with a blank icon
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption(&opt, index);
|
||||
opt.icon = QIcon();
|
||||
QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &opt, painter, 0);
|
||||
// Based on QStyledItemDelegate::paint()
|
||||
const QStyle* style = option.widget ? option.widget->style() : QApplication::style();
|
||||
style->drawControl(QStyle::CE_ItemViewItem, &opt, painter, option.widget);
|
||||
|
||||
// Fetch icon pixmap
|
||||
const QRect r = option.rect;
|
||||
const QPixmap pix = qvariant_cast<QPixmap>(index.data(Qt::DecorationRole));
|
||||
const int pix_width = static_cast<int>(pix.width() / pix.devicePixelRatio());
|
||||
const int pix_height = static_cast<int>(pix.width() / pix.devicePixelRatio());
|
||||
const int pix_height = static_cast<int>(pix.height() / pix.devicePixelRatio());
|
||||
|
||||
// draw pixmap at center of item
|
||||
// Draw the icon, using code derived from QItemDelegate::drawDecoration()
|
||||
const bool enabled = option.state & QStyle::State_Enabled;
|
||||
const QPoint p = QPoint((r.width() - pix_width) / 2, (r.height() - pix_height) / 2);
|
||||
painter->drawPixmap(r.topLeft() + p, pix);
|
||||
if (option.state & QStyle::State_Selected)
|
||||
{
|
||||
// See QItemDelegate::selectedPixmap()
|
||||
QString key = QString::fromStdString(fmt::format("{:016X}-{:d}", pix.cacheKey(), enabled));
|
||||
QPixmap pm;
|
||||
if (!QPixmapCache::find(key, &pm))
|
||||
{
|
||||
QImage img = pix.toImage().convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
|
||||
QColor color = option.palette.color(enabled ? QPalette::Normal : QPalette::Disabled,
|
||||
QPalette::Highlight);
|
||||
color.setAlphaF(0.3f);
|
||||
|
||||
QPainter tinted_painter(&img);
|
||||
tinted_painter.setCompositionMode(QPainter::CompositionMode_SourceAtop);
|
||||
tinted_painter.fillRect(0, 0, img.width(), img.height(), color);
|
||||
tinted_painter.end();
|
||||
|
||||
pm = QPixmap(QPixmap::fromImage(img));
|
||||
QPixmapCache::insert(key, pm);
|
||||
}
|
||||
|
||||
painter->drawPixmap(r.topLeft() + p, pm);
|
||||
}
|
||||
else
|
||||
{
|
||||
painter->drawPixmap(r.topLeft() + p, pix);
|
||||
}
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
@@ -181,6 +213,7 @@ void GameListWidget::initialize()
|
||||
m_table_view->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
m_table_view->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
m_table_view->setAlternatingRowColors(true);
|
||||
m_table_view->setMouseTracking(true);
|
||||
m_table_view->setShowGrid(false);
|
||||
m_table_view->setCurrentIndex({});
|
||||
m_table_view->horizontalHeader()->setHighlightSections(false);
|
||||
@@ -189,6 +222,7 @@ void GameListWidget::initialize()
|
||||
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));
|
||||
|
||||
loadTableViewColumnVisibilitySettings();
|
||||
loadTableViewColumnSortSettings();
|
||||
|
||||
@@ -151,6 +151,10 @@ void MainWindow::initialize()
|
||||
ctx->updateTheme(); // Qt won't notice the style change without us touching the palette in some way
|
||||
});
|
||||
});
|
||||
// The cocoa backing isn't initialized yet, delay this until stuff is set up with a `RunOnUIThread` call
|
||||
QtHost::RunOnUIThread([this]{
|
||||
CocoaTools::MarkHelpMenu(m_ui.menuHelp->toNSMenu());
|
||||
});
|
||||
#endif
|
||||
m_ui.setupUi(this);
|
||||
setupAdditionalUi();
|
||||
@@ -1781,7 +1785,7 @@ void MainWindow::updateTheme()
|
||||
reloadThemeSpecificImages();
|
||||
|
||||
if (g_debugger_window)
|
||||
g_debugger_window->updateStyleSheets();
|
||||
g_debugger_window->updateTheme();
|
||||
}
|
||||
|
||||
void MainWindow::reloadThemeSpecificImages()
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace QtHost
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Local variable declarations
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
static std::unique_ptr<QTimer> s_settings_save_timer;
|
||||
static QTimer* s_settings_save_timer = nullptr;
|
||||
static std::unique_ptr<INISettingsInterface> s_base_settings_interface;
|
||||
static bool s_batch_mode = false;
|
||||
static bool s_nogui_mode = false;
|
||||
@@ -1404,7 +1404,7 @@ void QtHost::SaveSettings()
|
||||
if (s_settings_save_timer)
|
||||
{
|
||||
s_settings_save_timer->deleteLater();
|
||||
s_settings_save_timer.release();
|
||||
s_settings_save_timer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1420,10 +1420,21 @@ void Host::CommitBaseSettingChanges()
|
||||
if (s_settings_save_timer)
|
||||
return;
|
||||
|
||||
s_settings_save_timer = std::make_unique<QTimer>();
|
||||
s_settings_save_timer->connect(s_settings_save_timer.get(), &QTimer::timeout, &QtHost::SaveSettings);
|
||||
s_settings_save_timer = new QTimer;
|
||||
s_settings_save_timer->connect(s_settings_save_timer, &QTimer::timeout, &QtHost::SaveSettings);
|
||||
s_settings_save_timer->setSingleShot(true);
|
||||
s_settings_save_timer->start(SETTINGS_SAVE_DELAY);
|
||||
|
||||
static bool connected = false;
|
||||
if (!connected)
|
||||
{
|
||||
QObject::connect(QCoreApplication::instance(), &QCoreApplication::aboutToQuit, []() {
|
||||
delete s_settings_save_timer;
|
||||
s_settings_save_timer = nullptr;
|
||||
});
|
||||
|
||||
connected = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool QtHost::InBatchMode()
|
||||
|
||||
@@ -1261,6 +1261,102 @@ namespace SettingWidgetBinder
|
||||
widget->connect(widget, &QLineEdit::editingFinished, widget, std::move(value_changed));
|
||||
}
|
||||
|
||||
static inline void BindWidgetToFileSetting(SettingsInterface* sif, QLineEdit* widget, QAbstractButton* browse_button,
|
||||
QAbstractButton* open_button, QAbstractButton* reset_button, std::string section, std::string key, std::string default_value,
|
||||
const char* filter, bool allow_pergame = false, bool use_relative = true)
|
||||
{
|
||||
using Accessor = SettingAccessor<QLineEdit>;
|
||||
|
||||
std::string current_path(Host::GetBaseStringSettingValue(section.c_str(), key.c_str(), default_value.c_str()));
|
||||
if (current_path.empty())
|
||||
current_path = default_value;
|
||||
else if (use_relative && !Path::IsAbsolute(current_path))
|
||||
current_path = Path::Canonicalize(Path::Combine(EmuFolders::DataRoot, current_path));
|
||||
|
||||
const QString value(QString::fromStdString(current_path));
|
||||
Accessor::setStringValue(widget, value);
|
||||
|
||||
if (!allow_pergame)
|
||||
{
|
||||
widget->setEnabled(false);
|
||||
if (browse_button)
|
||||
browse_button->setEnabled(false);
|
||||
if (reset_button)
|
||||
reset_button->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
|
||||
auto value_changed = [widget, section = std::move(section), key = std::move(key), default_value, use_relative]() {
|
||||
const std::string new_value(widget->text().toStdString());
|
||||
if (!new_value.empty())
|
||||
{
|
||||
if (use_relative)
|
||||
{
|
||||
const std::string relative_path(Path::MakeRelative(new_value, EmuFolders::DataRoot));
|
||||
Host::SetBaseStringSettingValue(section.c_str(), key.c_str(), relative_path.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
Host::SetBaseStringSettingValue(section.c_str(), key.c_str(), new_value.c_str());
|
||||
}
|
||||
|
||||
if (!FileSystem::FileExists(new_value.c_str()))
|
||||
{
|
||||
QMessageBox::critical(QtUtils::GetRootWidget(widget), qApp->translate("SettingWidgetBinder", "Error"),
|
||||
qApp->translate("SettingWidgetBinder", "File cannot be found."));
|
||||
}
|
||||
|
||||
Host::CommitBaseSettingChanges();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::critical(QtUtils::GetRootWidget(widget), qApp->translate("SettingWidgetBinder", "Error"),
|
||||
qApp->translate("SettingWidgetBinder", "File path cannot be empty."));
|
||||
}
|
||||
|
||||
// reset to old value
|
||||
std::string current_path(Host::GetBaseStringSettingValue(section.c_str(), key.c_str(), default_value.c_str()));
|
||||
if (current_path.empty())
|
||||
current_path = default_value;
|
||||
else if (use_relative && !Path::IsAbsolute(current_path))
|
||||
current_path = Path::Canonicalize(Path::Combine(EmuFolders::DataRoot, current_path));
|
||||
|
||||
widget->setText(QString::fromStdString(current_path));
|
||||
};
|
||||
|
||||
if (browse_button)
|
||||
{
|
||||
QObject::connect(browse_button, &QAbstractButton::clicked, browse_button, [widget, key, value_changed, filter]() {
|
||||
const QString path(QDir::toNativeSeparators(QFileDialog::getOpenFileName(QtUtils::GetRootWidget(widget),
|
||||
qApp->translate("SettingWidgetBinder", "Select File"), QString(), filter)));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
widget->setText(path);
|
||||
value_changed();
|
||||
});
|
||||
}
|
||||
if (open_button)
|
||||
{
|
||||
QObject::connect(open_button, &QAbstractButton::clicked, open_button, [widget]() {
|
||||
QString path(Accessor::getStringValue(widget));
|
||||
if (!path.isEmpty())
|
||||
QtUtils::OpenURL(QtUtils::GetRootWidget(widget), QUrl::fromLocalFile(path));
|
||||
});
|
||||
}
|
||||
if (reset_button)
|
||||
{
|
||||
QObject::connect(
|
||||
reset_button, &QAbstractButton::clicked, reset_button, [widget, default_value = std::move(default_value), value_changed]() {
|
||||
widget->setText(QString::fromStdString(default_value));
|
||||
value_changed();
|
||||
});
|
||||
}
|
||||
|
||||
widget->connect(widget, &QLineEdit::editingFinished, widget, std::move(value_changed));
|
||||
}
|
||||
|
||||
// No need to pass a section or key since this is only used once and has six keys associated with it
|
||||
static inline void BindWidgetToDateTimeSetting(SettingsInterface* sif, QDateTimeEdit* widget, std::string section)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
|
||||
const char* AUDIO_FILE_FILTER = QT_TRANSLATE_NOOP("MainWindow", "Audio Files (*.wav)");
|
||||
|
||||
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, m_dialog(dialog)
|
||||
@@ -29,6 +31,9 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.achievementNotifications, "Achievements", "Notifications", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.leaderboardNotifications, "Achievements", "LeaderboardNotifications", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.soundEffects, "Achievements", "SoundEffects", true);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.notificationSound, "Achievements", "InfoSound", true);
|
||||
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.encoreMode, "Achievements", "EncoreMode", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.spectatorMode, "Achievements", "SpectatorMode", false);
|
||||
@@ -36,11 +41,16 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
||||
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);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.notificationSoundPath, m_ui.notificationSoundBrowse, m_ui.notificationSoundOpen, m_ui.notificationSoundReset, "Achievements", "InfoSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_INFO_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
|
||||
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.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."));
|
||||
@@ -51,6 +61,10 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
||||
connect(m_ui.hardcoreMode, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::onHardcoreModeStateChanged);
|
||||
connect(m_ui.achievementNotifications, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.leaderboardNotifications, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.soundEffects, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.notificationSound, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.unlockSound, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.lbSound, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
|
||||
connect(m_ui.achievementNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged);
|
||||
connect(m_ui.leaderboardNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged);
|
||||
|
||||
@@ -73,6 +87,11 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
|
||||
m_ui.verticalLayout->removeWidget(m_ui.loginBox);
|
||||
m_ui.loginBox->deleteLater();
|
||||
m_ui.loginBox = nullptr;
|
||||
|
||||
// sound effects
|
||||
m_ui.verticalLayout->removeWidget(m_ui.soundEffectsBox);
|
||||
m_ui.soundEffectsBox->deleteLater();
|
||||
m_ui.soundEffectsBox = nullptr;
|
||||
}
|
||||
|
||||
updateEnableState();
|
||||
@@ -87,6 +106,10 @@ 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);
|
||||
m_ui.hardcoreMode->setEnabled(enabled);
|
||||
m_ui.achievementNotifications->setEnabled(enabled);
|
||||
m_ui.leaderboardNotifications->setEnabled(enabled);
|
||||
@@ -94,6 +117,21 @@ void AchievementSettingsWidget::updateEnableState()
|
||||
m_ui.achievementNotificationsDurationLabel->setEnabled(notifications);
|
||||
m_ui.leaderboardNotificationsDuration->setEnabled(lb_notifications);
|
||||
m_ui.leaderboardNotificationsDurationLabel->setEnabled(lb_notifications);
|
||||
m_ui.notificationSoundPath->setEnabled(info);
|
||||
m_ui.notificationSoundBrowse->setEnabled(info);
|
||||
m_ui.notificationSoundOpen->setEnabled(info);
|
||||
m_ui.notificationSoundReset->setEnabled(info);
|
||||
m_ui.notificationSound->setEnabled(enabled);
|
||||
m_ui.unlockSoundPath->setEnabled(unlock);
|
||||
m_ui.unlockSoundBrowse->setEnabled(unlock);
|
||||
m_ui.unlockSoundOpen->setEnabled(unlock);
|
||||
m_ui.unlockSoundReset->setEnabled(unlock);
|
||||
m_ui.unlockSound->setEnabled(enabled);
|
||||
m_ui.lbSoundPath->setEnabled(lbsound);
|
||||
m_ui.lbSoundOpen->setEnabled(lbsound);
|
||||
m_ui.lbSoundBrowse->setEnabled(lbsound);
|
||||
m_ui.lbSoundReset->setEnabled(lbsound);
|
||||
m_ui.lbSound->setEnabled(enabled);
|
||||
m_ui.soundEffects->setEnabled(enabled);
|
||||
m_ui.overlays->setEnabled(enabled);
|
||||
m_ui.encoreMode->setEnabled(enabled);
|
||||
|
||||
@@ -24,256 +24,364 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Settings</string>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="spectatorMode">
|
||||
<property name="text">
|
||||
<string>Enable Spectator 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="2" column="0">
|
||||
<widget class="QCheckBox" name="unofficialAchievements">
|
||||
<property name="text">
|
||||
<string>Test Unofficial Achievements</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>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="hardcoreMode">
|
||||
<property name="text">
|
||||
<string>Enable Hardcore 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="horizontalLayout_3" 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="horizontalLayout_2" 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="2" column="1">
|
||||
<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="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:
|
||||
<widget class="QWidget" name="scrollAreaAchievements">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-2</y>
|
||||
<width>655</width>
|
||||
<height>739</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>
|
||||
<item row="3" column="1">
|
||||
<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::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<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>
|
||||
</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>
|
||||
<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="label">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<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>
|
||||
<resources>
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-447</y>
|
||||
<y>-449</y>
|
||||
<width>790</width>
|
||||
<height>1049</height>
|
||||
<height>1051</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
|
||||
@@ -19,10 +19,14 @@ DebugAnalysisSettingsWidget::DebugAnalysisSettingsWidget(QWidget* parent)
|
||||
|
||||
setupSymbolSourceGrid();
|
||||
|
||||
m_ui.importFromElf->setChecked(Host::GetBoolSettingValue("Debugger/Analysis", "ImportSymbolsFromELF", true));
|
||||
m_ui.importSymFileFromDefaultLocation->setChecked(Host::GetBoolSettingValue("Debugger/Analysis", "ImportSymFileFromDefaultLocation", true));
|
||||
m_ui.demangleSymbols->setChecked(Host::GetBoolSettingValue("Debugger/Analysis", "DemangleSymbols", true));
|
||||
m_ui.demangleParameters->setChecked(Host::GetBoolSettingValue("Debugger/Analysis", "DemangleParameters", true));
|
||||
m_ui.importFromElf->setChecked(
|
||||
Host::GetBoolSettingValue("Debugger/Analysis", "ImportSymbolsFromELF", true));
|
||||
m_ui.importSymFileFromDefaultLocation->setChecked(
|
||||
Host::GetBoolSettingValue("Debugger/Analysis", "ImportSymFileFromDefaultLocation", true));
|
||||
m_ui.demangleSymbols->setChecked(
|
||||
Host::GetBoolSettingValue("Debugger/Analysis", "DemangleSymbols", true));
|
||||
m_ui.demangleParameters->setChecked(
|
||||
Host::GetBoolSettingValue("Debugger/Analysis", "DemangleParameters", true));
|
||||
|
||||
setupSymbolFileList();
|
||||
|
||||
@@ -36,15 +40,22 @@ DebugAnalysisSettingsWidget::DebugAnalysisSettingsWidget(QWidget* parent)
|
||||
m_ui.functionScanMode->setCurrentIndex(i);
|
||||
}
|
||||
|
||||
m_ui.customAddressRange->setChecked(Host::GetBoolSettingValue("Debugger/Analysis", "CustomFunctionScanRange", false));
|
||||
m_ui.addressRangeStart->setText(QString::fromStdString(Host::GetStringSettingValue("Debugger/Analysis", "FunctionScanStartAddress", "")));
|
||||
m_ui.addressRangeEnd->setText(QString::fromStdString(Host::GetStringSettingValue("Debugger/Analysis", "FunctionScanEndAddress", "")));
|
||||
m_ui.customAddressRange->setChecked(
|
||||
Host::GetBoolSettingValue("Debugger/Analysis", "CustomFunctionScanRange", false));
|
||||
m_ui.addressRangeStart->setText(QString::fromStdString(
|
||||
Host::GetStringSettingValue("Debugger/Analysis", "FunctionScanStartAddress", "")));
|
||||
m_ui.addressRangeEnd->setText(QString::fromStdString(
|
||||
Host::GetStringSettingValue("Debugger/Analysis", "FunctionScanEndAddress", "")));
|
||||
|
||||
m_ui.grayOutOverwrittenFunctions->setChecked(Host::GetBoolSettingValue("Debugger/Analysis", "GenerateFunctionHashes", true));
|
||||
m_ui.grayOutOverwrittenFunctions->setChecked(
|
||||
Host::GetBoolSettingValue("Debugger/Analysis", "GenerateFunctionHashes", true));
|
||||
|
||||
connect(m_ui.automaticallyClearSymbols, &QCheckBox::checkStateChanged, this, &DebugAnalysisSettingsWidget::updateEnabledStates);
|
||||
connect(m_ui.demangleSymbols, &QCheckBox::checkStateChanged, this, &DebugAnalysisSettingsWidget::updateEnabledStates);
|
||||
connect(m_ui.customAddressRange, &QCheckBox::checkStateChanged, this, &DebugAnalysisSettingsWidget::updateEnabledStates);
|
||||
connect(m_ui.automaticallyClearSymbols, &QCheckBox::checkStateChanged,
|
||||
this, &DebugAnalysisSettingsWidget::updateEnabledStates);
|
||||
connect(m_ui.demangleSymbols, &QCheckBox::checkStateChanged,
|
||||
this, &DebugAnalysisSettingsWidget::updateEnabledStates);
|
||||
connect(m_ui.customAddressRange, &QCheckBox::checkStateChanged,
|
||||
this, &DebugAnalysisSettingsWidget::updateEnabledStates);
|
||||
|
||||
updateEnabledStates();
|
||||
}
|
||||
@@ -122,8 +133,16 @@ DebugAnalysisSettingsWidget::DebugAnalysisSettingsWidget(SettingsWindow* dialog,
|
||||
{
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_ui.customAddressRange, "Debugger/Analysis", "CustomFunctionScanRange", false);
|
||||
connect(m_ui.addressRangeStart, &QLineEdit::textChanged, this, &DebugAnalysisSettingsWidget::functionScanRangeChanged);
|
||||
connect(m_ui.addressRangeEnd, &QLineEdit::textChanged, this, &DebugAnalysisSettingsWidget::functionScanRangeChanged);
|
||||
|
||||
m_ui.addressRangeStart->setText(QString::fromStdString(
|
||||
getStringSettingValue("Debugger/Analysis", "FunctionScanStartAddress", "")));
|
||||
m_ui.addressRangeEnd->setText(QString::fromStdString(
|
||||
getStringSettingValue("Debugger/Analysis", "FunctionScanEndAddress", "")));
|
||||
|
||||
connect(m_ui.addressRangeStart, &QLineEdit::textChanged,
|
||||
this, &DebugAnalysisSettingsWidget::saveFunctionScanRange);
|
||||
connect(m_ui.addressRangeEnd, &QLineEdit::textChanged,
|
||||
this, &DebugAnalysisSettingsWidget::saveFunctionScanRange);
|
||||
|
||||
m_dialog->registerWidgetHelp(m_ui.customAddressRange, tr("Custom Address Range"), tr("Unchecked"),
|
||||
tr("Whether to look for functions from the address range specified (Checked), or from the ELF segment "
|
||||
@@ -302,6 +321,9 @@ void DebugAnalysisSettingsWidget::saveSymbolSources()
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
QtHost::SaveGameSettings(sif, true);
|
||||
g_emu_thread->reloadGameSettings();
|
||||
}
|
||||
|
||||
void DebugAnalysisSettingsWidget::setupSymbolFileList()
|
||||
@@ -445,7 +467,7 @@ void DebugAnalysisSettingsWidget::saveSymbolFiles()
|
||||
g_emu_thread->reloadGameSettings();
|
||||
}
|
||||
|
||||
void DebugAnalysisSettingsWidget::functionScanRangeChanged()
|
||||
void DebugAnalysisSettingsWidget::saveFunctionScanRange()
|
||||
{
|
||||
if (!m_dialog)
|
||||
return;
|
||||
@@ -457,13 +479,11 @@ void DebugAnalysisSettingsWidget::functionScanRangeChanged()
|
||||
QString start_address = m_ui.addressRangeStart->text();
|
||||
QString end_address = m_ui.addressRangeEnd->text();
|
||||
|
||||
bool ok;
|
||||
sif->SetStringValue("Debugger/Analysis", "FunctionScanStartAddress", start_address.toStdString().c_str());
|
||||
sif->SetStringValue("Debugger/Analysis", "FunctionScanEndAddress", end_address.toStdString().c_str());
|
||||
|
||||
if (start_address.toUInt(&ok, 16), ok)
|
||||
sif->SetStringValue("Debugger/Analysis", "FunctionScanStartAddress", start_address.toStdString().c_str());
|
||||
|
||||
if (end_address.toUInt(&ok, 16), ok)
|
||||
sif->SetStringValue("Debugger/Analysis", "FunctionScanEndAddress", end_address.toStdString().c_str());
|
||||
QtHost::SaveGameSettings(sif, true);
|
||||
g_emu_thread->reloadGameSettings();
|
||||
}
|
||||
|
||||
void DebugAnalysisSettingsWidget::updateEnabledStates()
|
||||
|
||||
@@ -38,7 +38,7 @@ protected:
|
||||
void removeSymbolFile();
|
||||
void saveSymbolFiles();
|
||||
|
||||
void functionScanRangeChanged();
|
||||
void saveFunctionScanRange();
|
||||
|
||||
void updateEnabledStates();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "DebugUserInterfaceSettingsWidget.h"
|
||||
|
||||
#include "SettingWidgetBinder.h"
|
||||
#include "Debugger/DebuggerWindow.h"
|
||||
|
||||
static const char* s_drop_indicators[] = {
|
||||
QT_TRANSLATE_NOOP("DebugUserInterfaceSettingsWidget", "Classic"),
|
||||
@@ -19,32 +20,40 @@ DebugUserInterfaceSettingsWidget::DebugUserInterfaceSettingsWidget(SettingsWindo
|
||||
|
||||
m_ui.setupUi(this);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_ui.showOnStartupCheckBox, "Debugger/UserInterface", "ShowOnStartup", false);
|
||||
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(
|
||||
sif, m_ui.refreshInterval, "Debugger/UserInterface", "RefreshInterval", 1000);
|
||||
connect(m_ui.refreshInterval, &QSpinBox::valueChanged, this, []() {
|
||||
if (g_debugger_window)
|
||||
g_debugger_window->updateFromSettings();
|
||||
});
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.showOnStartupCheckBox, tr("Show On Startup"), tr("Unchecked"),
|
||||
m_ui.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_ui.showOnStartup, "Debugger/UserInterface", "ShowOnStartup", false);
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.showOnStartup, tr("Show On Startup"), tr("Unchecked"),
|
||||
tr("Open the debugger window automatically when PCSX2 starts."));
|
||||
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(
|
||||
sif, m_ui.saveWindowGeometryCheckBox, "Debugger/UserInterface", "SaveWindowGeometry", true);
|
||||
|
||||
sif, m_ui.saveWindowGeometry, "Debugger/UserInterface", "SaveWindowGeometry", true);
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.saveWindowGeometryCheckBox, tr("Save Window Geometry"), tr("Checked"),
|
||||
m_ui.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_ui.dropIndicatorCombo,
|
||||
m_ui.dropIndicator,
|
||||
"Debugger/UserInterface",
|
||||
"DropIndicatorStyle",
|
||||
s_drop_indicators,
|
||||
s_drop_indicators,
|
||||
s_drop_indicators[0],
|
||||
"DebugUserInterfaceSettingsWidget");
|
||||
|
||||
dialog->registerWidgetHelp(
|
||||
m_ui.dropIndicatorCombo, tr("Drop Indicator Style"), tr("Classic"),
|
||||
m_ui.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."));
|
||||
}
|
||||
|
||||
@@ -38,15 +38,8 @@
|
||||
<string>Debugger Window</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="saveWindowGeometryCheckBox">
|
||||
<property name="text">
|
||||
<string>Save Window Geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="showOnStartupCheckBox">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="showOnStartup">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -58,6 +51,36 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="saveWindowGeometry">
|
||||
<property name="text">
|
||||
<string>Save Window Geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="refreshIntervalLabel">
|
||||
<property name="text">
|
||||
<string>Refresh Interval:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="refreshInterval">
|
||||
<property name="suffix">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -76,12 +99,12 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="dropIndicatorLabel">
|
||||
<property name="text">
|
||||
<string>Drop Indicator Style</string>
|
||||
<string>Drop Indicator Style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="dropIndicatorCombo"/>
|
||||
<widget class="QComboBox" name="dropIndicator"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -34,6 +34,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.vsync, "EmuCore/GS", "VsyncEnable", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.syncToHostRefreshRate, "EmuCore/GS", "SyncToHostRefreshRate", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useVSyncForTiming, "EmuCore/GS", "UseVSyncForTiming", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.skipPresentingDuplicateFrames, "EmuCore/GS", "SkipDuplicateFrames", false);
|
||||
connect(m_ui.optimalFramePacing, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::onOptimalFramePacingChanged);
|
||||
connect(m_ui.vsync, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::updateUseVSyncForTimingEnabled);
|
||||
connect(m_ui.syncToHostRefreshRate, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::updateUseVSyncForTimingEnabled);
|
||||
@@ -154,6 +155,11 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
|
||||
dialog->registerWidgetHelp(m_ui.useVSyncForTiming, tr("Use Host VSync Timing"), tr("Unchecked"),
|
||||
tr("When synchronizing with the host refresh rate, this option disable's PCSX2's internal frame timing, and uses the host instead. "
|
||||
"Can result in smoother frame pacing, <strong>but at the cost of increased input latency</strong>."));
|
||||
dialog->registerWidgetHelp(m_ui.skipPresentingDuplicateFrames, tr("Skip Presenting Duplicate Frames"), tr("Checked"),
|
||||
tr("Detects when idle frames are being presented in 25/30fps games, and skips presenting those frames. The frame is still "
|
||||
"rendered, it just means the GPU has more time to complete it (this is NOT frame skipping). Can smooth out frame time "
|
||||
"fluctuations when the CPU/GPU are near maximum utilization, but makes frame pacing more inconsistent and can increase "
|
||||
"input lag. Helps when using frame generation on 25/30fps games."));
|
||||
dialog->registerWidgetHelp(m_ui.manuallySetRealTimeClock, tr("Manually Set Real-Time Clock"), tr("Unchecked"),
|
||||
tr("Manually set a real-time clock to use for the virtual PlayStation 2 instead of using your OS' system clock."));
|
||||
dialog->registerWidgetHelp(m_ui.rtcDateTime, tr("Real-Time Clock"), tr("Current date and time"),
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>672</width>
|
||||
<height>438</height>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@@ -222,13 +222,6 @@
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="basicCheckboxGridLayout">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="useVSyncForTiming">
|
||||
<property name="text">
|
||||
<string>Use Host VSync Timing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="syncToHostRefreshRate">
|
||||
<property name="text">
|
||||
@@ -236,6 +229,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="vsync">
|
||||
<property name="text">
|
||||
<string>Vertical Sync (VSync)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="optimalFramePacing">
|
||||
<property name="text">
|
||||
@@ -243,10 +243,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="vsync">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="useVSyncForTiming">
|
||||
<property name="text">
|
||||
<string>Vertical Sync (VSync)</string>
|
||||
<string>Use Host VSync Timing</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="skipPresentingDuplicateFrames">
|
||||
<property name="text">
|
||||
<string>Skip Presenting Duplicate Frames</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -282,8 +289,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDateTimeEdit" name="rtcDateTime">
|
||||
</widget>
|
||||
<widget class="QDateTimeEdit" name="rtcDateTime"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
@@ -283,6 +283,7 @@ QList<QStandardItem*> GameCheatSettingsWidget::populateTreeViewRow(const Patch::
|
||||
|
||||
QStandardItem* authorItem = new QStandardItem(QString::fromStdString(pi.author));
|
||||
QStandardItem* descriptionItem = new QStandardItem(QString::fromStdString(pi.description));
|
||||
descriptionItem->setToolTip(QString::fromStdString(pi.description));
|
||||
|
||||
items.push_back(nameItem);
|
||||
items.push_back(authorItem);
|
||||
|
||||
@@ -244,7 +244,6 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useBlitSwapChain, "EmuCore/GS", "UseBlitSwapChain", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.useDebugDevice, "EmuCore/GS", "UseDebugDevice", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.skipPresentingDuplicateFrames, "EmuCore/GS", "SkipDuplicateFrames", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableMailboxPresentation, "EmuCore/GS", "DisableMailboxPresentation", false);
|
||||
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.extendedUpscales, "EmuCore/GS", "ExtendedUpscalingMultipliers", false);
|
||||
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.exclusiveFullscreenControl, "EmuCore/GS", "ExclusiveFullscreenControl", -1, -1);
|
||||
@@ -395,7 +394,6 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
m_ui.extendedUpscales = nullptr;
|
||||
m_ui.spinCPUDuringReadbacks = nullptr;
|
||||
m_ui.spinGPUDuringReadbacks = nullptr;
|
||||
m_ui.skipPresentingDuplicateFrames = nullptr;
|
||||
m_ui.overrideTextureBarriers = nullptr;
|
||||
m_ui.disableFramebufferFetch = nullptr;
|
||||
m_ui.disableShaderCache = nullptr;
|
||||
@@ -861,12 +859,6 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* dialog, QWidget*
|
||||
tr("Overrides the driver's heuristics for enabling exclusive fullscreen, or direct flip/scanout.<br>"
|
||||
"Disallowing exclusive fullscreen may enable smoother task switching and overlays, but increase input latency."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.skipPresentingDuplicateFrames, tr("Skip Presenting Duplicate Frames"), tr("Unchecked"),
|
||||
tr("Detects when idle frames are being presented in 25/30fps games, and skips presenting those frames. The frame is still "
|
||||
"rendered, it just means the GPU has more time to complete it (this is NOT frame skipping). Can smooth out frame time "
|
||||
"fluctuations when the CPU/GPU are near maximum utilization, but makes frame pacing more inconsistent and can increase "
|
||||
"input lag."));
|
||||
|
||||
dialog->registerWidgetHelp(m_ui.disableMailboxPresentation, tr("Disable Mailbox Presentation"), tr("Unchecked"),
|
||||
tr("Forces the use of FIFO over Mailbox presentation, i.e. double buffering instead of triple buffering. "
|
||||
"Usually results in worse frame pacing."));
|
||||
|
||||
@@ -2131,6 +2131,13 @@
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="extendedUpscales">
|
||||
<property name="text">
|
||||
<string>Extended Upscaling Multipliers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="disableMailboxPresentation">
|
||||
<property name="text">
|
||||
@@ -2145,31 +2152,17 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="skipPresentingDuplicateFrames">
|
||||
<property name="text">
|
||||
<string>Skip Presenting Duplicate Frames</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="extendedUpscales">
|
||||
<widget class="QCheckBox" name="spinCPUDuringReadbacks">
|
||||
<property name="text">
|
||||
<string>Extended Upscaling Multipliers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="spinGPUDuringReadbacks">
|
||||
<property name="text">
|
||||
<string>Spin GPU During Readbacks</string>
|
||||
<string>Spin CPU During Readbacks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="spinCPUDuringReadbacks">
|
||||
<widget class="QCheckBox" name="spinGPUDuringReadbacks">
|
||||
<property name="text">
|
||||
<string>Spin CPU During Readbacks</string>
|
||||
<string>Spin GPU During Readbacks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -95,7 +95,7 @@
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeLocation.cpp" />
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeModel.cpp" />
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeNode.cpp" />
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeWidgets.cpp" />
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeViews.cpp" />
|
||||
<ClCompile Include="Debugger\SymbolTree\TypeString.cpp" />
|
||||
<ClCompile Include="EarlyHardwareCheck.cpp" />
|
||||
<ClCompile Include="LogWindow.cpp" />
|
||||
@@ -112,30 +112,31 @@
|
||||
<ClCompile Include="Tools\InputRecording\InputRecordingViewer.cpp" />
|
||||
<ClCompile Include="Tools\InputRecording\NewInputRecordingDlg.cpp" />
|
||||
<ClCompile Include="Debugger\AnalysisOptionsDialog.cpp" />
|
||||
<ClCompile Include="Debugger\DebuggerWidget.cpp" />
|
||||
<ClCompile Include="Debugger\DebuggerView.cpp" />
|
||||
<ClCompile Include="Debugger\DebuggerWindow.cpp" />
|
||||
<ClCompile Include="Debugger\DisassemblyWidget.cpp" />
|
||||
<ClCompile Include="Debugger\RegisterWidget.cpp" />
|
||||
<ClCompile Include="Debugger\DisassemblyView.cpp" />
|
||||
<ClCompile Include="Debugger\RegisterView.cpp" />
|
||||
<ClCompile Include="Debugger\DebuggerSettingsManager.cpp" />
|
||||
<ClCompile Include="Debugger\StackModel.cpp" />
|
||||
<ClCompile Include="Debugger\StackWidget.cpp" />
|
||||
<ClCompile Include="Debugger\StackView.cpp" />
|
||||
<ClCompile Include="Debugger\ThreadModel.cpp" />
|
||||
<ClCompile Include="Debugger\ThreadWidget.cpp" />
|
||||
<ClCompile Include="Debugger\ThreadView.cpp" />
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointDialog.cpp" />
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointModel.cpp" />
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointWidget.cpp" />
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointView.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\DockLayout.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\DockManager.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\DockMenuBar.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\DockTables.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\DockUtils.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\DockViews.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\DropIndicators.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\LayoutEditorDialog.cpp" />
|
||||
<ClCompile Include="Debugger\Docking\NoLayoutsWidget.cpp" />
|
||||
<ClCompile Include="Debugger\Memory\MemorySearchWidget.cpp" />
|
||||
<ClCompile Include="Debugger\Memory\MemoryViewWidget.cpp" />
|
||||
<ClCompile Include="Debugger\Memory\MemorySearchView.cpp" />
|
||||
<ClCompile Include="Debugger\Memory\MemoryView.cpp" />
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesModel.cpp" />
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesWidget.cpp" />
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesView.cpp" />
|
||||
<ClCompile Include="Settings\BIOSSettingsWidget.cpp" />
|
||||
<ClCompile Include="Settings\ControllerBindingWidget.cpp" />
|
||||
<ClCompile Include="Settings\ControllerGlobalSettingsWidget.cpp" />
|
||||
@@ -206,7 +207,7 @@
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeLocation.h" />
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeModel.h" />
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeNode.h" />
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeWidgets.h" />
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeViews.h" />
|
||||
<QtMoc Include="Debugger\SymbolTree\TypeString.h" />
|
||||
<ClInclude Include="Settings\ControllerSettingWidgetBinder.h" />
|
||||
<QtMoc Include="Settings\FolderSettingsWidget.h" />
|
||||
@@ -228,30 +229,31 @@
|
||||
<ClInclude Include="QtUtils.h" />
|
||||
<QtMoc Include="Debugger\AnalysisOptionsDialog.h" />
|
||||
<QtMoc Include="Debugger\DebuggerEvents.h" />
|
||||
<QtMoc Include="Debugger\DebuggerWidget.h" />
|
||||
<QtMoc Include="Debugger\DebuggerView.h" />
|
||||
<QtMoc Include="Debugger\DebuggerWindow.h" />
|
||||
<QtMoc Include="Debugger\DisassemblyWidget.h" />
|
||||
<QtMoc Include="Debugger\RegisterWidget.h" />
|
||||
<QtMoc Include="Debugger\DisassemblyView.h" />
|
||||
<QtMoc Include="Debugger\RegisterView.h" />
|
||||
<QtMoc Include="Debugger\StackModel.h" />
|
||||
<QtMoc Include="Debugger\StackWidget.h" />
|
||||
<QtMoc Include="Debugger\StackView.h" />
|
||||
<QtMoc Include="Debugger\ThreadModel.h" />
|
||||
<QtMoc Include="Debugger\ThreadWidget.h" />
|
||||
<QtMoc Include="Debugger\ThreadView.h" />
|
||||
<ClInclude Include="Debugger\DebuggerSettingsManager.h" />
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointDialog.h" />
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointModel.h" />
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointWidget.h" />
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointView.h" />
|
||||
<QtMoc Include="Debugger\Docking\DockLayout.h" />
|
||||
<QtMoc Include="Debugger\Docking\DockManager.h" />
|
||||
<QtMoc Include="Debugger\Docking\DockMenuBar.h" />
|
||||
<QtMoc Include="Debugger\Docking\DockTables.h" />
|
||||
<QtMoc Include="Debugger\Docking\DockUtils.h" />
|
||||
<QtMoc Include="Debugger\Docking\DockViews.h" />
|
||||
<QtMoc Include="Debugger\Docking\DropIndicators.h" />
|
||||
<QtMoc Include="Debugger\Docking\LayoutEditorDialog.h" />
|
||||
<QtMoc Include="Debugger\Docking\NoLayoutsWidget.h" />
|
||||
<QtMoc Include="Debugger\Memory\MemorySearchWidget.h" />
|
||||
<QtMoc Include="Debugger\Memory\MemoryViewWidget.h" />
|
||||
<QtMoc Include="Debugger\Memory\MemorySearchView.h" />
|
||||
<QtMoc Include="Debugger\Memory\MemoryView.h" />
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesModel.h" />
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesWidget.h" />
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesView.h" />
|
||||
<QtMoc Include="Settings\ControllerBindingWidget.h" />
|
||||
<QtMoc Include="Settings\ControllerGlobalSettingsWidget.h" />
|
||||
<ClInclude Include="Settings\MemoryCardConvertWorker.h" />
|
||||
@@ -301,32 +303,33 @@
|
||||
<ClCompile Include="$(IntDir)Settings\moc_DebugUserInterfaceSettingsWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Settings\moc_DebugSettingsWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_AnalysisOptionsDialog.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DebuggerWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DebuggerView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DebuggerWindow.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DisassemblyWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_RegisterWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DisassemblyView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_RegisterView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_StackModel.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_StackWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_StackView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_ThreadModel.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_ThreadWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_ThreadView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointDialog.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointModel.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_DockManager.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_DockMenuBar.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_DockViews.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_DropIndicators.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_LayoutEditorDialog.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_NoLayoutsWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemorySearchWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemoryViewWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemorySearchView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemoryView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_SavedAddressesModel.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_SavedAddressesWidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_SavedAddressesView.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_NewSymbolDialogs.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeDelegates.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeLocation.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeModel.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeNode.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeWidgets.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeViews.cpp" />
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_TypeString.cpp" />
|
||||
<ClCompile Include="$(IntDir)GameList\moc_GameListModel.cpp" />
|
||||
<ClCompile Include="$(IntDir)GameList\moc_GameListRefreshThread.cpp" />
|
||||
@@ -348,208 +351,85 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUi Include="MainWindow.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="GameList\EmptyGameListWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="GameList\GameListWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\SettingsWindow.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameListSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\BIOSSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\EmulationSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GraphicsSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\InterfaceSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AdvancedSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameFixSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\InputBindingDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerSettingsWindow.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Guitar.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerGlobalSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardCreateDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardConvertDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DEV9DnsHostDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DEV9SettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameSummaryWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="AutoUpdaterDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="CoverDownloadDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Tools\InputRecording\NewInputRecordingDlg.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AchievementLoginDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AchievementSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Tools\InputRecording\InputRecordingViewer.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\AnalysisOptionsDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\DebuggerWindow.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\DisassemblyWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\RegisterWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Docking\LayoutEditorDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Docking\NoLayoutsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemorySearchWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemoryViewWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\SavedAddressesWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUi Include="SetupWizardDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="AboutDialog.ui" />
|
||||
<QtUi Include="AutoUpdaterDialog.ui" />
|
||||
<QtUi Include="CoverDownloadDialog.ui" />
|
||||
<QtUi Include="Debugger\AnalysisOptionsDialog.ui" />
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointDialog.ui" />
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointView.ui" />
|
||||
<QtUi Include="Debugger\DebuggerWindow.ui" />
|
||||
<QtUi Include="Debugger\DisassemblyView.ui" />
|
||||
<QtUi Include="Debugger\Docking\LayoutEditorDialog.ui" />
|
||||
<QtUi Include="Debugger\Docking\NoLayoutsWidget.ui" />
|
||||
<QtUi Include="Debugger\Memory\MemorySearchView.ui" />
|
||||
<QtUi Include="Debugger\Memory\MemoryView.ui" />
|
||||
<QtUi Include="Debugger\Memory\SavedAddressesView.ui" />
|
||||
<QtUi Include="Debugger\RegisterView.ui" />
|
||||
<QtUi Include="Debugger\StackView.ui" />
|
||||
<QtUi Include="Debugger\SymbolTree\NewSymbolDialog.ui" />
|
||||
<QtUi Include="Debugger\SymbolTree\SymbolTreeView.ui" />
|
||||
<QtUi Include="Debugger\ThreadView.ui" />
|
||||
<QtUi Include="GameList\EmptyGameListWidget.ui" />
|
||||
<QtUi Include="GameList\GameListWidget.ui" />
|
||||
<QtUi Include="MainWindow.ui" />
|
||||
<QtUi Include="Settings\AchievementLoginDialog.ui" />
|
||||
<QtUi Include="Settings\AchievementSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\AdvancedSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\AudioExpansionSettingsDialog.ui" />
|
||||
<QtUi Include="Settings\AudioSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\AudioStretchSettingsDialog.ui" />
|
||||
<QtUi Include="Settings\BIOSSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\ControllerBindingWidget.ui" />
|
||||
<QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui" />
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Guitar.ui" />
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Jogcon.ui" />
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Negcon.ui" />
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Popn.ui" />
|
||||
<QtUi Include="Settings\ControllerGlobalSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\ControllerLEDSettingsDialog.ui" />
|
||||
<QtUi Include="Settings\ControllerMacroEditWidget.ui" />
|
||||
<QtUi Include="Settings\ControllerMacroWidget.ui" />
|
||||
<QtUi Include="Settings\ControllerMappingSettingsDialog.ui" />
|
||||
<QtUi Include="Settings\ControllerMouseSettingsDialog.ui" />
|
||||
<QtUi Include="Settings\ControllerSettingsWindow.ui" />
|
||||
<QtUi Include="Settings\DebugAnalysisSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\DebugSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\DebugUserInterfaceSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\DEV9DnsHostDialog.ui" />
|
||||
<QtUi Include="Settings\DEV9SettingsWidget.ui" />
|
||||
<QtUi Include="Settings\EmulationSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\FolderSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\GameCheatSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\GameFixSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\GameListSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\GamePatchDetailsWidget.ui" />
|
||||
<QtUi Include="Settings\GamePatchSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\GameSummaryWidget.ui" />
|
||||
<QtUi Include="Settings\GraphicsSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\InputBindingDialog.ui" />
|
||||
<QtUi Include="Settings\InterfaceSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\MemoryCardConvertDialog.ui" />
|
||||
<QtUi Include="Settings\MemoryCardCreateDialog.ui" />
|
||||
<QtUi Include="Settings\MemoryCardSettingsWidget.ui" />
|
||||
<QtUi Include="Settings\PatchDetailsWidget.ui" />
|
||||
<QtUi Include="Settings\SettingsWindow.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_Buzz.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_DenshaCon.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_DrivingForce.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_Gametrak.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_GTForce.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_GunCon2.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_RealPlay.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_RyojouhenCon.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_ShinkansenCon.ui" />
|
||||
<QtUi Include="Settings\USBBindingWidget_TranceVibrator.ui" />
|
||||
<QtUi Include="Settings\USBDeviceWidget.ui" />
|
||||
<QtTs Include="Translations\pcsx2-qt_en.ts">
|
||||
<FileType>Document</FileType>
|
||||
</QtTs>
|
||||
<QtUi Include="Settings\DebugAnalysisSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugUserInterfaceSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerLEDSettingsDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMouseSettingsDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameCheatSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GamePatchSettingsWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_Buzz.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_DenshaCon.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_DrivingForce.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_Gametrak.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_GTForce.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_GunCon2.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_RealPlay.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_RyojouhenCon.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_ShinkansenCon.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_TranceVibrator.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBDeviceWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMacroEditWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMacroWidget.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<None Include="Debugger\SymbolTree\NewSymbolDialog.ui" />
|
||||
<None Include="Debugger\SymbolTree\SymbolTreeWidget.ui" />
|
||||
<QtUi Include="Settings\AudioExpansionSettingsDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioStretchSettingsDialog.ui">
|
||||
<FileType>Document</FileType>
|
||||
</QtUi>
|
||||
<None Include="Settings\ControllerBindingWidget_Popn.ui" />
|
||||
<None Include="Settings\ControllerMappingSettingsDialog.ui" />
|
||||
<None Include="Settings\FolderSettingsWidget.ui" />
|
||||
<QtUi Include="SetupWizardDialog.ui" />
|
||||
<QtUi Include="Tools\InputRecording\InputRecordingViewer.ui" />
|
||||
<QtUi Include="Tools\InputRecording\NewInputRecordingDlg.ui" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<Import Project="$(SolutionDir)common\vsprops\QtCompile.targets" />
|
||||
|
||||
@@ -22,15 +22,21 @@
|
||||
<Filter Include="Debugger">
|
||||
<UniqueIdentifier>{ddb40cc4-9996-4ade-b647-eb549063553c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Models">
|
||||
<UniqueIdentifier>{f4084ca0-d9d5-4584-b9d2-063db9f67de2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Translations">
|
||||
<UniqueIdentifier>{ad04f939-64a0-4039-97aa-a38b8aa46855}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\SymbolTree">
|
||||
<UniqueIdentifier>{a622b871-62ae-4b70-b9b2-6ee30ce7fa7a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Breakpoints">
|
||||
<UniqueIdentifier>{694f359a-dd3c-4e05-b000-684acb0fe0b0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Docking">
|
||||
<UniqueIdentifier>{669ad4fe-0b5a-4722-946c-9e0742cebbca}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Debugger\Memory">
|
||||
<UniqueIdentifier>{63790c94-0680-417d-926c-a8b74118f80f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\pcsx2\windows\PCSX2.rc" />
|
||||
@@ -278,109 +284,40 @@
|
||||
<ClCompile Include="Debugger\AnalysisOptionsDialog.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\DebuggerWidget.cpp">
|
||||
<ClCompile Include="Debugger\DebuggerView.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\DebuggerWindow.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\DisassemblyWidget.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\RegisterWidget.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\StackModel.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\StackWidget.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\ThreadModel.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\ThreadWidget.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointDialog.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointModel.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointWidget.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockLayout.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockManager.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockTables.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockUtils.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockViews.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DropIndicators.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\LayoutEditorDialog.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\NoLayoutsWidget.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemorySearchWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemoryViewWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesModel.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesWidget.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_AnalysisOptionsDialog.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DebuggerWidget.cpp">
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DebuggerView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DebuggerWindow.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DisassemblyWidget.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_RegisterWidget.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_StackModel.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_StackWidget.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_ThreadModel.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_ThreadWidget.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointDialog.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointModel.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointWidget.cpp">
|
||||
<ClCompile Include="$(IntDir)Debugger\Breakpoints\moc_BreakpointView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_DockManager.cpp">
|
||||
@@ -398,16 +335,16 @@
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_NoLayoutsWidget.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemorySearchWidget.cpp">
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemorySearchView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemoryViewWidget.cpp">
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_MemoryView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_SavedAddressesModel.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_SavedAddressesWidget.cpp">
|
||||
<ClCompile Include="$(IntDir)Debugger\Memory\moc_SavedAddressesView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ColorPickerButton.cpp" />
|
||||
@@ -454,13 +391,109 @@
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeNode.cpp">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeWidgets.cpp">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\SymbolTree\TypeString.cpp">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="VCRuntimeChecker.cpp" />
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointDialog.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointModel.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Breakpoints\BreakpointView.cpp">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockLayout.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockManager.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockTables.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockUtils.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockViews.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DropIndicators.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesModel.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\SavedAddressesView.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemorySearchView.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Memory\MemoryView.cpp">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\LayoutEditorDialog.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\NoLayoutsWidget.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_NewSymbolDialogs.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeDelegates.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeLocation.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeModel.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeNode.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_TypeString.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\Docking\moc_DockMenuBar.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\Docking\DockMenuBar.cpp">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\StackView.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\SymbolTree\SymbolTreeViews.cpp">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_DisassemblyView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_RegisterView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_StackView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeViews.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)Debugger\moc_ThreadView.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\DisassemblyView.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\RegisterView.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Debugger\ThreadView.cpp">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="..\pcsx2\windows\PCSX2.manifest">
|
||||
@@ -483,27 +516,6 @@
|
||||
<ClInclude Include="Debugger\DebuggerSettingsManager.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\NewSymbolDialogs.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeDelegates.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeLocation.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeModel.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeNode.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\SymbolTreeWidgets.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Debugger\SymbolTree\TypeString.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="MainWindow.h" />
|
||||
@@ -616,37 +628,35 @@
|
||||
<QtMoc Include="Debugger\DebuggerEvents.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\DebuggerWidget.h">
|
||||
<QtMoc Include="Debugger\DebuggerView.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\DebuggerWindow.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\DisassemblyWidget.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\RegisterWidget.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\StackModel.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\StackWidget.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\ThreadModel.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\ThreadWidget.h">
|
||||
<Filter>Debugger</Filter>
|
||||
<QtMoc Include="ColorPickerButton.h" />
|
||||
<QtMoc Include="SetupWizardDialog.h" />
|
||||
<QtMoc Include="Settings\GameCheatSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Settings\GamePatchSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="LogWindow.h" />
|
||||
<QtMoc Include="Debugger\SymbolTree\TypeString.h" />
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointDialog.h">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointModel.h">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointWidget.h">
|
||||
<QtMoc Include="Debugger\Breakpoints\BreakpointView.h">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Docking\DockLayout.h">
|
||||
@@ -667,33 +677,57 @@
|
||||
<QtMoc Include="Debugger\Docking\DropIndicators.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeDelegates.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeLocation.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeModel.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeNode.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesModel.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesView.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\MemorySearchView.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\MemoryView.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Docking\LayoutEditorDialog.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Docking\NoLayoutsWidget.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\MemorySearchWidget.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
<QtMoc Include="Debugger\SymbolTree\NewSymbolDialogs.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\MemoryViewWidget.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
<QtMoc Include="Debugger\Docking\DockMenuBar.h">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesModel.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
<QtMoc Include="Debugger\StackView.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\Memory\SavedAddressesWidget.h">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
<QtMoc Include="Debugger\SymbolTree\SymbolTreeViews.h">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="ColorPickerButton.h" />
|
||||
<QtMoc Include="SetupWizardDialog.h" />
|
||||
<QtMoc Include="Settings\GameCheatSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
<QtMoc Include="Debugger\DisassemblyView.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Settings\GamePatchSettingsWidget.h">
|
||||
<Filter>Settings</Filter>
|
||||
<QtMoc Include="Debugger\RegisterView.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="Debugger\ThreadView.h">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="LogWindow.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtResource Include="resources\resources.qrc">
|
||||
@@ -701,124 +735,10 @@
|
||||
</QtResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtUi Include="mainwindow.ui" />
|
||||
<QtUi Include="Settings\BIOSSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\EmulationSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameListSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GraphicsSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\InterfaceSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\SettingsWindow.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AdvancedSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameFixSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\InputBindingDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerSettingsWindow.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Guitar.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerGlobalSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameSummaryWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardConvertDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardCreateDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DEV9DnsHostDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DEV9SettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="GameList\EmptyGameListWidget.ui">
|
||||
<Filter>GameList</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="GameList\GameListWidget.ui">
|
||||
<Filter>GameList</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="AutoUpdaterDialog.ui" />
|
||||
<QtUi Include="Tools\InputRecording\NewInputRecordingDlg.ui">
|
||||
<Filter>Tools\Input Recording</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMacroWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMacroEditWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AchievementSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AchievementLoginDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="CoverDownloadDialog.ui" />
|
||||
<QtUi Include="Tools\InputRecording\InputRecordingViewer.ui">
|
||||
<Filter>Tools\Input Recording</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBDeviceWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugAnalysisSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugUserInterfaceSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\AnalysisOptionsDialog.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\DebuggerWindow.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\DisassemblyWidget.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\RegisterWidget.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointDialog.ui">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointWidget.ui">
|
||||
<QtUi Include="Debugger\Breakpoints\BreakpointView.ui">
|
||||
<Filter>Debugger\Breakpoints</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Docking\LayoutEditorDialog.ui">
|
||||
@@ -827,28 +747,153 @@
|
||||
<QtUi Include="Debugger\Docking\NoLayoutsWidget.ui">
|
||||
<Filter>Debugger\Docking</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemorySearchWidget.ui">
|
||||
<QtUi Include="Debugger\Memory\MemorySearchView.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\MemoryViewWidget.ui">
|
||||
<QtUi Include="Debugger\Memory\MemoryView.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\Memory\SavedAddressesWidget.ui">
|
||||
<QtUi Include="Debugger\Memory\SavedAddressesView.ui">
|
||||
<Filter>Debugger\Memory</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\SymbolTree\NewSymbolDialog.ui">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\AnalysisOptionsDialog.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\DebuggerWindow.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="GameList\EmptyGameListWidget.ui">
|
||||
<Filter>GameList</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="GameList\GameListWidget.ui">
|
||||
<Filter>GameList</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AchievementLoginDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AchievementSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AdvancedSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioExpansionSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioStretchSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\BIOSSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_DualShock2.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Guitar.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Jogcon.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Negcon.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerBindingWidget_Popn.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerGlobalSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerLEDSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMacroEditWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMacroWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMappingSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerMouseSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\ControllerSettingsWindow.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugAnalysisSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DebugUserInterfaceSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DEV9DnsHostDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\DEV9SettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\EmulationSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\FolderSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameCheatSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameFixSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GameListSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GamePatchDetailsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GamePatchSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="SetupWizardDialog.ui" />
|
||||
<QtUi Include="Settings\GameSummaryWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\GraphicsSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\InputBindingDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\InterfaceSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardConvertDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardCreateDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\MemoryCardSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\PatchDetailsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\SettingsWindow.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\USBBindingWidget_Buzz.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
@@ -879,33 +924,39 @@
|
||||
<QtUi Include="Settings\USBBindingWidget_TranceVibrator.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioExpansionSettingsDialog.ui">
|
||||
<QtUi Include="Settings\USBDeviceWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Settings\AudioStretchSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
<QtUi Include="Tools\InputRecording\InputRecordingViewer.ui">
|
||||
<Filter>Tools\Input Recording</Filter>
|
||||
</QtUi>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Settings\FolderSettingsWidget.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</None>
|
||||
<None Include="Settings\ControllerBindingWidget_Popn.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</None>
|
||||
<None Include="Settings\ControllerMappingSettingsDialog.ui">
|
||||
<Filter>Settings</Filter>
|
||||
</None>
|
||||
<None Include="Debugger\SymbolTree\NewSymbolDialog.ui">
|
||||
<QtUi Include="Tools\InputRecording\NewInputRecordingDlg.ui">
|
||||
<Filter>Tools\Input Recording</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="AboutDialog.ui" />
|
||||
<QtUi Include="AutoUpdaterDialog.ui" />
|
||||
<QtUi Include="CoverDownloadDialog.ui" />
|
||||
<QtUi Include="MainWindow.ui" />
|
||||
<QtUi Include="SetupWizardDialog.ui" />
|
||||
<QtUi Include="Debugger\StackView.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\SymbolTree\SymbolTreeView.ui">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</None>
|
||||
<None Include="Debugger\SymbolTree\SymbolTreeWidget.ui">
|
||||
<Filter>Debugger\SymbolTree</Filter>
|
||||
</None>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\DisassemblyView.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\RegisterView.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
<QtUi Include="Debugger\ThreadView.ui">
|
||||
<Filter>Debugger</Filter>
|
||||
</QtUi>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtTs Include="Translations\pcsx2-qt_en.ts">
|
||||
<Filter>Translations</Filter>
|
||||
</QtTs>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -74,10 +74,6 @@ namespace Achievements
|
||||
// Chrome uses 10 server calls per domain, seems reasonable.
|
||||
static constexpr u32 MAX_CONCURRENT_SERVER_CALLS = 10;
|
||||
|
||||
static constexpr const char* INFO_SOUND_NAME = "sounds/achievements/message.wav";
|
||||
static constexpr const char* UNLOCK_SOUND_NAME = "sounds/achievements/unlock.wav";
|
||||
static constexpr const char* LBSUBMIT_SOUND_NAME = "sounds/achievements/lbsubmit.wav";
|
||||
|
||||
namespace
|
||||
{
|
||||
struct LoginWithPasswordParameters
|
||||
@@ -1050,9 +1046,8 @@ void Achievements::DisplayAchievementSummary()
|
||||
});
|
||||
}
|
||||
|
||||
// Technically not going through the resource API, but since we're passing this to something else, we can't.
|
||||
if (EmuConfig.Achievements.SoundEffects)
|
||||
Common::PlaySoundAsync(EmuFolders::GetOverridableResourcePath(INFO_SOUND_NAME).c_str());
|
||||
if (EmuConfig.Achievements.SoundEffects && EmuConfig.Achievements.InfoSound)
|
||||
Common::PlaySoundAsync(EmuConfig.Achievements.InfoSoundName.c_str());
|
||||
}
|
||||
|
||||
void Achievements::DisplayHardcoreDeferredMessage()
|
||||
@@ -1103,8 +1098,8 @@ void Achievements::HandleUnlockEvent(const rc_client_event_t* event)
|
||||
});
|
||||
}
|
||||
|
||||
if (EmuConfig.Achievements.SoundEffects)
|
||||
Common::PlaySoundAsync(EmuFolders::GetOverridableResourcePath(UNLOCK_SOUND_NAME).c_str());
|
||||
if (EmuConfig.Achievements.SoundEffects && EmuConfig.Achievements.UnlockSound)
|
||||
Common::PlaySoundAsync(EmuConfig.Achievements.UnlockSoundName.c_str());
|
||||
}
|
||||
|
||||
void Achievements::HandleGameCompleteEvent(const rc_client_event_t* event)
|
||||
@@ -1197,8 +1192,8 @@ void Achievements::HandleLeaderboardSubmittedEvent(const rc_client_event_t* even
|
||||
});
|
||||
}
|
||||
|
||||
if (EmuConfig.Achievements.SoundEffects)
|
||||
Common::PlaySoundAsync(EmuFolders::GetOverridableResourcePath(LBSUBMIT_SOUND_NAME).c_str());
|
||||
if (EmuConfig.Achievements.SoundEffects && EmuConfig.Achievements.LBSubmitSound)
|
||||
Common::PlaySoundAsync(EmuConfig.Achievements.LBSubmitSoundName.c_str());
|
||||
}
|
||||
|
||||
void Achievements::HandleLeaderboardScoreboardEvent(const rc_client_event_t* event)
|
||||
@@ -2271,7 +2266,9 @@ void Achievements::DrawAchievementsWindow()
|
||||
ImGui::GetColorU32(ImGuiFullscreen::UISecondaryColor));
|
||||
|
||||
text.format("{}%", static_cast<int>(std::round(fraction * 100.0f)));
|
||||
ImGui::PushFont(g_medium_font);
|
||||
text_size = ImGui::CalcTextSize(text.c_str(), text.end_ptr());
|
||||
ImGui::PopFont();
|
||||
const ImVec2 text_pos(progress_bb.Min.x + ((progress_bb.Max.x - progress_bb.Min.x) / 2.0f) - (text_size.x / 2.0f),
|
||||
progress_bb.Min.y + ((progress_bb.Max.y - progress_bb.Min.y) / 2.0f) - (text_size.y / 2.0f));
|
||||
dl->AddText(g_medium_font, g_medium_font->FontSize, text_pos, ImGui::GetColorU32(ImGuiFullscreen::UIPrimaryTextColor),
|
||||
|
||||
@@ -1209,6 +1209,9 @@ struct Pcsx2Config
|
||||
static constexpr u32 MAXIMUM_NOTIFICATION_DURATION = 30;
|
||||
static constexpr u32 DEFAULT_NOTIFICATION_DURATION = 5;
|
||||
static constexpr u32 DEFAULT_LEADERBOARD_DURATION = 10;
|
||||
static constexpr const char* DEFAULT_INFO_SOUND_NAME = "sounds/achievements/message.wav";
|
||||
static constexpr const char* DEFAULT_UNLOCK_SOUND_NAME = "sounds/achievements/unlock.wav";
|
||||
static constexpr const char* DEFAULT_LBSUBMIT_SOUND_NAME = "sounds/achievements/lbsubmit.wav";
|
||||
|
||||
BITFIELD32()
|
||||
bool
|
||||
@@ -1220,12 +1223,19 @@ struct Pcsx2Config
|
||||
Notifications : 1,
|
||||
LeaderboardNotifications : 1,
|
||||
SoundEffects : 1,
|
||||
InfoSound : 1,
|
||||
UnlockSound : 1,
|
||||
LBSubmitSound : 1,
|
||||
Overlays : 1;
|
||||
BITFIELD_END
|
||||
|
||||
u32 NotificationsDuration = DEFAULT_NOTIFICATION_DURATION;
|
||||
u32 LeaderboardsDuration = DEFAULT_LEADERBOARD_DURATION;
|
||||
|
||||
std::string InfoSoundName;
|
||||
std::string UnlockSoundName;
|
||||
std::string LBSubmitSoundName;
|
||||
|
||||
AchievementsOptions();
|
||||
void LoadSave(SettingsWrapper& wrap);
|
||||
|
||||
|
||||
@@ -172,7 +172,13 @@ bool CBreakPoints::IsTempBreakPoint(BreakPointCpu cpu, u32 addr)
|
||||
return bp != INVALID_BREAKPOINT;
|
||||
}
|
||||
|
||||
void CBreakPoints::AddBreakPoint(BreakPointCpu cpu, u32 addr, bool temp, bool enabled)
|
||||
bool CBreakPoints::IsSteppingBreakPoint(BreakPointCpu cpu, u32 addr)
|
||||
{
|
||||
const size_t bp = FindBreakpoint(cpu, addr, true, true);
|
||||
return bp != INVALID_BREAKPOINT && breakPoints_[bp].stepping;
|
||||
}
|
||||
|
||||
void CBreakPoints::AddBreakPoint(BreakPointCpu cpu, u32 addr, bool temp, bool enabled, bool stepping)
|
||||
{
|
||||
const size_t bp = FindBreakpoint(cpu, addr, true, temp);
|
||||
if (bp == INVALID_BREAKPOINT)
|
||||
@@ -180,6 +186,7 @@ void CBreakPoints::AddBreakPoint(BreakPointCpu cpu, u32 addr, bool temp, bool en
|
||||
BreakPoint pt;
|
||||
pt.enabled = enabled;
|
||||
pt.temporary = temp;
|
||||
pt.stepping = stepping;
|
||||
pt.addr = addr;
|
||||
pt.cpu = cpu;
|
||||
|
||||
|
||||
@@ -12,15 +12,10 @@
|
||||
|
||||
struct BreakPointCond
|
||||
{
|
||||
DebugInterface* debug;
|
||||
DebugInterface* debug = nullptr;
|
||||
PostfixExpression expression;
|
||||
std::string expressionString;
|
||||
|
||||
BreakPointCond()
|
||||
: debug(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
u32 Evaluate()
|
||||
{
|
||||
u64 result;
|
||||
@@ -33,17 +28,10 @@ struct BreakPointCond
|
||||
|
||||
struct BreakPoint
|
||||
{
|
||||
BreakPoint()
|
||||
: addr(0)
|
||||
, enabled(false)
|
||||
, temporary(false)
|
||||
, hasCond(false)
|
||||
{
|
||||
}
|
||||
|
||||
u32 addr;
|
||||
bool enabled;
|
||||
bool temporary;
|
||||
u32 addr = 0;
|
||||
bool enabled = false;
|
||||
bool temporary = false;
|
||||
bool stepping = false;
|
||||
|
||||
bool hasCond;
|
||||
BreakPointCond cond;
|
||||
@@ -120,7 +108,8 @@ public:
|
||||
static bool IsAddressBreakPoint(BreakPointCpu cpu, u32 addr);
|
||||
static bool IsAddressBreakPoint(BreakPointCpu cpu, u32 addr, bool* enabled);
|
||||
static bool IsTempBreakPoint(BreakPointCpu cpu, u32 addr);
|
||||
static void AddBreakPoint(BreakPointCpu cpu, u32 addr, bool temp = false, bool enabled = true);
|
||||
static bool IsSteppingBreakPoint(BreakPointCpu cpu, u32 addr);
|
||||
static void AddBreakPoint(BreakPointCpu cpu, u32 addr, bool temp = false, bool enabled = true, bool stepping = false);
|
||||
static void RemoveBreakPoint(BreakPointCpu cpu, u32 addr);
|
||||
static void ChangeBreakPoint(BreakPointCpu cpu, u32 addr, bool enable);
|
||||
static void ClearAllBreakPoints();
|
||||
|
||||
@@ -3929,8 +3929,9 @@ GSState::TextureMinMaxResult GSState::GetTextureMinMax(GIFRegTEX0 TEX0, GIFRegCL
|
||||
|
||||
// Need to make sure we don't oversample, this can cause trouble in grabbing textures.
|
||||
// This may be inaccurate depending on the draw, but adding 1 all the time is wrong too.
|
||||
const int inclusive_x_req = ((m_vt.m_primclass < GS_TRIANGLE_CLASS) || (grad.x < 1.0f || (grad.x == 1.0f && m_vt.m_max.p.x != floor(m_vt.m_max.p.x)))) ? 1 : 0;
|
||||
const int inclusive_y_req = ((m_vt.m_primclass < GS_TRIANGLE_CLASS) || (grad.y < 1.0f || (grad.y == 1.0f && m_vt.m_max.p.y != floor(m_vt.m_max.p.y)))) ? 1 : 0;
|
||||
// FIXME: It breaks sw renderer so let's still use 1 for SW mode for now.
|
||||
const int inclusive_x_req = GSIsHardwareRenderer() ? (((m_vt.m_primclass < GS_TRIANGLE_CLASS) || (grad.x < 1.0f || (grad.x == 1.0f && m_vt.m_max.p.x != floor(m_vt.m_max.p.x)))) ? 1 : 0) : 1;
|
||||
const int inclusive_y_req = GSIsHardwareRenderer() ? (((m_vt.m_primclass < GS_TRIANGLE_CLASS) || (grad.y < 1.0f || (grad.y == 1.0f && m_vt.m_max.p.y != floor(m_vt.m_max.p.y)))) ? 1 : 0) : 1;
|
||||
|
||||
// Roughly cut out the min/max of the read (Clamp)
|
||||
switch (wms)
|
||||
|
||||
@@ -212,7 +212,7 @@ bool GSHwHack::GSC_Tekken5(GSRendererHW& r, int& skip)
|
||||
{
|
||||
if (skip == 0)
|
||||
{
|
||||
if (r.IsPossibleChannelShuffle() && (RTBP0 & 31))
|
||||
if (r.IsPossibleChannelShuffle() && !(RTBP0 & 31))
|
||||
{
|
||||
GSVertex* v = &r.m_vertex.buff[0];
|
||||
|
||||
|
||||
@@ -4259,14 +4259,7 @@ void GSRendererHW::EmulateBlending(int rt_alpha_min, int rt_alpha_max, const boo
|
||||
m_conf.ps.blend_d = 2;
|
||||
}
|
||||
}
|
||||
// When AA1 is enabled and Alpha Blending is disabled, alpha blending done with coverage instead of alpha.
|
||||
// We use a COV value of 128 (full coverage) in triangles (except the edge geometry, which we can't do easily).
|
||||
if (IsCoverageAlpha())
|
||||
{
|
||||
m_conf.ps.fixed_one_a = 1;
|
||||
m_conf.ps.blend_c = 0;
|
||||
}
|
||||
else if (m_conf.ps.blend_c == 1)
|
||||
if (m_conf.ps.blend_c == 1)
|
||||
{
|
||||
// When both rt alpha min and max are equal replace Ad with Af, easier to manage.
|
||||
if (rt_alpha_min == rt_alpha_max)
|
||||
@@ -6169,6 +6162,9 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
||||
new_scale_rt_alpha = rt->m_rt_alpha_scale;
|
||||
}
|
||||
|
||||
// AA1: Set alpha source to coverage 128 when there is no alpha blending.
|
||||
m_conf.ps.fixed_one_a = IsCoverageAlpha();
|
||||
|
||||
if ((!IsOpaque() || m_context->ALPHA.IsBlack()) && rt && ((m_conf.colormask.wrgba & 0x7) || (m_texture_shuffle && !m_copy_16bit_to_target_shuffle && !m_same_group_texture_shuffle)))
|
||||
{
|
||||
EmulateBlending(blend_alpha_min, blend_alpha_max, DATE, DATE_PRIMID, DATE_BARRIER, rt, can_scale_rt_alpha, new_scale_rt_alpha);
|
||||
@@ -6177,7 +6173,6 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
||||
{
|
||||
m_conf.blend = {}; // No blending please
|
||||
m_conf.ps.no_color1 = true;
|
||||
m_conf.ps.fixed_one_a = IsCoverageAlpha();
|
||||
|
||||
if (can_scale_rt_alpha && !new_scale_rt_alpha && m_conf.colormask.wa)
|
||||
{
|
||||
@@ -6240,23 +6235,32 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
|
||||
// Blending might be off, ensure it's enabled.
|
||||
// We write the alpha pass/fail to SRC1_ALPHA, which is used to update A.
|
||||
m_conf.ps.afail = AFAIL_RGB_ONLY;
|
||||
m_conf.ps.no_color1 = false;
|
||||
if (!m_conf.blend.enable)
|
||||
if ((features.framebuffer_fetch && m_conf.require_one_barrier) || m_conf.require_full_barrier)
|
||||
{
|
||||
m_conf.blend = GSHWDrawConfig::BlendState(true, GSDevice::CONST_ONE, GSDevice::CONST_ZERO,
|
||||
GSDevice::OP_ADD, GSDevice::SRC1_ALPHA, GSDevice::INV_SRC1_ALPHA, false, 0);
|
||||
// We're reading the rt anyways, use it for AFAIL
|
||||
// This ensures we don't attempt to use fbfetch + blend, which breaks Intel GPUs on Metal
|
||||
// Setting afail to RGB_ONLY without enabling color1 will enable this mode in the shader, so nothing more to do here.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_conf.blend_multi_pass.enable)
|
||||
m_conf.ps.no_color1 = false;
|
||||
if (!m_conf.blend.enable)
|
||||
{
|
||||
m_conf.blend_multi_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend_multi_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
m_conf.blend = GSHWDrawConfig::BlendState(true, GSDevice::CONST_ONE, GSDevice::CONST_ZERO,
|
||||
GSDevice::OP_ADD, GSDevice::SRC1_ALPHA, GSDevice::INV_SRC1_ALPHA, false, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_conf.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
if (m_conf.blend_multi_pass.enable)
|
||||
{
|
||||
m_conf.blend_multi_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend_multi_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_conf.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
|
||||
m_conf.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +219,7 @@ public:
|
||||
MRCOwned<id<MTLFence>> m_draw_sync_fence;
|
||||
MRCOwned<MTLFunctionConstantValues*> m_fn_constants;
|
||||
MRCOwned<MTLVertexDescriptor*> m_hw_vertex;
|
||||
MTLResourceOptions m_resource_options_shared_wc;
|
||||
|
||||
// Previously in MetalHostDisplay.
|
||||
MRCOwned<NSView*> m_view;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "common/Console.h"
|
||||
#include "common/HostSys.h"
|
||||
|
||||
#include "cpuinfo.h"
|
||||
#include "imgui.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -90,6 +91,12 @@ GSDeviceMTL::GSDeviceMTL()
|
||||
, m_dev(nil)
|
||||
{
|
||||
m_backref->second = this;
|
||||
m_resource_options_shared_wc = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
|
||||
#ifdef _M_X86
|
||||
// WC memory doesn't work properly on AMD hackintoshes, and ends up being horribly slow even when only writing
|
||||
if (cpuinfo_get_core(0)->vendor == cpuinfo_vendor_amd)
|
||||
m_resource_options_shared_wc = MTLResourceStorageModeShared;
|
||||
#endif
|
||||
}
|
||||
|
||||
GSDeviceMTL::~GSDeviceMTL()
|
||||
@@ -107,7 +114,7 @@ GSDeviceMTL::Map GSDeviceMTL::Allocate(UploadBuffer& buffer, size_t amt)
|
||||
size_t newsize = std::max<size_t>(buffer.usage.Size() * 2, 4096);
|
||||
while (newsize < amt)
|
||||
newsize *= 2;
|
||||
MTLResourceOptions options = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
|
||||
MTLResourceOptions options = m_resource_options_shared_wc;
|
||||
buffer.mtlbuffer = MRCTransfer([m_dev.dev newBufferWithLength:newsize options:options]);
|
||||
pxAssertRel(buffer.mtlbuffer, "Failed to allocate MTLBuffer (out of memory?)");
|
||||
buffer.buffer = [buffer.mtlbuffer contents];
|
||||
@@ -148,7 +155,7 @@ GSDeviceMTL::Map GSDeviceMTL::Allocate(BufferPair& buffer, size_t amt)
|
||||
size_t newsize = std::max<size_t>(buffer.usage.Size() * 2, 4096);
|
||||
while (newsize < amt)
|
||||
newsize *= 2;
|
||||
MTLResourceOptions options = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
|
||||
MTLResourceOptions options = m_resource_options_shared_wc;
|
||||
buffer.cpubuffer = MRCTransfer([m_dev.dev newBufferWithLength:newsize options:options]);
|
||||
pxAssertRel(buffer.cpubuffer, "Failed to allocate MTLBuffer (out of memory?)");
|
||||
buffer.buffer = [buffer.cpubuffer contents];
|
||||
@@ -1277,7 +1284,7 @@ void GSDeviceMTL::UpdateTexture(id<MTLTexture> texture, u32 x, u32 y, u32 width,
|
||||
id<MTLCommandBuffer> cmdbuf = [m_queue commandBuffer];
|
||||
id<MTLBlitCommandEncoder> enc = [cmdbuf blitCommandEncoder];
|
||||
size_t bytes = data_stride * height;
|
||||
MRCOwned<id<MTLBuffer>> buf = MRCTransfer([m_dev.dev newBufferWithLength:bytes options:MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined]);
|
||||
MRCOwned<id<MTLBuffer>> buf = MRCTransfer([m_dev.dev newBufferWithLength:bytes options:m_resource_options_shared_wc]);
|
||||
memcpy([buf contents], data, bytes);
|
||||
[enc copyFromBuffer:buf
|
||||
sourceOffset:0
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user