mirror of
https://github.com/PCSX2/pcsx2.git
synced 2026-01-31 01:15:24 +01:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46221a8500 | ||
|
|
8b0e61af8c | ||
|
|
2b0a78811a | ||
|
|
5798cd7176 | ||
|
|
5c25637381 | ||
|
|
8316228771 | ||
|
|
695250155e | ||
|
|
545e606c11 | ||
|
|
52771fdb17 | ||
|
|
de631a1052 | ||
|
|
605398db67 | ||
|
|
407c989860 | ||
|
|
9b4b112a97 | ||
|
|
865b75bcbb | ||
|
|
795b0813cc | ||
|
|
3e1f2b8b9d | ||
|
|
1f0d6f0ac7 | ||
|
|
4ab4f4a67c | ||
|
|
5dbdd5e5e4 | ||
|
|
f03cddf674 | ||
|
|
726e908a49 | ||
|
|
043cd673b8 | ||
|
|
f84173e5cc | ||
|
|
bef7ae7f6c | ||
|
|
33aed95a6c |
4
.github/workflows/linux_build_matrix.yml
vendored
4
.github/workflows/linux_build_matrix.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
uses: ./.github/workflows/linux_build_qt.yml
|
||||
with:
|
||||
jobName: "AppImage Build"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage-sse4"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-appimage"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
buildAppImage: true
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
uses: ./.github/workflows/linux_build_flatpak.yml
|
||||
with:
|
||||
jobName: "Flatpak Build"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak-sse4"
|
||||
artifactPrefixName: "PCSX2-linux-Qt-x64-flatpak"
|
||||
compiler: clang
|
||||
cmakeflags: ""
|
||||
publish: false
|
||||
|
||||
@@ -19,8 +19,8 @@ LIBJPEG=9f
|
||||
LIBPNG=1.6.45
|
||||
LIBWEBP=1.5.0
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
SDL=SDL2-2.30.11
|
||||
QT=6.8.1
|
||||
SDL=SDL2-2.30.12
|
||||
QT=6.8.2
|
||||
ZSTD=1.5.6
|
||||
|
||||
SHADERC=2024.1
|
||||
@@ -37,14 +37,14 @@ fd6f417fe9e3a071cf1424a5152d926a34c4a3c5070745470be6cf12a404ed79 $LIBBACKTRACE.
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c libwebp-$LIBWEBP.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f $SDL.tar.gz
|
||||
ac356ea55e8b9dd0b2d1fa27da40ef7e238267ccf9324704850d5d47375b48ea $SDL.tar.gz
|
||||
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
||||
40b14562ef3bd779bc0e0418ea2ae08fa28235f8ea6e8c0cb3bce1d6ad58dcaf qtbase-everywhere-src-$QT.tar.xz
|
||||
138cc2909aa98f5ff7283e36eb3936eb5e625d3ca3b4febae2ca21d8903dd237 qtimageformats-everywhere-src-$QT.tar.xz
|
||||
3d0de73596e36b2daa7c48d77c4426bb091752856912fba720215f756c560dd0 qtsvg-everywhere-src-$QT.tar.xz
|
||||
9d43d409be08b8681a0155a9c65114b69c9a3fc11aef6487bb7fdc5b283c432d qttools-everywhere-src-$QT.tar.xz
|
||||
635a6093e99152243b807de51077485ceadd4786d4acb135b9340b2303035a4a qttranslations-everywhere-src-$QT.tar.xz
|
||||
2226fbde4e2ddd12f8bf4b239c8f38fd706a54e789e63467dfddc77129eca203 qtwayland-everywhere-src-$QT.tar.xz
|
||||
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
|
||||
eb3b5f0c16313d34f208d90c2fa1e588a23283eed63b101edd5422be6165d528 shaderc-$SHADERC.tar.gz
|
||||
aa27e4454ce631c5a17924ce0624eac736da19fc6f5a2ab15a6c58da7b36950f shaderc-glslang-$SHADERC_GLSLANG.tar.gz
|
||||
5d866ce34a4b6908e262e5ebfffc0a5e11dd411640b5f24c85a80ad44c0d4697 shaderc-spirv-headers-$SHADERC_SPIRVHEADERS.tar.gz
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
"sources": [
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://libsdl.org/release/SDL2-2.30.11.tar.gz",
|
||||
"sha256": "8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f"
|
||||
"url": "https://libsdl.org/release/SDL2-2.30.12.tar.gz",
|
||||
"sha256": "ac356ea55e8b9dd0b2d1fa27da40ef7e238267ccf9324704850d5d47375b48ea"
|
||||
}
|
||||
],
|
||||
"cleanup": [
|
||||
|
||||
@@ -40,7 +40,7 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=10.0.1
|
||||
SDL=SDL2-2.30.11
|
||||
SDL=SDL2-2.30.12
|
||||
ZSTD=1.5.6
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
LIBPNG=1.6.45
|
||||
@@ -76,7 +76,7 @@ CMAKE_ARCH_UNIVERSAL=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 harfbuzz-$HARFBUZZ.tar.gz
|
||||
8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f $SDL.tar.gz
|
||||
ac356ea55e8b9dd0b2d1fa27da40ef7e238267ccf9324704850d5d47375b48ea $SDL.tar.gz
|
||||
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
|
||||
@@ -22,7 +22,7 @@ fi
|
||||
|
||||
FREETYPE=2.13.3
|
||||
HARFBUZZ=10.0.1
|
||||
SDL=SDL2-2.30.11
|
||||
SDL=SDL2-2.30.12
|
||||
ZSTD=1.5.6
|
||||
LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
LIBPNG=1.6.45
|
||||
@@ -56,7 +56,7 @@ CMAKE_COMMON=(
|
||||
cat > SHASUMS <<EOF
|
||||
0550350666d427c74daeb85d5ac7bb353acba5f76956395995311a9c6f063289 freetype-$FREETYPE.tar.xz
|
||||
e7358ea86fe10fb9261931af6f010d4358dac64f7074420ca9bc94aae2bdd542 harfbuzz-$HARFBUZZ.tar.gz
|
||||
8b8d4aef2038533da814965220f88f77d60dfa0f32685f80ead65e501337da7f $SDL.tar.gz
|
||||
ac356ea55e8b9dd0b2d1fa27da40ef7e238267ccf9324704850d5d47375b48ea $SDL.tar.gz
|
||||
8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1 zstd-$ZSTD.tar.gz
|
||||
0728800155f3ed0a0c87e03addbd30ecbe374f7b080678bbca1506051d50dec3 $LZ4.tar.gz
|
||||
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370 libpng-$LIBPNG.tar.xz
|
||||
|
||||
@@ -47,9 +47,9 @@ set HARFBUZZ=10.0.1
|
||||
set LIBJPEG=9f
|
||||
set LIBPNG=1645
|
||||
set LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
set QT=6.8.1
|
||||
set QT=6.8.2
|
||||
set QTMINOR=6.8
|
||||
set SDL=SDL2-2.30.11
|
||||
set SDL=SDL2-2.30.12
|
||||
set WEBP=1.5.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
@@ -66,12 +66,12 @@ call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lp
|
||||
call :downloadfile "jpegsr%LIBJPEG%.zip" https://ijg.org/files/jpegsr%LIBJPEG%.zip 6255da8c89e09d694e6800688c76145eb6870a76ac0d36c74fccd61b3940aafa || 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" a0b3e7ac5f708042683ff0f22e069bdf75563540c615f9854ecc9bc8913e2488 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" e22d997bd15b795a176c8da62c8c1da0a674eb534e02f7c01ca507bf11bce0c3 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 247a0a58039275a5a4fb499a600a90f66dc6e00321bb6f86a9b8d8020344d853 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 57bd332e5550ff70a852560c591b786b6ba587c5e41cb5ef91038d82db137ab9 || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" c65a89140f5d68137ffec67d631ec97002fb37077d9b4eb4ee45cbec39b1c38a || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 30a8e7773e1f274557e049a97f158b808f344247da03ae5240e4956c81d51cd5 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" aa2808d0f2dc6b383c6689bf6d166e2de62db4d58be989e4b052acb31df0fba3 || 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 "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" 3b1c3b46e416d36931efd34663122d7f51b550c87f74de2d38249516fe7d8be5 || goto error
|
||||
call :downloadfile "zstd-fd5f8106a58601a963ee816e6a57aa7c61fafc53.patch" https://github.com/facebook/zstd/commit/fd5f8106a58601a963ee816e6a57aa7c61fafc53.patch 8df152f4969b308546306c074628de761f0b80265de7de534e3822fab22d7535 || goto error
|
||||
|
||||
@@ -45,9 +45,9 @@ set HARFBUZZ=10.0.1
|
||||
set LIBJPEG=9f
|
||||
set LIBPNG=1645
|
||||
set LZ4=b8fd2d15309dd4e605070bd4486e26b6ef814e29
|
||||
set QT=6.8.1
|
||||
set QT=6.8.2
|
||||
set QTMINOR=6.8
|
||||
set SDL=SDL2-2.30.11
|
||||
set SDL=SDL2-2.30.12
|
||||
set WEBP=1.5.0
|
||||
set ZLIB=1.3.1
|
||||
set ZLIBSHORT=131
|
||||
@@ -64,12 +64,12 @@ call :downloadfile "lpng%LIBPNG%.zip" https://download.sourceforge.net/libpng/lp
|
||||
call :downloadfile "jpegsr%LIBJPEG%.zip" https://ijg.org/files/jpegsr%LIBJPEG%.zip 6255da8c89e09d694e6800688c76145eb6870a76ac0d36c74fccd61b3940aafa || 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" a0b3e7ac5f708042683ff0f22e069bdf75563540c615f9854ecc9bc8913e2488 || goto error
|
||||
call :downloadfile "qtbase-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtbase-everywhere-src-%QT%.zip" e22d997bd15b795a176c8da62c8c1da0a674eb534e02f7c01ca507bf11bce0c3 || goto error
|
||||
call :downloadfile "qtimageformats-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtimageformats-everywhere-src-%QT%.zip" 247a0a58039275a5a4fb499a600a90f66dc6e00321bb6f86a9b8d8020344d853 || goto error
|
||||
call :downloadfile "qtsvg-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qtsvg-everywhere-src-%QT%.zip" 57bd332e5550ff70a852560c591b786b6ba587c5e41cb5ef91038d82db137ab9 || goto error
|
||||
call :downloadfile "qttools-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttools-everywhere-src-%QT%.zip" c65a89140f5d68137ffec67d631ec97002fb37077d9b4eb4ee45cbec39b1c38a || goto error
|
||||
call :downloadfile "qttranslations-everywhere-src-%QT%.zip" "https://download.qt.io/official_releases/qt/%QTMINOR%/%QT%/submodules/qttranslations-everywhere-src-%QT%.zip" 30a8e7773e1f274557e049a97f158b808f344247da03ae5240e4956c81d51cd5 || goto error
|
||||
call :downloadfile "%SDL%.zip" "https://libsdl.org/release/%SDL%.zip" aa2808d0f2dc6b383c6689bf6d166e2de62db4d58be989e4b052acb31df0fba3 || 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 "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" 3b1c3b46e416d36931efd34663122d7f51b550c87f74de2d38249516fe7d8be5 || goto error
|
||||
call :downloadfile "zstd-fd5f8106a58601a963ee816e6a57aa7c61fafc53.patch" https://github.com/facebook/zstd/commit/fd5f8106a58601a963ee816e6a57aa7c61fafc53.patch 8df152f4969b308546306c074628de761f0b80265de7de534e3822fab22d7535 || goto error
|
||||
|
||||
84
3rdparty/imgui/include/imgui.h
vendored
84
3rdparty/imgui/include/imgui.h
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.7
|
||||
// dear imgui, v1.91.8
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
// Library Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||
#define IMGUI_VERSION "1.91.7"
|
||||
#define IMGUI_VERSION_NUM 19170
|
||||
#define IMGUI_VERSION "1.91.8"
|
||||
#define IMGUI_VERSION_NUM 19180
|
||||
#define IMGUI_HAS_TABLE
|
||||
|
||||
/*
|
||||
@@ -158,7 +158,7 @@ typedef unsigned int ImU32; // 32-bit unsigned integer (often used to st
|
||||
typedef signed long long ImS64; // 64-bit signed integer
|
||||
typedef unsigned long long ImU64; // 64-bit unsigned integer
|
||||
|
||||
// Forward declarations
|
||||
// Forward declarations: ImDrawList, ImFontAtlas layer
|
||||
struct ImDrawChannel; // Temporary storage to output draw commands out of order, used by ImDrawListSplitter and ImDrawList::ChannelsSplit()
|
||||
struct ImDrawCmd; // A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call, unless it is a callback)
|
||||
struct ImDrawData; // All draw command lists required to render the frame + pos/size coordinates to use for the projection matrix.
|
||||
@@ -173,6 +173,8 @@ struct ImFontConfig; // Configuration data when adding a font or
|
||||
struct ImFontGlyph; // A single font glyph (code point + coordinates within in ImFontAtlas + offset)
|
||||
struct ImFontGlyphRangesBuilder; // Helper to build glyph ranges from text/string data
|
||||
struct ImColor; // Helper functions to create a color that can be converted to either u32 or float4 (*OBSOLETE* please avoid using)
|
||||
|
||||
// Forward declarations: ImGui layer
|
||||
struct ImGuiContext; // Dear ImGui context (opaque structure, unless including imgui_internal.h)
|
||||
struct ImGuiIO; // Main configuration and I/O between your application and ImGui (also see: ImGuiPlatformIO)
|
||||
struct ImGuiInputTextCallbackData; // Shared state of InputText() when using custom ImGuiInputTextCallback (rare/advanced use)
|
||||
@@ -1009,6 +1011,7 @@ namespace ImGui
|
||||
IMGUI_API bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false); // did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1.
|
||||
IMGUI_API bool IsMouseReleased(ImGuiMouseButton button); // did mouse button released? (went from Down to !Down)
|
||||
IMGUI_API bool IsMouseDoubleClicked(ImGuiMouseButton button); // did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true)
|
||||
IMGUI_API bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay); // delayed mouse release (use very sparingly!). Generally used with 'delay >= io.MouseDoubleClickTime' + combined with a 'io.MouseClickedLastCount==1' test. This is a very rarely used UI idiom, but some apps use this: e.g. MS Explorer single click on an icon to rename.
|
||||
IMGUI_API int GetMouseClickedCount(ImGuiMouseButton button); // return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
|
||||
IMGUI_API bool IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip = true);// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
|
||||
IMGUI_API bool IsMousePosValid(const ImVec2* mouse_pos = NULL); // by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available
|
||||
@@ -1751,10 +1754,16 @@ enum ImGuiColorEditFlags_
|
||||
ImGuiColorEditFlags_NoDragDrop = 1 << 9, // // ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.
|
||||
ImGuiColorEditFlags_NoBorder = 1 << 10, // // ColorButton: disable border (which is enforced by default)
|
||||
|
||||
// Alpha preview
|
||||
// - Prior to 1.91.8 (2025/01/21): alpha was made opaque in the preview by default using old name ImGuiColorEditFlags_AlphaPreview.
|
||||
// - We now display the preview as transparent by default. You can use ImGuiColorEditFlags_AlphaOpaque to use old behavior.
|
||||
// - The new flags may be combined better and allow finer controls.
|
||||
ImGuiColorEditFlags_AlphaOpaque = 1 << 11, // // ColorEdit, ColorPicker, ColorButton: disable alpha in the preview,. Contrary to _NoAlpha it may still be edited when calling ColorEdit4()/ColorPicker4(). For ColorButton() this does the same as _NoAlpha.
|
||||
ImGuiColorEditFlags_AlphaNoBg = 1 << 12, // // ColorEdit, ColorPicker, ColorButton: disable rendering a checkerboard background behind transparent color.
|
||||
ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 13, // // ColorEdit, ColorPicker, ColorButton: display half opaque / half transparent preview.
|
||||
|
||||
// User Options (right-click on widget to change some of them).
|
||||
ImGuiColorEditFlags_AlphaBar = 1 << 16, // // ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
|
||||
ImGuiColorEditFlags_AlphaPreview = 1 << 17, // // ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque.
|
||||
ImGuiColorEditFlags_AlphaPreviewHalf= 1 << 18, // // ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque.
|
||||
ImGuiColorEditFlags_HDR = 1 << 19, // // (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).
|
||||
ImGuiColorEditFlags_DisplayRGB = 1 << 20, // [Display] // ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.
|
||||
ImGuiColorEditFlags_DisplayHSV = 1 << 21, // [Display] // "
|
||||
@@ -1771,12 +1780,16 @@ enum ImGuiColorEditFlags_
|
||||
ImGuiColorEditFlags_DefaultOptions_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar,
|
||||
|
||||
// [Internal] Masks
|
||||
ImGuiColorEditFlags_AlphaMask_ = ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaOpaque | ImGuiColorEditFlags_AlphaNoBg | ImGuiColorEditFlags_AlphaPreviewHalf,
|
||||
ImGuiColorEditFlags_DisplayMask_ = ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_DisplayHSV | ImGuiColorEditFlags_DisplayHex,
|
||||
ImGuiColorEditFlags_DataTypeMask_ = ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_Float,
|
||||
ImGuiColorEditFlags_PickerMask_ = ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_PickerHueBar,
|
||||
ImGuiColorEditFlags_InputMask_ = ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_InputHSV,
|
||||
|
||||
// Obsolete names
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
ImGuiColorEditFlags_AlphaPreview = 0, // [Removed in 1.91.8] This is the default now. Will display a checkerboard unless ImGuiColorEditFlags_AlphaNoBg is set.
|
||||
#endif
|
||||
//ImGuiColorEditFlags_RGB = ImGuiColorEditFlags_DisplayRGB, ImGuiColorEditFlags_HSV = ImGuiColorEditFlags_DisplayHSV, ImGuiColorEditFlags_HEX = ImGuiColorEditFlags_DisplayHex // [renamed in 1.69]
|
||||
};
|
||||
|
||||
@@ -2403,6 +2416,7 @@ struct ImGuiIO
|
||||
ImU16 MouseClickedCount[5]; // == 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down
|
||||
ImU16 MouseClickedLastCount[5]; // Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.
|
||||
bool MouseReleased[5]; // Mouse button went from Down to !Down
|
||||
double MouseReleasedTime[5]; // Time of last released (rarely used! but useful to handle delayed single-click when trying to disambiguate them from double-click).
|
||||
bool MouseDownOwned[5]; // Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
|
||||
bool MouseDownOwnedUnlessPopupClose[5]; // Track if button was clicked inside a dear imgui window.
|
||||
bool MouseWheelRequestAxisSwap; // On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event. On a Mac system this is already enforced by the system.
|
||||
@@ -2923,7 +2937,7 @@ struct ImGuiSelectionExternalStorage
|
||||
|
||||
// The maximum line width to bake anti-aliased textures for. Build atlas with ImFontAtlasFlags_NoBakedLines to disable baking.
|
||||
#ifndef IM_DRAWLIST_TEX_LINES_WIDTH_MAX
|
||||
#define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (63)
|
||||
#define IM_DRAWLIST_TEX_LINES_WIDTH_MAX (32)
|
||||
#endif
|
||||
|
||||
// ImDrawCallback: Draw callbacks for advanced uses [configurable type: override in imconfig.h]
|
||||
@@ -2997,7 +3011,6 @@ struct ImDrawChannel
|
||||
ImVector<ImDrawIdx> _IdxBuffer;
|
||||
};
|
||||
|
||||
|
||||
// Split/Merge functions are used to split the draw list into different layers which can be drawn into out of order.
|
||||
// This is used by the Columns/Tables API, so items of each column can be batched together in a same draw call.
|
||||
struct ImDrawListSplitter
|
||||
@@ -3232,26 +3245,27 @@ struct ImDrawData
|
||||
// [SECTION] Font API (ImFontConfig, ImFontGlyph, ImFontAtlasFlags, ImFontAtlas, ImFontGlyphRangesBuilder, ImFont)
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// A font input/source (we may rename this to ImFontSource in the future)
|
||||
struct ImFontConfig
|
||||
{
|
||||
void* FontData; // // TTF/OTF data
|
||||
int FontDataSize; // // TTF/OTF data size
|
||||
bool FontDataOwnedByAtlas; // true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
|
||||
int FontNo; // 0 // Index of font within TTF/OTF file
|
||||
float SizePixels; // // Size in pixels for rasterizer (more or less maps to the resulting font height).
|
||||
int OversampleH; // 2 // Rasterize at higher quality for sub-pixel positioning. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
|
||||
int OversampleV; // 1 // Rasterize at higher quality for sub-pixel positioning. This is not really useful as we don't use sub-pixel positions on the Y axis.
|
||||
bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
|
||||
bool PixelSnapH; // false // Align every glyph AdvanceX to pixel boundaries. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.
|
||||
int FontNo; // 0 // Index of font within TTF/OTF file
|
||||
int OversampleH; // 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
|
||||
int OversampleV; // 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really useful as we don't use sub-pixel positions on the Y axis.
|
||||
float SizePixels; // // Size in pixels for rasterizer (more or less maps to the resulting font height).
|
||||
ImVec2 GlyphExtraSpacing; // 0, 0 // Extra spacing (in pixels) between glyphs when rendered: essentially add to glyph->AdvanceX. Only X axis is supported for now.
|
||||
ImVec2 GlyphOffset; // 0, 0 // Offset all glyphs from this font input.
|
||||
const ImWchar* GlyphRanges; // NULL // THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).
|
||||
float GlyphMinAdvanceX; // 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce mono-space font
|
||||
float GlyphMaxAdvanceX; // FLT_MAX // Maximum AdvanceX for glyphs
|
||||
bool MergeMode; // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
|
||||
unsigned int FontBuilderFlags; // 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if unsure.
|
||||
float RasterizerMultiply; // 1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. This is a silly thing we may remove in the future.
|
||||
float RasterizerDensity; // 1.0f // DPI scale for rasterization, not altering other font metrics: make it easy to swap between e.g. a 100% and a 400% fonts for a zooming display. IMPORTANT: If you increase this it is expected that you increase font scale accordingly, otherwise quality may look lowered.
|
||||
ImWchar EllipsisChar; // 0 // Explicitly specify unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
|
||||
ImWchar EllipsisChar; // 0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
|
||||
|
||||
// [Internal]
|
||||
char Name[40]; // Name (strictly to ease debugging)
|
||||
@@ -3341,8 +3355,8 @@ struct ImFontAtlas
|
||||
IMGUI_API ImFont* AddFontFromMemoryCompressedTTF(const void* compressed_font_data, int compressed_font_data_size, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_font_data' still owned by caller. Compress with binary_to_compressed_c.cpp.
|
||||
IMGUI_API ImFont* AddFontFromMemoryCompressedBase85TTF(const char* compressed_font_data_base85, float size_pixels, const ImFontConfig* font_cfg = NULL, const ImWchar* glyph_ranges = NULL); // 'compressed_font_data_base85' still owned by caller. Compress with binary_to_compressed_c.cpp with -base85 parameter.
|
||||
IMGUI_API void ClearInputData(); // Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts.
|
||||
IMGUI_API void ClearFonts(); // Clear input+output font data (same as ClearInputData() + glyphs storage, UV coordinates).
|
||||
IMGUI_API void ClearTexData(); // Clear output texture data (CPU side). Saves RAM once the texture has been copied to graphics memory.
|
||||
IMGUI_API void ClearFonts(); // Clear output font data (glyphs storage, UV coordinates).
|
||||
IMGUI_API void Clear(); // Clear all input and output.
|
||||
|
||||
// Build atlas, retrieve pixel data.
|
||||
@@ -3375,7 +3389,7 @@ struct ImFontAtlas
|
||||
IMGUI_API const ImWchar* GetGlyphRangesVietnamese(); // Default + Vietnamese characters
|
||||
|
||||
//-------------------------------------------
|
||||
// [BETA] Custom Rectangles/Glyphs API
|
||||
// [ALPHA] Custom Rectangles/Glyphs API
|
||||
//-------------------------------------------
|
||||
|
||||
// You can request arbitrary rectangles to be packed into the atlas, for your own purposes.
|
||||
@@ -3401,11 +3415,11 @@ struct ImFontAtlas
|
||||
ImTextureID TexID; // User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
|
||||
int TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
|
||||
int TexGlyphPadding; // FIXME: Should be called "TexPackPadding". Padding between glyphs within texture in pixels. Defaults to 1. If your rendering method doesn't rely on bilinear filtering you may set this to 0 (will also need to set AntiAliasedLinesUseTex = false).
|
||||
bool Locked; // Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
|
||||
void* UserData; // Store your own atlas related user-data (if e.g. you have multiple font atlas).
|
||||
|
||||
// [Internal]
|
||||
// NB: Access texture data via GetTexData*() calls! Which will setup a default font for you.
|
||||
bool Locked; // Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
|
||||
bool TexReady; // Set when texture was built matching current font input
|
||||
bool TexPixelsUseColors; // Tell whether our texture data is known to use colors (rather than just alpha channel), in order to help backend select a format.
|
||||
unsigned char* TexPixelsAlpha8; // 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
|
||||
@@ -3437,39 +3451,39 @@ struct ImFontAtlas
|
||||
struct ImFont
|
||||
{
|
||||
// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
|
||||
ImVector<float> IndexAdvanceX; // 12-16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this info, and are often bottleneck in large UI).
|
||||
ImVector<float> IndexAdvanceX; // 12-16 // out // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this info, and are often bottleneck in large UI).
|
||||
float FallbackAdvanceX; // 4 // out // = FallbackGlyph->AdvanceX
|
||||
float FontSize; // 4 // in // // Height of characters/line, set during loading (don't change after loading)
|
||||
float FontSize; // 4 // in // Height of characters/line, set during loading (don't change after loading)
|
||||
|
||||
// [Internal] Members: Hot ~28/40 bytes (for RenderText loop)
|
||||
ImVector<ImWchar> IndexLookup; // 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
|
||||
ImVector<ImFontGlyph> Glyphs; // 12-16 // out // // All glyphs.
|
||||
ImVector<ImU16> IndexLookup; // 12-16 // out // Sparse. Index glyphs by Unicode code-point.
|
||||
ImVector<ImFontGlyph> Glyphs; // 12-16 // out // All glyphs.
|
||||
const ImFontGlyph* FallbackGlyph; // 4-8 // out // = FindGlyph(FontFallbackChar)
|
||||
|
||||
// [Internal] Members: Cold ~32/40 bytes
|
||||
// Conceptually ConfigData[] is the list of font sources merged to create this font.
|
||||
ImFontAtlas* ContainerAtlas; // 4-8 // out // // What we has been loaded into
|
||||
const ImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances
|
||||
short ConfigDataCount; // 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
|
||||
ImFontAtlas* ContainerAtlas; // 4-8 // out // What we has been loaded into
|
||||
const ImFontConfig* ConfigData; // 4-8 // in // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances
|
||||
short ConfigDataCount; // 2 // in // Number of ImFontConfig involved in creating this font. Usually 1, or >1 when merging multiple font sources into one ImFont.
|
||||
short EllipsisCharCount; // 1 // out // 1 or 3
|
||||
ImWchar EllipsisChar; // 2-4 // out // = '...'/'.'// Character used for ellipsis rendering.
|
||||
ImWchar FallbackChar; // 2-4 // out // = FFFD/'?' // Character used if a glyph isn't found.
|
||||
float EllipsisWidth; // 4 // out // Width
|
||||
float EllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
|
||||
ImWchar EllipsisChar; // 2-4 // out // Character used for ellipsis rendering ('...').
|
||||
ImWchar FallbackChar; // 2-4 // out // Character used if a glyph isn't found (U+FFFD, '?')
|
||||
float EllipsisWidth; // 4 // out // Total ellipsis Width
|
||||
float EllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
|
||||
float Scale; // 4 // in // Base font scale (1.0f), multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
||||
float Ascent, Descent; // 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
|
||||
int MetricsTotalSurface;// 4 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
||||
bool DirtyLookupTables; // 1 // out //
|
||||
float Scale; // 4 // in // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
|
||||
float Ascent, Descent; // 4+4 // out // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
|
||||
int MetricsTotalSurface;// 4 // out // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
|
||||
ImU8 Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/4096/8]; // 2 bytes if ImWchar=ImWchar16, 34 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
|
||||
ImU8 Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8]; // 1 bytes if ImWchar=ImWchar16, 16 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
|
||||
|
||||
// Methods
|
||||
IMGUI_API ImFont();
|
||||
IMGUI_API ~ImFont();
|
||||
IMGUI_API const ImFontGlyph*FindGlyph(ImWchar c);
|
||||
IMGUI_API const ImFontGlyph*FindGlyphNoFallback(ImWchar c);
|
||||
float GetCharAdvance(ImWchar c) { return ((int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; }
|
||||
bool IsLoaded() const { return ContainerAtlas != NULL; }
|
||||
const char* GetDebugName() const { return ConfigData ? ConfigData->Name : "<unknown>"; }
|
||||
float GetCharAdvance(ImWchar c) { return ((int)c < IndexAdvanceX.Size) ? IndexAdvanceX[(int)c] : FallbackAdvanceX; }
|
||||
bool IsLoaded() const { return ContainerAtlas != NULL; }
|
||||
const char* GetDebugName() const { return ConfigData ? ConfigData->Name : "<unknown>"; }
|
||||
|
||||
// 'max_width' stops rendering after a certain width (could be turned into a 2d size). FLT_MAX to disable.
|
||||
// 'wrap_width' enable automatic word-wrapping across multiple lines to fit into given width. 0.0f to disable.
|
||||
|
||||
28
3rdparty/imgui/include/imgui_internal.h
vendored
28
3rdparty/imgui/include/imgui_internal.h
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.7
|
||||
// dear imgui, v1.91.8
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
|
||||
@@ -130,10 +130,17 @@ Index of this file:
|
||||
// [SECTION] Forward declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Utilities
|
||||
// (other types which are not forwarded declared are: ImBitArray<>, ImSpan<>, ImSpanAllocator<>, ImPool<>, ImChunkStream<>)
|
||||
struct ImBitVector; // Store 1-bit per value
|
||||
struct ImRect; // An axis-aligned rectangle (2 points)
|
||||
struct ImGuiTextIndex; // Maintain a line index for a text buffer.
|
||||
|
||||
// ImDrawList/ImFontAtlas
|
||||
struct ImDrawDataBuilder; // Helper to build a ImDrawData instance
|
||||
struct ImDrawListSharedData; // Data shared between all ImDrawList instances
|
||||
|
||||
// ImGui
|
||||
struct ImGuiBoxSelectState; // Box-selection state (currently used by multi-selection, could potentially be used by others)
|
||||
struct ImGuiColorMod; // Stacked color modifier, backup of modified data so we can restore it
|
||||
struct ImGuiContext; // Main Dear ImGui context
|
||||
@@ -222,7 +229,7 @@ extern IMGUI_API ImGuiContext* GImGui; // Current implicit context pointer
|
||||
#endif
|
||||
|
||||
// Debug Logging for ShowDebugLogWindow(). This is designed for relatively rare events so please don't spam.
|
||||
#define IMGUI_DEBUG_LOG_ERROR(...) do { ImGuiContext& g2 = *GImGui; if (g2.DebugLogFlags & ImGuiDebugLogFlags_EventError) IMGUI_DEBUG_LOG(__VA_ARGS__); else g2.DebugLogSkippedErrors++; } while (0)
|
||||
#define IMGUI_DEBUG_LOG_ERROR(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventError) IMGUI_DEBUG_LOG(__VA_ARGS__); else g.DebugLogSkippedErrors++; } while (0)
|
||||
#define IMGUI_DEBUG_LOG_ACTIVEID(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventActiveId) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)
|
||||
#define IMGUI_DEBUG_LOG_FOCUS(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventFocus) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)
|
||||
#define IMGUI_DEBUG_LOG_POPUP(...) do { if (g.DebugLogFlags & ImGuiDebugLogFlags_EventPopup) IMGUI_DEBUG_LOG(__VA_ARGS__); } while (0)
|
||||
@@ -462,7 +469,7 @@ static inline double ImRsqrt(double x) { return 1.0 / sqrt(x); }
|
||||
template<typename T> static inline T ImMin(T lhs, T rhs) { return lhs < rhs ? lhs : rhs; }
|
||||
template<typename T> static inline T ImMax(T lhs, T rhs) { return lhs >= rhs ? lhs : rhs; }
|
||||
template<typename T> static inline T ImClamp(T v, T mn, T mx) { return (v < mn) ? mn : (v > mx) ? mx : v; }
|
||||
template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * (T)t); }
|
||||
template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); }
|
||||
template<typename T> static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; }
|
||||
template<typename T> static inline T ImAddClampOverflow(T a, T b, T mn, T mx) { if (b < 0 && (a < mn - b)) return mn; if (b > 0 && (a > mx - b)) return mx; return a + b; }
|
||||
template<typename T> static inline T ImSubClampOverflow(T a, T b, T mn, T mx) { if (b > 0 && (a < mn + b)) return mn; if (b < 0 && (a > mx + b)) return mx; return a - b; }
|
||||
@@ -736,6 +743,7 @@ struct ImGuiTextIndex
|
||||
|
||||
// Helper: ImGuiStorage
|
||||
IMGUI_API ImGuiStoragePair* ImLowerBound(ImGuiStoragePair* in_begin, ImGuiStoragePair* in_end, ImGuiID key);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] ImDrawList support
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -2448,6 +2456,8 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
ImGuiLayoutType LayoutType;
|
||||
ImGuiLayoutType ParentLayoutType; // Layout type of parent window at the time of Begin()
|
||||
ImU32 ModalDimBgColor;
|
||||
ImGuiItemStatusFlags WindowItemStatusFlags;
|
||||
ImGuiItemStatusFlags ChildItemStatusFlags;
|
||||
|
||||
// Local parameters stacks
|
||||
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
|
||||
@@ -2543,6 +2553,8 @@ struct IMGUI_API ImGuiWindow
|
||||
ImGuiStorage StateStorage;
|
||||
ImVector<ImGuiOldColumns> ColumnsStorage;
|
||||
float FontWindowScale; // User scale multiplier per-window, via SetWindowFontScale()
|
||||
float FontWindowScaleParents;
|
||||
float FontRefSize; // This is a copy of window->CalcFontSize() at the time of Begin(), trying to phase out CalcFontSize() especially as it may be called on non-current window.
|
||||
int SettingsOffset; // Offset into SettingsWindows[] (offsets are always valid as we only grow the array from the back)
|
||||
|
||||
ImDrawList* DrawList; // == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
|
||||
@@ -2577,7 +2589,7 @@ public:
|
||||
|
||||
// We don't use g.FontSize because the window may be != g.CurrentWindow.
|
||||
ImRect Rect() const { return ImRect(Pos.x, Pos.y, Pos.x + Size.x, Pos.y + Size.y); }
|
||||
float CalcFontSize() const { ImGuiContext& g = *Ctx; float scale = g.FontBaseSize * FontWindowScale; if (ParentWindow) scale *= ParentWindow->FontWindowScale; return scale; }
|
||||
float CalcFontSize() const { ImGuiContext& g = *Ctx; return g.FontBaseSize * FontWindowScale * FontWindowScaleParents; }
|
||||
ImRect TitleBarRect() const { return ImRect(Pos, ImVec2(Pos.x + SizeFull.x, Pos.y + TitleBarHeight)); }
|
||||
ImRect MenuBarRect() const { float y1 = Pos.y + TitleBarHeight; return ImRect(Pos.x, y1, Pos.x + SizeFull.x, y1 + MenuBarHeight); }
|
||||
};
|
||||
@@ -2600,6 +2612,8 @@ enum ImGuiTabItemFlagsPrivate_
|
||||
ImGuiTabItemFlags_SectionMask_ = ImGuiTabItemFlags_Leading | ImGuiTabItemFlags_Trailing,
|
||||
ImGuiTabItemFlags_NoCloseButton = 1 << 20, // Track whether p_open was set or not (we'll need this info on the next frame to recompute ContentWidth during layout)
|
||||
ImGuiTabItemFlags_Button = 1 << 21, // Used by TabItemButton, change the tab item behavior to mimic a button
|
||||
ImGuiTabItemFlags_Invisible = 1 << 22, // To reserve space e.g. with ImGuiTabItemFlags_Leading
|
||||
//ImGuiTabItemFlags_Unsorted = 1 << 23, // [Docking] Trailing tabs with the _Unsorted flag will be sorted based on the DockOrder of their Window.
|
||||
};
|
||||
|
||||
// Storage for one active tab item (sizeof() 40 bytes)
|
||||
@@ -2863,6 +2877,7 @@ struct IMGUI_API ImGuiTable
|
||||
ImGuiTableDrawChannelIdx DummyDrawChannel; // Redirect non-visible columns here.
|
||||
ImGuiTableDrawChannelIdx Bg2DrawChannelCurrent; // For Selectable() and other widgets drawing across columns after the freezing line. Index within DrawSplitter.Channels[]
|
||||
ImGuiTableDrawChannelIdx Bg2DrawChannelUnfrozen;
|
||||
ImS8 NavLayer; // ImGuiNavLayer at the time of BeginTable().
|
||||
bool IsLayoutLocked; // Set by TableUpdateLayout() which is called when beginning the first row.
|
||||
bool IsInsideRow; // Set when inside TableBeginRow()/TableEndRow().
|
||||
bool IsInitializing;
|
||||
@@ -3004,6 +3019,7 @@ namespace ImGui
|
||||
// Fonts, drawing
|
||||
IMGUI_API void SetCurrentFont(ImFont* font);
|
||||
inline ImFont* GetDefaultFont() { ImGuiContext& g = *GImGui; return g.IO.FontDefault ? g.IO.FontDefault : g.IO.Fonts->Fonts[0]; }
|
||||
IMGUI_API void PushPasswordFont();
|
||||
inline ImDrawList* GetForegroundDrawList(ImGuiWindow* window) { IM_UNUSED(window); return GetForegroundDrawList(); } // This seemingly unnecessary wrapper simplifies compatibility between the 'master' and 'docking' branches.
|
||||
IMGUI_API ImDrawList* GetBackgroundDrawList(ImGuiViewport* viewport); // get background draw list for the given viewport. this draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
|
||||
IMGUI_API ImDrawList* GetForegroundDrawList(ImGuiViewport* viewport); // get foreground draw list for the given viewport. this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
|
||||
@@ -3085,7 +3101,7 @@ namespace ImGui
|
||||
IMGUI_API bool ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flags);
|
||||
IMGUI_API bool IsWindowContentHoverable(ImGuiWindow* window, ImGuiHoveredFlags flags = 0);
|
||||
IMGUI_API bool IsClippedEx(const ImRect& bb, ImGuiID id);
|
||||
IMGUI_API void SetLastItemData(ImGuiID item_id, ImGuiItemFlags in_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect);
|
||||
IMGUI_API void SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect);
|
||||
IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_w, float default_h);
|
||||
IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x);
|
||||
IMGUI_API void PushMultiItemsWidths(int components, float width_full);
|
||||
@@ -3366,6 +3382,7 @@ namespace ImGui
|
||||
IMGUI_API void TabBarQueueReorderFromMousePos(ImGuiTabBar* tab_bar, ImGuiTabItem* tab, ImVec2 mouse_pos);
|
||||
IMGUI_API bool TabBarProcessReorder(ImGuiTabBar* tab_bar);
|
||||
IMGUI_API bool TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags, ImGuiWindow* docked_window);
|
||||
IMGUI_API void TabItemSpacing(const char* str_id, ImGuiTabItemFlags flags, float width);
|
||||
IMGUI_API ImVec2 TabItemCalcSize(const char* label, bool has_close_button_or_unsaved_marker);
|
||||
IMGUI_API ImVec2 TabItemCalcSize(ImGuiWindow* window);
|
||||
IMGUI_API void TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col);
|
||||
@@ -3561,6 +3578,7 @@ IMGUI_API void ImFontAtlasBuildRender8bppRectFromString(ImFontAtlas* atlas,
|
||||
IMGUI_API void ImFontAtlasBuildRender32bppRectFromString(ImFontAtlas* atlas, int x, int y, int w, int h, const char* in_str, char in_marker_char, unsigned int in_marker_pixel_value);
|
||||
IMGUI_API void ImFontAtlasBuildMultiplyCalcLookupTable(unsigned char out_table[256], float in_multiply_factor);
|
||||
IMGUI_API void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsigned char* pixels, int x, int y, int w, int h, int stride);
|
||||
IMGUI_API void ImFontAtlasBuildGetOversampleFactors(const ImFontConfig* cfg, int* out_oversample_h, int* out_oversample_v);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// [SECTION] Test Engine specific hooks (imgui_test_engine)
|
||||
|
||||
211
3rdparty/imgui/src/imgui.cpp
vendored
211
3rdparty/imgui/src/imgui.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.7
|
||||
// dear imgui, v1.91.8
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
@@ -430,6 +430,9 @@ CODE
|
||||
When you are not sure about an old symbol or function name, try using the Search/Find function of your IDE to look for comments or references in all imgui files.
|
||||
You can read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2025/01/22 (1.91.8) - removed ImGuiColorEditFlags_AlphaPreview (made value 0): it is now the default behavior.
|
||||
prior to 1.91.8: alpha was made opaque in the preview by default _unless_ using ImGuiColorEditFlags_AlphaPreview. We now display the preview as transparent by default. You can use ImGuiColorEditFlags_AlphaOpaque to use old behavior.
|
||||
the new flags (ImGuiColorEditFlags_AlphaOpaque, ImGuiColorEditFlags_AlphaNoBg + existing ImGuiColorEditFlags_AlphaPreviewHalf) may be combined better and allow finer controls:
|
||||
- 2025/01/14 (1.91.7) - renamed ImGuiTreeNodeFlags_SpanTextWidth to ImGuiTreeNodeFlags_SpanLabelWidth for consistency with other names. Kept redirection enum (will obsolete). (#6937)
|
||||
- 2024/11/27 (1.91.6) - changed CRC32 table from CRC32-adler to CRC32c polynomial in order to be compatible with the result of SSE 4.2 instructions.
|
||||
As a result, old .ini data may be partially lost (docking and tables information particularly).
|
||||
@@ -1253,6 +1256,7 @@ static void RenderWindowTitleBarContents(ImGuiWindow* window, const
|
||||
static void RenderDimmedBackgroundBehindWindow(ImGuiWindow* window, ImU32 col);
|
||||
static void RenderDimmedBackgrounds();
|
||||
static void SetLastItemDataForWindow(ImGuiWindow* window, const ImRect& rect);
|
||||
static void SetLastItemDataForChildWindowItem(ImGuiWindow* window, const ImRect& rect);
|
||||
|
||||
// Viewports
|
||||
const ImGuiID IMGUI_VIEWPORT_DEFAULT_ID = 0x11111111; // Using an arbitrary constant instead of e.g. ImHashStr("ViewportDefault", 0); so it's easier to spot in the debugger. The exact value doesn't matter.
|
||||
@@ -1334,11 +1338,11 @@ ImGuiStyle::ImGuiStyle()
|
||||
GrabMinSize = 12.0f; // Minimum width/height of a grab box for slider/scrollbar
|
||||
GrabRounding = 0.0f; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
|
||||
LogSliderDeadzone = 4.0f; // The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.
|
||||
TabRounding = 4.0f; // Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
|
||||
TabRounding = 5.0f; // Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
|
||||
TabBorderSize = 0.0f; // Thickness of border around tabs.
|
||||
TabMinWidthForCloseButton = 0.0f; // Minimum width for close button to appear on an unselected tab when hovered. Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.
|
||||
TabBarBorderSize = 1.0f; // Thickness of tab-bar separator, which takes on the tab active color to denote focus.
|
||||
TabBarOverlineSize = 2.0f; // Thickness of tab-bar overline, which highlights the selected tab-bar.
|
||||
TabBarOverlineSize = 1.0f; // Thickness of tab-bar overline, which highlights the selected tab-bar.
|
||||
TableAngledHeadersAngle = 35.0f * (IM_PI / 180.0f); // Angle of angled headers (supported values range from -50 degrees to +50 degrees).
|
||||
TableAngledHeadersTextAlign = ImVec2(0.5f,0.0f);// Alignment of angled headers within the cell
|
||||
ColorButtonPosition = ImGuiDir_Right; // Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
|
||||
@@ -4276,7 +4280,8 @@ ImGuiWindow::ImGuiWindow(ImGuiContext* ctx, const char* name) : DrawListInst(NUL
|
||||
SetWindowPosVal = SetWindowPosPivot = ImVec2(FLT_MAX, FLT_MAX);
|
||||
LastFrameActive = -1;
|
||||
LastTimeActive = -1.0f;
|
||||
FontWindowScale = 1.0f;
|
||||
FontRefSize = 0.0f;
|
||||
FontWindowScale = FontWindowScaleParents = 1.0f;
|
||||
SettingsOffset = -1;
|
||||
DrawList = &DrawListInst;
|
||||
DrawList->_OwnerName = Name;
|
||||
@@ -4691,15 +4696,27 @@ bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id)
|
||||
|
||||
// This is also inlined in ItemAdd()
|
||||
// Note: if ImGuiItemStatusFlags_HasDisplayRect is set, user needs to set g.LastItemData.DisplayRect.
|
||||
void ImGui::SetLastItemData(ImGuiID item_id, ImGuiItemFlags in_flags, ImGuiItemStatusFlags item_flags, const ImRect& item_rect)
|
||||
void ImGui::SetLastItemData(ImGuiID item_id, ImGuiItemFlags item_flags, ImGuiItemStatusFlags status_flags, const ImRect& item_rect)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
g.LastItemData.ID = item_id;
|
||||
g.LastItemData.ItemFlags = in_flags;
|
||||
g.LastItemData.StatusFlags = item_flags;
|
||||
g.LastItemData.ItemFlags = item_flags;
|
||||
g.LastItemData.StatusFlags = status_flags;
|
||||
g.LastItemData.Rect = g.LastItemData.NavRect = item_rect;
|
||||
}
|
||||
|
||||
static void ImGui::SetLastItemDataForWindow(ImGuiWindow* window, const ImRect& rect)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
SetLastItemData(window->MoveId, g.CurrentItemFlags, window->DC.WindowItemStatusFlags, rect);
|
||||
}
|
||||
|
||||
static void ImGui::SetLastItemDataForChildWindowItem(ImGuiWindow* window, const ImRect& rect)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
SetLastItemData(window->ChildId, g.CurrentItemFlags, window->DC.ChildItemStatusFlags, rect);
|
||||
}
|
||||
|
||||
float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x)
|
||||
{
|
||||
if (wrap_pos_x < 0.0f)
|
||||
@@ -5086,6 +5103,7 @@ void ImGui::UpdateHoveredWindowAndCaptureFlags()
|
||||
}
|
||||
|
||||
// Called once a frame. Followed by SetCurrentFont() which sets up the remaining data.
|
||||
// FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!
|
||||
static void SetupDrawListSharedData()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
@@ -6152,7 +6170,14 @@ void ImGui::EndChild()
|
||||
}
|
||||
if (g.HoveredWindow == child_window)
|
||||
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow;
|
||||
child_window->DC.ChildItemStatusFlags = g.LastItemData.StatusFlags;
|
||||
//SetLastItemDataForChildWindowItem(child_window, child_window->Rect()); // Not needed, effectively done by ItemAdd()
|
||||
}
|
||||
else
|
||||
{
|
||||
SetLastItemDataForChildWindowItem(child_window, child_window->Rect());
|
||||
}
|
||||
|
||||
g.WithinEndChildID = backup_within_end_child_id;
|
||||
g.LogLinePosY = -FLT_MAX; // To enforce a carriage return
|
||||
}
|
||||
@@ -6707,7 +6732,7 @@ static void ImGui::RenderWindowOuterBorders(ImGuiWindow* window)
|
||||
if (g.Style.FrameBorderSize > 0 && !(window->Flags & ImGuiWindowFlags_NoTitleBar))
|
||||
{
|
||||
float y = window->Pos.y + window->TitleBarHeight - 1;
|
||||
window->DrawList->AddLine(ImVec2(window->Pos.x + border_size, y), ImVec2(window->Pos.x + window->Size.x - border_size, y), border_col, g.Style.FrameBorderSize);
|
||||
window->DrawList->AddLine(ImVec2(window->Pos.x + border_size * 0.5f, y), ImVec2(window->Pos.x + window->Size.x - border_size * 0.5f, y), border_col, g.Style.FrameBorderSize);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6767,9 +6792,9 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
||||
{
|
||||
ImRect menu_bar_rect = window->MenuBarRect();
|
||||
menu_bar_rect.ClipWith(window->Rect()); // Soft clipping, in particular child window don't have minimum size covering the menu bar so this is useful for them.
|
||||
window->DrawList->AddRectFilled(menu_bar_rect.Min + ImVec2(window_border_size, 0), menu_bar_rect.Max - ImVec2(window_border_size, 0), GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImDrawFlags_RoundCornersTop);
|
||||
window->DrawList->AddRectFilled(menu_bar_rect.Min, menu_bar_rect.Max, GetColorU32(ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0.0f, ImDrawFlags_RoundCornersTop);
|
||||
if (style.FrameBorderSize > 0.0f && menu_bar_rect.Max.y < window->Pos.y + window->Size.y)
|
||||
window->DrawList->AddLine(menu_bar_rect.GetBL(), menu_bar_rect.GetBR(), GetColorU32(ImGuiCol_Border), style.FrameBorderSize);
|
||||
window->DrawList->AddLine(menu_bar_rect.GetBL() + ImVec2(window_border_size * 0.5f, 0.0f), menu_bar_rect.GetBR() - ImVec2(window_border_size * 0.5f, 0.0f), GetColorU32(ImGuiCol_Border), style.FrameBorderSize);
|
||||
}
|
||||
|
||||
// Scrollbars
|
||||
@@ -6788,9 +6813,10 @@ void ImGui::RenderWindowDecorations(ImGuiWindow* window, const ImRect& title_bar
|
||||
continue;
|
||||
const ImGuiResizeGripDef& grip = resize_grip_def[resize_grip_n];
|
||||
const ImVec2 corner = ImLerp(window->Pos, window->Pos + window->Size, grip.CornerPosN);
|
||||
window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(window_border_size, resize_grip_draw_size) : ImVec2(resize_grip_draw_size, window_border_size)));
|
||||
window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(resize_grip_draw_size, window_border_size) : ImVec2(window_border_size, resize_grip_draw_size)));
|
||||
window->DrawList->PathArcToFast(ImVec2(corner.x + grip.InnerDir.x * (window_rounding + window_border_size), corner.y + grip.InnerDir.y * (window_rounding + window_border_size)), window_rounding, grip.AngleMin12, grip.AngleMax12);
|
||||
const float border_inner = IM_ROUND(window_border_size * 0.5f);
|
||||
window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(border_inner, resize_grip_draw_size) : ImVec2(resize_grip_draw_size, border_inner)));
|
||||
window->DrawList->PathLineTo(corner + grip.InnerDir * ((resize_grip_n & 1) ? ImVec2(resize_grip_draw_size, border_inner) : ImVec2(border_inner, resize_grip_draw_size)));
|
||||
window->DrawList->PathArcToFast(ImVec2(corner.x + grip.InnerDir.x * (window_rounding + border_inner), corner.y + grip.InnerDir.y * (window_rounding + border_inner)), window_rounding, grip.AngleMin12, grip.AngleMax12);
|
||||
window->DrawList->PathFillConvex(col);
|
||||
}
|
||||
}
|
||||
@@ -7036,6 +7062,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
// There's little point to expose a flag to set this: because the interesting cases won't be using parent_window_in_stack,
|
||||
// e.g. linking a tool window in a standalone viewport to a document window, regardless of their Begin() stack parenting. (#6798)
|
||||
window->ParentWindowForFocusRoute = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window_in_stack : NULL;
|
||||
|
||||
// Inherent SetWindowFontScale() from parent until we fix this system...
|
||||
window->FontWindowScaleParents = parent_window ? parent_window->FontWindowScaleParents * parent_window->FontWindowScale : 1.0f;
|
||||
}
|
||||
|
||||
// Add to focus scope stack
|
||||
@@ -7197,6 +7226,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
window->DC.MenuBarOffset.y = g.NextWindowData.MenuBarOffsetMinVal.y;
|
||||
window->TitleBarHeight = (flags & ImGuiWindowFlags_NoTitleBar) ? 0.0f : g.FontSize + g.Style.FramePadding.y * 2.0f;
|
||||
window->MenuBarHeight = (flags & ImGuiWindowFlags_MenuBar) ? window->DC.MenuBarOffset.y + g.FontSize + g.Style.FramePadding.y * 2.0f : 0.0f;
|
||||
window->FontRefSize = g.FontSize; // Lock this to discourage calling window->CalcFontSize() outside of current window.
|
||||
|
||||
// Depending on condition we use previous or current window size to compare against contents size to decide if a scrollbar should be visible.
|
||||
// Those flags will be altered further down in the function depending on more conditions.
|
||||
@@ -7602,6 +7632,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
|
||||
// We fill last item data based on Title Bar/Tab, in order for IsItemHovered() and IsItemActive() to be usable after Begin().
|
||||
// This is useful to allow creating context menus on title bar only, etc.
|
||||
window->DC.WindowItemStatusFlags = ImGuiItemStatusFlags_None;
|
||||
window->DC.WindowItemStatusFlags |= IsMouseHoveringRect(title_bar_rect.Min, title_bar_rect.Max, false) ? ImGuiItemStatusFlags_HoveredRect : 0;
|
||||
SetLastItemDataForWindow(window, title_bar_rect);
|
||||
|
||||
// [DEBUG]
|
||||
@@ -7707,12 +7739,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
return !window->SkipItems;
|
||||
}
|
||||
|
||||
static void ImGui::SetLastItemDataForWindow(ImGuiWindow* window, const ImRect& rect)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
SetLastItemData(window->MoveId, g.CurrentItemFlags, IsMouseHoveringRect(rect.Min, rect.Max, false) ? ImGuiItemStatusFlags_HoveredRect : 0, rect);
|
||||
}
|
||||
|
||||
void ImGui::End()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
@@ -9204,6 +9230,17 @@ bool ImGui::IsMouseReleased(ImGuiMouseButton button, ImGuiID owner_id)
|
||||
return g.IO.MouseReleased[button] && TestKeyOwner(MouseButtonToKey(button), owner_id); // Should be same as IsKeyReleased(MouseButtonToKey(button), owner_id)
|
||||
}
|
||||
|
||||
// Use if you absolutely need to distinguish single-click from double-click by introducing a delay.
|
||||
// Generally use with 'delay >= io.MouseDoubleClickTime' + combined with a 'io.MouseClickedLastCount == 1' test.
|
||||
// This is a very rarely used UI idiom, but some apps use this: e.g. MS Explorer single click on an icon to rename.
|
||||
bool ImGui::IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown));
|
||||
const float time_since_release = (float)(g.Time - g.IO.MouseReleasedTime[button]);
|
||||
return !IsMouseDown(button) && (time_since_release - g.IO.DeltaTime < delay) && (time_since_release >= delay);
|
||||
}
|
||||
|
||||
bool ImGui::IsMouseDoubleClicked(ImGuiMouseButton button)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
@@ -9477,6 +9514,8 @@ static void ImGui::UpdateMouseInputs()
|
||||
io.MouseClicked[i] = io.MouseDown[i] && io.MouseDownDuration[i] < 0.0f;
|
||||
io.MouseClickedCount[i] = 0; // Will be filled below
|
||||
io.MouseReleased[i] = !io.MouseDown[i] && io.MouseDownDuration[i] >= 0.0f;
|
||||
if (io.MouseReleased[i])
|
||||
io.MouseReleasedTime[i] = g.Time;
|
||||
io.MouseDownDurationPrev[i] = io.MouseDownDuration[i];
|
||||
io.MouseDownDuration[i] = io.MouseDown[i] ? (io.MouseDownDuration[i] < 0.0f ? 0.0f : io.MouseDownDuration[i] + io.DeltaTime) : -1.0f;
|
||||
if (io.MouseClicked[i])
|
||||
@@ -9645,7 +9684,7 @@ void ImGui::UpdateMouseWheel()
|
||||
{
|
||||
LockWheelingWindow(window, wheel.x);
|
||||
float max_step = window->InnerRect.GetWidth() * 0.67f;
|
||||
float scroll_step = ImTrunc(ImMin(2 * window->CalcFontSize(), max_step));
|
||||
float scroll_step = ImTrunc(ImMin(2 * window->FontRefSize, max_step));
|
||||
SetScrollX(window, window->Scroll.x - wheel.x * scroll_step);
|
||||
g.WheelingWindowScrolledFrame = g.FrameCount;
|
||||
}
|
||||
@@ -9653,7 +9692,7 @@ void ImGui::UpdateMouseWheel()
|
||||
{
|
||||
LockWheelingWindow(window, wheel.y);
|
||||
float max_step = window->InnerRect.GetHeight() * 0.67f;
|
||||
float scroll_step = ImTrunc(ImMin(5 * window->CalcFontSize(), max_step));
|
||||
float scroll_step = ImTrunc(ImMin(5 * window->FontRefSize, max_step));
|
||||
SetScrollY(window, window->Scroll.y - wheel.y * scroll_step);
|
||||
g.WheelingWindowScrolledFrame = g.FrameCount;
|
||||
}
|
||||
@@ -10262,6 +10301,11 @@ void ImGui::ErrorRecoveryTryToRecoverWindowState(const ImGuiErrorRecoveryStat
|
||||
IM_ASSERT_USER_ERROR(0, "Missing EndMultiSelect()");
|
||||
EndMultiSelect();
|
||||
}
|
||||
if (window->DC.MenuBarAppending) //-V1044
|
||||
{
|
||||
IM_ASSERT_USER_ERROR(0, "Missing EndMenuBar()");
|
||||
EndMenuBar();
|
||||
}
|
||||
while (window->DC.TreeDepth > state_in->SizeOfTreeStack) //-V1044
|
||||
{
|
||||
IM_ASSERT_USER_ERROR(0, "Missing TreePop()");
|
||||
@@ -12983,7 +13027,7 @@ static void ImGui::NavUpdate()
|
||||
{
|
||||
// *Fallback* manual-scroll with Nav directional keys when window has no navigable item
|
||||
ImGuiWindow* window = g.NavWindow;
|
||||
const float scroll_speed = IM_ROUND(window->CalcFontSize() * 100 * io.DeltaTime); // We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
|
||||
const float scroll_speed = IM_ROUND(window->FontRefSize * 100 * io.DeltaTime); // We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
|
||||
const ImGuiDir move_dir = g.NavMoveDir;
|
||||
if (window->DC.NavLayersActiveMask == 0x00 && window->DC.NavWindowHasScrollY && move_dir != ImGuiDir_None)
|
||||
{
|
||||
@@ -13173,8 +13217,8 @@ void ImGui::NavUpdateCreateMoveRequest()
|
||||
if ((clamp_x || clamp_y) && !inner_rect_rel.Contains(window->NavRectRel[g.NavLayer]))
|
||||
{
|
||||
IMGUI_DEBUG_LOG_NAV("[nav] NavMoveRequest: clamp NavRectRel for gamepad move\n");
|
||||
float pad_x = ImMin(inner_rect_rel.GetWidth(), window->CalcFontSize() * 0.5f);
|
||||
float pad_y = ImMin(inner_rect_rel.GetHeight(), window->CalcFontSize() * 0.5f); // Terrible approximation for the intent of starting navigation from first fully visible item
|
||||
float pad_x = ImMin(inner_rect_rel.GetWidth(), window->FontRefSize * 0.5f);
|
||||
float pad_y = ImMin(inner_rect_rel.GetHeight(), window->FontRefSize * 0.5f); // Terrible approximation for the intent of starting navigation from first fully visible item
|
||||
inner_rect_rel.Min.x = clamp_x ? (inner_rect_rel.Min.x + pad_x) : -FLT_MAX;
|
||||
inner_rect_rel.Max.x = clamp_x ? (inner_rect_rel.Max.x - pad_x) : +FLT_MAX;
|
||||
inner_rect_rel.Min.y = clamp_y ? (inner_rect_rel.Min.y + pad_y) : -FLT_MAX;
|
||||
@@ -13432,7 +13476,7 @@ static float ImGui::NavUpdatePageUpPageDown()
|
||||
else
|
||||
{
|
||||
ImRect& nav_rect_rel = window->NavRectRel[g.NavLayer];
|
||||
const float page_offset_y = ImMax(0.0f, window->InnerRect.GetHeight() - window->CalcFontSize() * 1.0f + nav_rect_rel.GetHeight());
|
||||
const float page_offset_y = ImMax(0.0f, window->InnerRect.GetHeight() - window->FontRefSize * 1.0f + nav_rect_rel.GetHeight());
|
||||
float nav_scoring_rect_offset_y = 0.0f;
|
||||
if (IsKeyPressed(ImGuiKey_PageUp, true))
|
||||
{
|
||||
@@ -13813,12 +13857,12 @@ void ImGui::NavUpdateWindowingOverlay()
|
||||
return;
|
||||
|
||||
if (g.NavWindowingListWindow == NULL)
|
||||
g.NavWindowingListWindow = FindWindowByName("###NavWindowingList");
|
||||
g.NavWindowingListWindow = FindWindowByName("###NavWindowingOverlay");
|
||||
const ImGuiViewport* viewport = GetMainViewport();
|
||||
SetNextWindowSizeConstraints(ImVec2(viewport->Size.x * 0.20f, viewport->Size.y * 0.20f), ImVec2(FLT_MAX, FLT_MAX));
|
||||
SetNextWindowPos(viewport->GetCenter(), ImGuiCond_Always, ImVec2(0.5f, 0.5f));
|
||||
PushStyleVar(ImGuiStyleVar_WindowPadding, g.Style.WindowPadding * 2.0f);
|
||||
Begin("###NavWindowingList", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings);
|
||||
Begin("###NavWindowingOverlay", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings);
|
||||
if (g.ContextName[0] != 0)
|
||||
SeparatorText(g.ContextName);
|
||||
for (int n = g.WindowsFocusOrder.Size - 1; n >= 0; n--)
|
||||
@@ -16128,18 +16172,24 @@ void ImGui::DebugNodeDrawCmdShowMeshAndBoundingBox(ImDrawList* out_draw_list, co
|
||||
// [DEBUG] Display details for a single font, called by ShowStyleEditor().
|
||||
void ImGui::DebugNodeFont(ImFont* font)
|
||||
{
|
||||
bool opened = TreeNode(font, "Font: \"%s\"\n%.2f px, %d glyphs, %d file(s)",
|
||||
bool opened = TreeNode(font, "Font: \"%s\": %.2f px, %d glyphs, %d sources(s)",
|
||||
font->ConfigData ? font->ConfigData[0].Name : "", font->FontSize, font->Glyphs.Size, font->ConfigDataCount);
|
||||
SameLine();
|
||||
if (SmallButton("Set as default"))
|
||||
GetIO().FontDefault = font;
|
||||
if (!opened)
|
||||
return;
|
||||
|
||||
// Display preview text
|
||||
if (!opened)
|
||||
Indent();
|
||||
Indent();
|
||||
PushFont(font);
|
||||
Text("The quick brown fox jumps over the lazy dog");
|
||||
PopFont();
|
||||
if (!opened)
|
||||
{
|
||||
Unindent();
|
||||
Unindent();
|
||||
return;
|
||||
}
|
||||
if (SmallButton("Set as default"))
|
||||
GetIO().FontDefault = font;
|
||||
|
||||
// Display details
|
||||
SetNextItemWidth(GetFontSize() * 8);
|
||||
@@ -16158,62 +16208,69 @@ void ImGui::DebugNodeFont(ImFont* font)
|
||||
Text("Texture Area: about %d px ~%dx%d px", font->MetricsTotalSurface, surface_sqrt, surface_sqrt);
|
||||
for (int config_i = 0; config_i < font->ConfigDataCount; config_i++)
|
||||
if (font->ConfigData)
|
||||
if (const ImFontConfig* cfg = &font->ConfigData[config_i])
|
||||
BulletText("Input %d: \'%s\', Oversample: (%d,%d), PixelSnapH: %d, Offset: (%.1f,%.1f)",
|
||||
config_i, cfg->Name, cfg->OversampleH, cfg->OversampleV, cfg->PixelSnapH, cfg->GlyphOffset.x, cfg->GlyphOffset.y);
|
||||
{
|
||||
const ImFontConfig* cfg = &font->ConfigData[config_i];
|
||||
int oversample_h, oversample_v;
|
||||
ImFontAtlasBuildGetOversampleFactors(cfg, &oversample_h, &oversample_v);
|
||||
BulletText("Input %d: \'%s\', Oversample: (%d=>%d,%d=>%d), PixelSnapH: %d, Offset: (%.1f,%.1f)",
|
||||
config_i, cfg->Name, cfg->OversampleH, oversample_h, cfg->OversampleV, oversample_v, cfg->PixelSnapH, cfg->GlyphOffset.x, cfg->GlyphOffset.y);
|
||||
}
|
||||
|
||||
// Display all glyphs of the fonts in separate pages of 256 characters
|
||||
if (TreeNode("Glyphs", "Glyphs (%d)", font->Glyphs.Size))
|
||||
{
|
||||
ImDrawList* draw_list = GetWindowDrawList();
|
||||
const ImU32 glyph_col = GetColorU32(ImGuiCol_Text);
|
||||
const float cell_size = font->FontSize * 1;
|
||||
const float cell_spacing = GetStyle().ItemSpacing.y;
|
||||
for (unsigned int base = 0; base <= IM_UNICODE_CODEPOINT_MAX; base += 256)
|
||||
if (TreeNode("Glyphs", "Glyphs (%d)", font->Glyphs.Size))
|
||||
{
|
||||
// Skip ahead if a large bunch of glyphs are not present in the font (test in chunks of 4k)
|
||||
// This is only a small optimization to reduce the number of iterations when IM_UNICODE_MAX_CODEPOINT
|
||||
// is large // (if ImWchar==ImWchar32 we will do at least about 272 queries here)
|
||||
if (!(base & 4095) && font->IsGlyphRangeUnused(base, base + 4095))
|
||||
ImDrawList* draw_list = GetWindowDrawList();
|
||||
const ImU32 glyph_col = GetColorU32(ImGuiCol_Text);
|
||||
const float cell_size = font->FontSize * 1;
|
||||
const float cell_spacing = GetStyle().ItemSpacing.y;
|
||||
for (unsigned int base = 0; base <= IM_UNICODE_CODEPOINT_MAX; base += 256)
|
||||
{
|
||||
base += 4096 - 256;
|
||||
continue;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (unsigned int n = 0; n < 256; n++)
|
||||
if (font->FindGlyphNoFallback((ImWchar)(base + n)))
|
||||
count++;
|
||||
if (count <= 0)
|
||||
continue;
|
||||
if (!TreeNode((void*)(intptr_t)base, "U+%04X..U+%04X (%d %s)", base, base + 255, count, count > 1 ? "glyphs" : "glyph"))
|
||||
continue;
|
||||
|
||||
// Draw a 16x16 grid of glyphs
|
||||
ImVec2 base_pos = GetCursorScreenPos();
|
||||
for (unsigned int n = 0; n < 256; n++)
|
||||
{
|
||||
// We use ImFont::RenderChar as a shortcut because we don't have UTF-8 conversion functions
|
||||
// available here and thus cannot easily generate a zero-terminated UTF-8 encoded string.
|
||||
ImVec2 cell_p1(base_pos.x + (n % 16) * (cell_size + cell_spacing), base_pos.y + (n / 16) * (cell_size + cell_spacing));
|
||||
ImVec2 cell_p2(cell_p1.x + cell_size, cell_p1.y + cell_size);
|
||||
const ImFontGlyph* glyph = font->FindGlyphNoFallback((ImWchar)(base + n));
|
||||
draw_list->AddRect(cell_p1, cell_p2, glyph ? IM_COL32(255, 255, 255, 100) : IM_COL32(255, 255, 255, 50));
|
||||
if (!glyph)
|
||||
continue;
|
||||
font->RenderChar(draw_list, cell_size, cell_p1, glyph_col, (ImWchar)(base + n));
|
||||
if (IsMouseHoveringRect(cell_p1, cell_p2) && BeginTooltip())
|
||||
// Skip ahead if a large bunch of glyphs are not present in the font (test in chunks of 4k)
|
||||
// This is only a small optimization to reduce the number of iterations when IM_UNICODE_MAX_CODEPOINT
|
||||
// is large // (if ImWchar==ImWchar32 we will do at least about 272 queries here)
|
||||
if (!(base & 8191) && font->IsGlyphRangeUnused(base, base + 8191))
|
||||
{
|
||||
DebugNodeFontGlyph(font, glyph);
|
||||
EndTooltip();
|
||||
base += 8192 - 256;
|
||||
continue;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (unsigned int n = 0; n < 256; n++)
|
||||
if (font->FindGlyphNoFallback((ImWchar)(base + n)))
|
||||
count++;
|
||||
if (count <= 0)
|
||||
continue;
|
||||
if (!TreeNode((void*)(intptr_t)base, "U+%04X..U+%04X (%d %s)", base, base + 255, count, count > 1 ? "glyphs" : "glyph"))
|
||||
continue;
|
||||
|
||||
// Draw a 16x16 grid of glyphs
|
||||
ImVec2 base_pos = GetCursorScreenPos();
|
||||
for (unsigned int n = 0; n < 256; n++)
|
||||
{
|
||||
// We use ImFont::RenderChar as a shortcut because we don't have UTF-8 conversion functions
|
||||
// available here and thus cannot easily generate a zero-terminated UTF-8 encoded string.
|
||||
ImVec2 cell_p1(base_pos.x + (n % 16) * (cell_size + cell_spacing), base_pos.y + (n / 16) * (cell_size + cell_spacing));
|
||||
ImVec2 cell_p2(cell_p1.x + cell_size, cell_p1.y + cell_size);
|
||||
const ImFontGlyph* glyph = font->FindGlyphNoFallback((ImWchar)(base + n));
|
||||
draw_list->AddRect(cell_p1, cell_p2, glyph ? IM_COL32(255, 255, 255, 100) : IM_COL32(255, 255, 255, 50));
|
||||
if (!glyph)
|
||||
continue;
|
||||
font->RenderChar(draw_list, cell_size, cell_p1, glyph_col, (ImWchar)(base + n));
|
||||
if (IsMouseHoveringRect(cell_p1, cell_p2) && BeginTooltip())
|
||||
{
|
||||
DebugNodeFontGlyph(font, glyph);
|
||||
EndTooltip();
|
||||
}
|
||||
}
|
||||
Dummy(ImVec2((cell_size + cell_spacing) * 16, (cell_size + cell_spacing) * 16));
|
||||
TreePop();
|
||||
}
|
||||
Dummy(ImVec2((cell_size + cell_spacing) * 16, (cell_size + cell_spacing) * 16));
|
||||
TreePop();
|
||||
}
|
||||
TreePop();
|
||||
}
|
||||
TreePop();
|
||||
Unindent();
|
||||
}
|
||||
|
||||
void ImGui::DebugNodeFontGlyph(ImFont*, const ImFontGlyph* glyph)
|
||||
|
||||
78
3rdparty/imgui/src/imgui_demo.cpp
vendored
78
3rdparty/imgui/src/imgui_demo.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.7
|
||||
// dear imgui, v1.91.8
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
@@ -2117,19 +2117,16 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
if (ImGui::TreeNode("Color/Picker Widgets"))
|
||||
{
|
||||
static ImVec4 color = ImVec4(114.0f / 255.0f, 144.0f / 255.0f, 154.0f / 255.0f, 200.0f / 255.0f);
|
||||
static ImGuiColorEditFlags base_flags = ImGuiColorEditFlags_None;
|
||||
|
||||
static bool alpha_preview = true;
|
||||
static bool alpha_half_preview = false;
|
||||
static bool drag_and_drop = true;
|
||||
static bool options_menu = true;
|
||||
static bool hdr = false;
|
||||
ImGui::SeparatorText("Options");
|
||||
ImGui::Checkbox("With Alpha Preview", &alpha_preview);
|
||||
ImGui::Checkbox("With Half Alpha Preview", &alpha_half_preview);
|
||||
ImGui::Checkbox("With Drag and Drop", &drag_and_drop);
|
||||
ImGui::Checkbox("With Options Menu", &options_menu); ImGui::SameLine(); HelpMarker("Right-click on the individual color widget to show options.");
|
||||
ImGui::Checkbox("With HDR", &hdr); ImGui::SameLine(); HelpMarker("Currently all this does is to lift the 0..1 limits on dragging widgets.");
|
||||
ImGuiColorEditFlags misc_flags = (hdr ? ImGuiColorEditFlags_HDR : 0) | (drag_and_drop ? 0 : ImGuiColorEditFlags_NoDragDrop) | (alpha_half_preview ? ImGuiColorEditFlags_AlphaPreviewHalf : (alpha_preview ? ImGuiColorEditFlags_AlphaPreview : 0)) | (options_menu ? 0 : ImGuiColorEditFlags_NoOptions);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_NoAlpha", &base_flags, ImGuiColorEditFlags_NoAlpha);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_AlphaOpaque", &base_flags, ImGuiColorEditFlags_AlphaOpaque);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_AlphaNoBg", &base_flags, ImGuiColorEditFlags_AlphaNoBg);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_AlphaPreviewHalf", &base_flags, ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_NoDragDrop", &base_flags, ImGuiColorEditFlags_NoDragDrop);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_NoOptions", &base_flags, ImGuiColorEditFlags_NoOptions); ImGui::SameLine(); HelpMarker("Right-click on the individual color widget to show options.");
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_HDR", &base_flags, ImGuiColorEditFlags_HDR); ImGui::SameLine(); HelpMarker("Currently all this does is to lift the 0..1 limits on dragging widgets.");
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Color/ColorEdit");
|
||||
ImGui::SeparatorText("Inline color editor");
|
||||
@@ -2137,15 +2134,15 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
ImGui::SameLine(); HelpMarker(
|
||||
"Click on the color square to open a color picker.\n"
|
||||
"CTRL+click on individual component to input value.\n");
|
||||
ImGui::ColorEdit3("MyColor##1", (float*)&color, misc_flags);
|
||||
ImGui::ColorEdit3("MyColor##1", (float*)&color, base_flags);
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Color/ColorEdit (HSV, with Alpha)");
|
||||
ImGui::Text("Color widget HSV with Alpha:");
|
||||
ImGui::ColorEdit4("MyColor##2", (float*)&color, ImGuiColorEditFlags_DisplayHSV | misc_flags);
|
||||
ImGui::ColorEdit4("MyColor##2", (float*)&color, ImGuiColorEditFlags_DisplayHSV | base_flags);
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Color/ColorEdit (float display)");
|
||||
ImGui::Text("Color widget with Float Display:");
|
||||
ImGui::ColorEdit4("MyColor##2f", (float*)&color, ImGuiColorEditFlags_Float | misc_flags);
|
||||
ImGui::ColorEdit4("MyColor##2f", (float*)&color, ImGuiColorEditFlags_Float | base_flags);
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Color/ColorButton (with Picker)");
|
||||
ImGui::Text("Color button with Picker:");
|
||||
@@ -2153,7 +2150,7 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
"With the ImGuiColorEditFlags_NoInputs flag you can hide all the slider/text inputs.\n"
|
||||
"With the ImGuiColorEditFlags_NoLabel flag you can pass a non-empty label which will only "
|
||||
"be used for the tooltip and picker popup.");
|
||||
ImGui::ColorEdit4("MyColor##3", (float*)&color, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | misc_flags);
|
||||
ImGui::ColorEdit4("MyColor##3", (float*)&color, ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel | base_flags);
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Color/ColorButton (with custom Picker popup)");
|
||||
ImGui::Text("Color button with Custom Picker Popup:");
|
||||
@@ -2173,7 +2170,7 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
}
|
||||
|
||||
static ImVec4 backup_color;
|
||||
bool open_popup = ImGui::ColorButton("MyColor##3b", color, misc_flags);
|
||||
bool open_popup = ImGui::ColorButton("MyColor##3b", color, base_flags);
|
||||
ImGui::SameLine(0, ImGui::GetStyle().ItemInnerSpacing.x);
|
||||
open_popup |= ImGui::Button("Palette");
|
||||
if (open_popup)
|
||||
@@ -2185,7 +2182,7 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
{
|
||||
ImGui::Text("MY CUSTOM COLOR PICKER WITH AN AMAZING PALETTE!");
|
||||
ImGui::Separator();
|
||||
ImGui::ColorPicker4("##picker", (float*)&color, misc_flags | ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoSmallPreview);
|
||||
ImGui::ColorPicker4("##picker", (float*)&color, base_flags | ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoSmallPreview);
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::BeginGroup(); // Lock X position
|
||||
@@ -2227,40 +2224,42 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
ImGui::Text("Color button only:");
|
||||
static bool no_border = false;
|
||||
ImGui::Checkbox("ImGuiColorEditFlags_NoBorder", &no_border);
|
||||
ImGui::ColorButton("MyColor##3c", *(ImVec4*)&color, misc_flags | (no_border ? ImGuiColorEditFlags_NoBorder : 0), ImVec2(80, 80));
|
||||
ImGui::ColorButton("MyColor##3c", *(ImVec4*)&color, base_flags | (no_border ? ImGuiColorEditFlags_NoBorder : 0), ImVec2(80, 80));
|
||||
|
||||
IMGUI_DEMO_MARKER("Widgets/Color/ColorPicker");
|
||||
ImGui::SeparatorText("Color picker");
|
||||
static bool alpha = true;
|
||||
static bool alpha_bar = true;
|
||||
static bool side_preview = true;
|
||||
|
||||
static bool ref_color = false;
|
||||
static ImVec4 ref_color_v(1.0f, 0.0f, 1.0f, 0.5f);
|
||||
static int display_mode = 0;
|
||||
static int picker_mode = 0;
|
||||
ImGui::Checkbox("With Alpha", &alpha);
|
||||
ImGui::Checkbox("With Alpha Bar", &alpha_bar);
|
||||
ImGui::Checkbox("With Side Preview", &side_preview);
|
||||
if (side_preview)
|
||||
static int display_mode = 0;
|
||||
static ImGuiColorEditFlags color_picker_flags = ImGuiColorEditFlags_AlphaBar;
|
||||
|
||||
ImGui::PushID("Color picker");
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_NoAlpha", &color_picker_flags, ImGuiColorEditFlags_NoAlpha);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_AlphaBar", &color_picker_flags, ImGuiColorEditFlags_AlphaBar);
|
||||
ImGui::CheckboxFlags("ImGuiColorEditFlags_NoSidePreview", &color_picker_flags, ImGuiColorEditFlags_NoSidePreview);
|
||||
if (color_picker_flags & ImGuiColorEditFlags_NoSidePreview)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("With Ref Color", &ref_color);
|
||||
if (ref_color)
|
||||
{
|
||||
ImGui::SameLine();
|
||||
ImGui::ColorEdit4("##RefColor", &ref_color_v.x, ImGuiColorEditFlags_NoInputs | misc_flags);
|
||||
ImGui::ColorEdit4("##RefColor", &ref_color_v.x, ImGuiColorEditFlags_NoInputs | base_flags);
|
||||
}
|
||||
}
|
||||
ImGui::Combo("Display Mode", &display_mode, "Auto/Current\0None\0RGB Only\0HSV Only\0Hex Only\0");
|
||||
|
||||
ImGui::Combo("Picker Mode", &picker_mode, "Auto/Current\0ImGuiColorEditFlags_PickerHueBar\0ImGuiColorEditFlags_PickerHueWheel\0");
|
||||
ImGui::SameLine(); HelpMarker("When not specified explicitly, user can right-click the picker to change mode.");
|
||||
|
||||
ImGui::Combo("Display Mode", &display_mode, "Auto/Current\0ImGuiColorEditFlags_NoInputs\0ImGuiColorEditFlags_DisplayRGB\0ImGuiColorEditFlags_DisplayHSV\0ImGuiColorEditFlags_DisplayHex\0");
|
||||
ImGui::SameLine(); HelpMarker(
|
||||
"ColorEdit defaults to displaying RGB inputs if you don't specify a display mode, "
|
||||
"but the user can change it with a right-click on those inputs.\n\nColorPicker defaults to displaying RGB+HSV+Hex "
|
||||
"if you don't specify a display mode.\n\nYou can change the defaults using SetColorEditOptions().");
|
||||
ImGui::SameLine(); HelpMarker("When not specified explicitly (Auto/Current mode), user can right-click the picker to change mode.");
|
||||
ImGuiColorEditFlags flags = misc_flags;
|
||||
if (!alpha) flags |= ImGuiColorEditFlags_NoAlpha; // This is by default if you call ColorPicker3() instead of ColorPicker4()
|
||||
if (alpha_bar) flags |= ImGuiColorEditFlags_AlphaBar;
|
||||
if (!side_preview) flags |= ImGuiColorEditFlags_NoSidePreview;
|
||||
|
||||
ImGuiColorEditFlags flags = base_flags | color_picker_flags;
|
||||
if (picker_mode == 1) flags |= ImGuiColorEditFlags_PickerHueBar;
|
||||
if (picker_mode == 2) flags |= ImGuiColorEditFlags_PickerHueWheel;
|
||||
if (display_mode == 1) flags |= ImGuiColorEditFlags_NoInputs; // Disable all RGB/HSV/Hex displays
|
||||
@@ -2289,6 +2288,7 @@ static void ShowDemoWindowWidgets(ImGuiDemoWindowData* demo_data)
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(w);
|
||||
ImGui::ColorPicker3("##MyColor##6", (float*)&color, ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoAlpha);
|
||||
ImGui::PopID();
|
||||
|
||||
// HSV encoded support (to avoid RGB<>HSV round trips and singularities when S==0 or V==0)
|
||||
static ImVec4 color_hsv(0.23f, 1.0f, 1.0f, 1.0f); // Stored as HSV!
|
||||
@@ -7408,6 +7408,8 @@ static void ShowDemoWindowInputs()
|
||||
ImGui::Text("Mouse down:");
|
||||
for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (ImGui::IsMouseDown(i)) { ImGui::SameLine(); ImGui::Text("b%d (%.02f secs)", i, io.MouseDownDuration[i]); }
|
||||
ImGui::Text("Mouse wheel: %.1f", io.MouseWheel);
|
||||
ImGui::Text("Mouse clicked count:");
|
||||
for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (io.MouseClickedCount[i] > 0) { ImGui::SameLine(); ImGui::Text("b%d: %d", i, io.MouseClickedCount[i]); }
|
||||
|
||||
// We iterate both legacy native range and named ImGuiKey ranges. This is a little unusual/odd but this allows
|
||||
// displaying the data for old/new backends.
|
||||
@@ -7966,7 +7968,7 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
ImGui::SliderFloat("FrameBorderSize", &style.FrameBorderSize, 0.0f, 1.0f, "%.0f");
|
||||
ImGui::SliderFloat("TabBorderSize", &style.TabBorderSize, 0.0f, 1.0f, "%.0f");
|
||||
ImGui::SliderFloat("TabBarBorderSize", &style.TabBarBorderSize, 0.0f, 2.0f, "%.0f");
|
||||
ImGui::SliderFloat("TabBarOverlineSize", &style.TabBarOverlineSize, 0.0f, 2.0f, "%.0f");
|
||||
ImGui::SliderFloat("TabBarOverlineSize", &style.TabBarOverlineSize, 0.0f, 3.0f, "%.0f");
|
||||
ImGui::SameLine(); HelpMarker("Overline is only drawn over the selected tab when ImGuiTabBarFlags_DrawSelectedOverline is set.");
|
||||
|
||||
ImGui::SeparatorText("Rounding");
|
||||
@@ -8046,9 +8048,9 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
||||
filter.Draw("Filter colors", ImGui::GetFontSize() * 16);
|
||||
|
||||
static ImGuiColorEditFlags alpha_flags = 0;
|
||||
if (ImGui::RadioButton("Opaque", alpha_flags == ImGuiColorEditFlags_None)) { alpha_flags = ImGuiColorEditFlags_None; } ImGui::SameLine();
|
||||
if (ImGui::RadioButton("Alpha", alpha_flags == ImGuiColorEditFlags_AlphaPreview)) { alpha_flags = ImGuiColorEditFlags_AlphaPreview; } ImGui::SameLine();
|
||||
if (ImGui::RadioButton("Both", alpha_flags == ImGuiColorEditFlags_AlphaPreviewHalf)) { alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf; } ImGui::SameLine();
|
||||
if (ImGui::RadioButton("Opaque", alpha_flags == ImGuiColorEditFlags_AlphaOpaque)) { alpha_flags = ImGuiColorEditFlags_AlphaOpaque; } ImGui::SameLine();
|
||||
if (ImGui::RadioButton("Alpha", alpha_flags == ImGuiColorEditFlags_None)) { alpha_flags = ImGuiColorEditFlags_None; } ImGui::SameLine();
|
||||
if (ImGui::RadioButton("Both", alpha_flags == ImGuiColorEditFlags_AlphaPreviewHalf)) { alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf; } ImGui::SameLine();
|
||||
HelpMarker(
|
||||
"In the color list:\n"
|
||||
"Left-click on color square to open color picker,\n"
|
||||
|
||||
83
3rdparty/imgui/src/imgui_draw.cpp
vendored
83
3rdparty/imgui/src/imgui_draw.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.7
|
||||
// dear imgui, v1.91.8
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
@@ -1669,8 +1669,7 @@ void ImDrawList::AddText(ImFont* font, float font_size, const ImVec2& pos, ImU32
|
||||
// Accept null ranges
|
||||
if (text_begin == text_end || text_begin[0] == 0)
|
||||
return;
|
||||
if (text_end == NULL)
|
||||
text_end = text_begin + strlen(text_begin);
|
||||
// No need to strlen() here: font->RenderText() will do it and may early out.
|
||||
|
||||
// Pull default font/size from the shared ImDrawListSharedData instance
|
||||
if (font == NULL)
|
||||
@@ -1693,7 +1692,7 @@ void ImDrawList::AddText(ImFont* font, float font_size, const ImVec2& pos, ImU32
|
||||
|
||||
void ImDrawList::AddText(const ImVec2& pos, ImU32 col, const char* text_begin, const char* text_end)
|
||||
{
|
||||
AddText(NULL, 0.0f, pos, col, text_begin, text_end);
|
||||
AddText(_Data->Font, _Data->FontSize, pos, col, text_begin, text_end);
|
||||
}
|
||||
|
||||
void ImDrawList::AddImage(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col)
|
||||
@@ -2375,8 +2374,8 @@ ImFontConfig::ImFontConfig()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
FontDataOwnedByAtlas = true;
|
||||
OversampleH = 2;
|
||||
OversampleV = 1;
|
||||
OversampleH = 0; // Auto == 1 or 2 depending on size
|
||||
OversampleV = 0; // Auto == 1
|
||||
GlyphMaxAdvanceX = FLT_MAX;
|
||||
RasterizerMultiply = 1.0f;
|
||||
RasterizerDensity = 1.0f;
|
||||
@@ -2521,6 +2520,7 @@ void ImFontAtlas::ClearTexData()
|
||||
void ImFontAtlas::ClearFonts()
|
||||
{
|
||||
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||
ClearInputData();
|
||||
Fonts.clear_delete();
|
||||
TexReady = false;
|
||||
}
|
||||
@@ -2573,8 +2573,7 @@ ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg)
|
||||
IM_ASSERT(!Locked && "Cannot modify a locked ImFontAtlas between NewFrame() and EndFrame/Render()!");
|
||||
IM_ASSERT(font_cfg->FontData != NULL && font_cfg->FontDataSize > 0);
|
||||
IM_ASSERT(font_cfg->SizePixels > 0.0f && "Is ImFontConfig struct correctly initialized?");
|
||||
IM_ASSERT(font_cfg->OversampleH > 0 && font_cfg->OversampleV > 0 && "Is ImFontConfig struct correctly initialized?");
|
||||
IM_ASSERT(font_cfg->RasterizerDensity > 0.0f);
|
||||
IM_ASSERT(font_cfg->RasterizerDensity > 0.0f && "Is ImFontConfig struct correctly initialized?");
|
||||
|
||||
// Create new font
|
||||
if (!font_cfg->MergeMode)
|
||||
@@ -2820,6 +2819,13 @@ void ImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[256], unsig
|
||||
*data = table[*data];
|
||||
}
|
||||
|
||||
void ImFontAtlasBuildGetOversampleFactors(const ImFontConfig* cfg, int* out_oversample_h, int* out_oversample_v)
|
||||
{
|
||||
// Automatically disable horizontal oversampling over size 36
|
||||
*out_oversample_h = (cfg->OversampleH != 0) ? cfg->OversampleH : (cfg->SizePixels * cfg->RasterizerDensity > 36.0f || cfg->PixelSnapH) ? 1 : 2;
|
||||
*out_oversample_v = (cfg->OversampleV != 0) ? cfg->OversampleV : 1;
|
||||
}
|
||||
|
||||
#ifdef IMGUI_ENABLE_STB_TRUETYPE
|
||||
// Temporary data for one source font (multiple source fonts can be merged into one destination ImFont)
|
||||
// (C++03 doesn't allow instancing ImVector<> with function-local types so we declare the type here.)
|
||||
@@ -2985,15 +2991,19 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
||||
buf_rects_out_n += src_tmp.GlyphsCount;
|
||||
buf_packedchars_out_n += src_tmp.GlyphsCount;
|
||||
|
||||
// Convert our ranges in the format stb_truetype wants
|
||||
// Automatic selection of oversampling parameters
|
||||
ImFontConfig& cfg = atlas->ConfigData[src_i];
|
||||
int oversample_h, oversample_v;
|
||||
ImFontAtlasBuildGetOversampleFactors(&cfg, &oversample_h, &oversample_v);
|
||||
|
||||
// Convert our ranges in the format stb_truetype wants
|
||||
src_tmp.PackRange.font_size = cfg.SizePixels * cfg.RasterizerDensity;
|
||||
src_tmp.PackRange.first_unicode_codepoint_in_range = 0;
|
||||
src_tmp.PackRange.array_of_unicode_codepoints = src_tmp.GlyphsList.Data;
|
||||
src_tmp.PackRange.num_chars = src_tmp.GlyphsList.Size;
|
||||
src_tmp.PackRange.chardata_for_range = src_tmp.PackedChars;
|
||||
src_tmp.PackRange.h_oversample = (unsigned char)cfg.OversampleH;
|
||||
src_tmp.PackRange.v_oversample = (unsigned char)cfg.OversampleV;
|
||||
src_tmp.PackRange.h_oversample = (unsigned char)oversample_h;
|
||||
src_tmp.PackRange.v_oversample = (unsigned char)oversample_v;
|
||||
|
||||
// Gather the sizes of all rectangles we will need to pack (this loop is based on stbtt_PackFontRangesGatherRects)
|
||||
const float scale = (cfg.SizePixels > 0.0f) ? stbtt_ScaleForPixelHeight(&src_tmp.FontInfo, cfg.SizePixels * cfg.RasterizerDensity) : stbtt_ScaleForMappingEmToPixels(&src_tmp.FontInfo, -cfg.SizePixels * cfg.RasterizerDensity);
|
||||
@@ -3002,9 +3012,9 @@ static bool ImFontAtlasBuildWithStbTruetype(ImFontAtlas* atlas)
|
||||
int x0, y0, x1, y1;
|
||||
const int glyph_index_in_font = stbtt_FindGlyphIndex(&src_tmp.FontInfo, src_tmp.GlyphsList[glyph_i]);
|
||||
IM_ASSERT(glyph_index_in_font != 0);
|
||||
stbtt_GetGlyphBitmapBoxSubpixel(&src_tmp.FontInfo, glyph_index_in_font, scale * cfg.OversampleH, scale * cfg.OversampleV, 0, 0, &x0, &y0, &x1, &y1);
|
||||
src_tmp.Rects[glyph_i].w = (stbrp_coord)(x1 - x0 + pack_padding + cfg.OversampleH - 1);
|
||||
src_tmp.Rects[glyph_i].h = (stbrp_coord)(y1 - y0 + pack_padding + cfg.OversampleV - 1);
|
||||
stbtt_GetGlyphBitmapBoxSubpixel(&src_tmp.FontInfo, glyph_index_in_font, scale * oversample_h, scale * oversample_v, 0, 0, &x0, &y0, &x1, &y1);
|
||||
src_tmp.Rects[glyph_i].w = (stbrp_coord)(x1 - x0 + pack_padding + oversample_h - 1);
|
||||
src_tmp.Rects[glyph_i].h = (stbrp_coord)(y1 - y0 + pack_padding + oversample_v - 1);
|
||||
total_surface += src_tmp.Rects[glyph_i].w * src_tmp.Rects[glyph_i].h;
|
||||
}
|
||||
}
|
||||
@@ -3689,7 +3699,7 @@ ImFont::ImFont()
|
||||
Scale = 1.0f;
|
||||
Ascent = Descent = 0.0f;
|
||||
MetricsTotalSurface = 0;
|
||||
memset(Used4kPagesMap, 0, sizeof(Used4kPagesMap));
|
||||
memset(Used8kPagesMap, 0, sizeof(Used8kPagesMap));
|
||||
}
|
||||
|
||||
ImFont::~ImFont()
|
||||
@@ -3709,7 +3719,7 @@ void ImFont::ClearOutputData()
|
||||
DirtyLookupTables = true;
|
||||
Ascent = Descent = 0.0f;
|
||||
MetricsTotalSurface = 0;
|
||||
memset(Used4kPagesMap, 0, sizeof(Used4kPagesMap));
|
||||
memset(Used8kPagesMap, 0, sizeof(Used8kPagesMap));
|
||||
}
|
||||
|
||||
static ImWchar FindFirstExistingGlyph(ImFont* font, const ImWchar* candidate_chars, int candidate_chars_count)
|
||||
@@ -3732,17 +3742,17 @@ void ImFont::BuildLookupTable()
|
||||
IndexAdvanceX.clear();
|
||||
IndexLookup.clear();
|
||||
DirtyLookupTables = false;
|
||||
memset(Used4kPagesMap, 0, sizeof(Used4kPagesMap));
|
||||
memset(Used8kPagesMap, 0, sizeof(Used8kPagesMap));
|
||||
GrowIndex(max_codepoint + 1);
|
||||
for (int i = 0; i < Glyphs.Size; i++)
|
||||
{
|
||||
int codepoint = (int)Glyphs[i].Codepoint;
|
||||
IndexAdvanceX[codepoint] = Glyphs[i].AdvanceX;
|
||||
IndexLookup[codepoint] = (ImWchar)i;
|
||||
IndexLookup[codepoint] = (ImU16)i;
|
||||
|
||||
// Mark 4K page as used
|
||||
const int page_n = codepoint / 4096;
|
||||
Used4kPagesMap[page_n >> 3] |= 1 << (page_n & 7);
|
||||
const int page_n = codepoint / 8192;
|
||||
Used8kPagesMap[page_n >> 3] |= 1 << (page_n & 7);
|
||||
}
|
||||
|
||||
// Create a glyph to handle TAB
|
||||
@@ -3756,7 +3766,7 @@ void ImFont::BuildLookupTable()
|
||||
tab_glyph.Codepoint = '\t';
|
||||
tab_glyph.AdvanceX *= IM_TABSIZE;
|
||||
IndexAdvanceX[(int)tab_glyph.Codepoint] = (float)tab_glyph.AdvanceX;
|
||||
IndexLookup[(int)tab_glyph.Codepoint] = (ImWchar)(Glyphs.Size - 1);
|
||||
IndexLookup[(int)tab_glyph.Codepoint] = (ImU16)(Glyphs.Size - 1);
|
||||
}
|
||||
|
||||
// Mark special glyphs as not visible (note that AddGlyph already mark as non-visible glyphs with zero-size polygons)
|
||||
@@ -3804,15 +3814,15 @@ void ImFont::BuildLookupTable()
|
||||
}
|
||||
}
|
||||
|
||||
// API is designed this way to avoid exposing the 4K page size
|
||||
// API is designed this way to avoid exposing the 8K page size
|
||||
// e.g. use with IsGlyphRangeUnused(0, 255)
|
||||
bool ImFont::IsGlyphRangeUnused(unsigned int c_begin, unsigned int c_last)
|
||||
{
|
||||
unsigned int page_begin = (c_begin / 4096);
|
||||
unsigned int page_last = (c_last / 4096);
|
||||
unsigned int page_begin = (c_begin / 8192);
|
||||
unsigned int page_last = (c_last / 8192);
|
||||
for (unsigned int page_n = page_begin; page_n <= page_last; page_n++)
|
||||
if ((page_n >> 3) < sizeof(Used4kPagesMap))
|
||||
if (Used4kPagesMap[page_n >> 3] & (1 << (page_n & 7)))
|
||||
if ((page_n >> 3) < sizeof(Used8kPagesMap))
|
||||
if (Used8kPagesMap[page_n >> 3] & (1 << (page_n & 7)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -3829,7 +3839,7 @@ void ImFont::GrowIndex(int new_size)
|
||||
if (new_size <= IndexLookup.Size)
|
||||
return;
|
||||
IndexAdvanceX.resize(new_size, -1.0f);
|
||||
IndexLookup.resize(new_size, (ImWchar)-1);
|
||||
IndexLookup.resize(new_size, (ImU16)-1);
|
||||
}
|
||||
|
||||
// x0/y0/x1/y1 are offset from the character upper-left layout position, in pixels. Therefore x0/y0 are often fairly close to zero.
|
||||
@@ -3872,6 +3882,7 @@ void ImFont::AddGlyph(const ImFontConfig* cfg, ImWchar codepoint, float x0, floa
|
||||
glyph.U1 = u1;
|
||||
glyph.V1 = v1;
|
||||
glyph.AdvanceX = advance_x;
|
||||
IM_ASSERT(Glyphs.Size < 0xFFFF); // IndexLookup[] hold 16-bit values and -1 is reserved.
|
||||
|
||||
// Compute rough surface usage metrics (+1 to account for average padding, +0.99 to round)
|
||||
// We use (U1-U0)*TexWidth instead of X1-X0 to account for oversampling.
|
||||
@@ -3885,13 +3896,13 @@ void ImFont::AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst)
|
||||
IM_ASSERT(IndexLookup.Size > 0); // Currently this can only be called AFTER the font has been built, aka after calling ImFontAtlas::GetTexDataAs*() function.
|
||||
unsigned int index_size = (unsigned int)IndexLookup.Size;
|
||||
|
||||
if (dst < index_size && IndexLookup.Data[dst] == (ImWchar)-1 && !overwrite_dst) // 'dst' already exists
|
||||
if (dst < index_size && IndexLookup.Data[dst] == (ImU16)-1 && !overwrite_dst) // 'dst' already exists
|
||||
return;
|
||||
if (src >= index_size && dst >= index_size) // both 'dst' and 'src' don't exist -> no-op
|
||||
return;
|
||||
|
||||
GrowIndex(dst + 1);
|
||||
IndexLookup[dst] = (src < index_size) ? IndexLookup.Data[src] : (ImWchar)-1;
|
||||
IndexLookup[dst] = (src < index_size) ? IndexLookup.Data[src] : (ImU16)-1;
|
||||
IndexAdvanceX[dst] = (src < index_size) ? IndexAdvanceX.Data[src] : 1.0f;
|
||||
}
|
||||
|
||||
@@ -3900,8 +3911,8 @@ const ImFontGlyph* ImFont::FindGlyph(ImWchar c)
|
||||
{
|
||||
if (c >= (size_t)IndexLookup.Size)
|
||||
return FallbackGlyph;
|
||||
const ImWchar i = IndexLookup.Data[c];
|
||||
if (i == (ImWchar)-1)
|
||||
const ImU16 i = IndexLookup.Data[c];
|
||||
if (i == (ImU16)-1)
|
||||
return FallbackGlyph;
|
||||
return &Glyphs.Data[i];
|
||||
}
|
||||
@@ -3910,8 +3921,8 @@ const ImFontGlyph* ImFont::FindGlyphNoFallback(ImWchar c)
|
||||
{
|
||||
if (c >= (size_t)IndexLookup.Size)
|
||||
return NULL;
|
||||
const ImWchar i = IndexLookup.Data[c];
|
||||
if (i == (ImWchar)-1)
|
||||
const ImU16 i = IndexLookup.Data[c];
|
||||
if (i == (ImU16)-1)
|
||||
return NULL;
|
||||
return &Glyphs.Data[i];
|
||||
}
|
||||
@@ -4125,15 +4136,15 @@ void ImFont::RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, Im
|
||||
// Note: as with every ImDrawList drawing function, this expects that the font atlas texture is bound.
|
||||
void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width, bool cpu_fine_clip)
|
||||
{
|
||||
if (!text_end)
|
||||
text_end = text_begin + strlen(text_begin); // ImGui:: functions generally already provides a valid text_end, so this is merely to handle direct calls.
|
||||
|
||||
// Align to be pixel perfect
|
||||
float x = IM_TRUNC(pos.x);
|
||||
float y = IM_TRUNC(pos.y);
|
||||
if (y > clip_rect.w)
|
||||
return;
|
||||
|
||||
if (!text_end)
|
||||
text_end = text_begin + strlen(text_begin); // ImGui:: functions generally already provides a valid text_end, so this is merely to handle direct calls.
|
||||
|
||||
const float scale = size / FontSize;
|
||||
const float line_height = FontSize * scale;
|
||||
const float origin_x = x;
|
||||
|
||||
10
3rdparty/imgui/src/imgui_freetype.cpp
vendored
10
3rdparty/imgui/src/imgui_freetype.cpp
vendored
@@ -33,7 +33,7 @@
|
||||
// - For correct results you need to be using sRGB and convert to linear space in the pixel shader output.
|
||||
// - The default dear imgui styles will be impacted by this change (alpha values will need tweaking).
|
||||
|
||||
// FIXME: cfg.OversampleH, OversampleV are not supported (but perhaps not so necessary with this rasterizer).
|
||||
// FIXME: cfg.OversampleH, OversampleV are not supported, but generally not necessary with this rasterizer because Hinting makes everything look better.
|
||||
|
||||
#include "imgui.h"
|
||||
#ifndef IMGUI_DISABLE
|
||||
@@ -104,6 +104,9 @@ static FT_Error ImGuiLunasvgPortPresetSlot(FT_GlyphSlot slot, FT_Bool cache, FT_
|
||||
// Code
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#define FT_CEIL(X) (((X + 63) & -64) / 64) // From SDL_ttf: Handy routines for converting from fixed point
|
||||
#define FT_SCALEFACTOR 64.0f
|
||||
|
||||
namespace
|
||||
{
|
||||
// Glyph metrics:
|
||||
@@ -182,9 +185,6 @@ namespace
|
||||
float InvRasterizationDensity;
|
||||
};
|
||||
|
||||
// From SDL_ttf: Handy routines for converting from fixed point
|
||||
#define FT_CEIL(X) (((X + 63) & -64) / 64)
|
||||
|
||||
bool FreeTypeFont::InitFont(FT_Library ft_library, const ImFontConfig& cfg, unsigned int extra_font_builder_flags)
|
||||
{
|
||||
FT_Error error = FT_New_Memory_Face(ft_library, (uint8_t*)cfg.FontData, (uint32_t)cfg.FontDataSize, (uint32_t)cfg.FontNo, &Face);
|
||||
@@ -316,7 +316,7 @@ namespace
|
||||
out_glyph_info->Height = (int)ft_bitmap->rows;
|
||||
out_glyph_info->OffsetX = Face->glyph->bitmap_left;
|
||||
out_glyph_info->OffsetY = -Face->glyph->bitmap_top;
|
||||
out_glyph_info->AdvanceX = (float)FT_CEIL(slot->advance.x);
|
||||
out_glyph_info->AdvanceX = (float)slot->advance.x / FT_SCALEFACTOR;
|
||||
out_glyph_info->IsColored = (ft_bitmap->pixel_mode == FT_PIXEL_MODE_BGRA);
|
||||
|
||||
return ft_bitmap;
|
||||
|
||||
10
3rdparty/imgui/src/imgui_tables.cpp
vendored
10
3rdparty/imgui/src/imgui_tables.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.7
|
||||
// dear imgui, v1.91.8
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
@@ -374,6 +374,7 @@ bool ImGui::BeginTableEx(const char* name, ImGuiID id, int columns_count, ImG
|
||||
table->ColumnsCount = columns_count;
|
||||
table->IsLayoutLocked = false;
|
||||
table->InnerWidth = inner_width;
|
||||
table->NavLayer = (ImS8)outer_window->DC.NavLayerCurrent;
|
||||
temp_data->UserOuterSize = outer_size;
|
||||
|
||||
// Instance data (for instance 0, TableID == TableInstanceID)
|
||||
@@ -1050,7 +1051,8 @@ void ImGui::TableUpdateLayout(ImGuiTable* table)
|
||||
const int column_n = table->DisplayOrderToIndex[order_n];
|
||||
ImGuiTableColumn* column = &table->Columns[column_n];
|
||||
|
||||
column->NavLayerCurrent = (ImS8)(table->FreezeRowsCount > 0 ? ImGuiNavLayer_Menu : ImGuiNavLayer_Main); // Use Count NOT request so Header line changes layer when frozen
|
||||
// Initial nav layer: using FreezeRowsCount, NOT FreezeRowsRequest, so Header line changes layer when frozen
|
||||
column->NavLayerCurrent = (ImS8)(table->FreezeRowsCount > 0 ? ImGuiNavLayer_Menu : (ImGuiNavLayer)table->NavLayer);
|
||||
|
||||
if (offset_x_frozen && table->FreezeColumnsCount == visible_n)
|
||||
{
|
||||
@@ -1493,7 +1495,7 @@ void ImGui::EndTable()
|
||||
if (inner_window != outer_window)
|
||||
{
|
||||
short backup_nav_layers_active_mask = inner_window->DC.NavLayersActiveMask;
|
||||
inner_window->DC.NavLayersActiveMask |= 1 << ImGuiNavLayer_Main; // So empty table don't appear to navigate differently.
|
||||
inner_window->DC.NavLayersActiveMask |= 1 << table->NavLayer; // So empty table don't appear to navigate differently.
|
||||
g.CurrentTable = NULL; // To avoid error recovery recursing
|
||||
EndChild();
|
||||
g.CurrentTable = table;
|
||||
@@ -2032,7 +2034,7 @@ void ImGui::TableEndRow(ImGuiTable* table)
|
||||
if (unfreeze_rows_request)
|
||||
{
|
||||
for (int column_n = 0; column_n < table->ColumnsCount; column_n++)
|
||||
table->Columns[column_n].NavLayerCurrent = ImGuiNavLayer_Main;
|
||||
table->Columns[column_n].NavLayerCurrent = table->NavLayer;
|
||||
const float y0 = ImMax(table->RowPosY2 + 1, table->InnerClipRect.Min.y);
|
||||
table_instance->LastFrozenHeight = y0 - table->OuterRect.Min.y;
|
||||
|
||||
|
||||
217
3rdparty/imgui/src/imgui_widgets.cpp
vendored
217
3rdparty/imgui/src/imgui_widgets.cpp
vendored
@@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.7
|
||||
// dear imgui, v1.91.8
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
@@ -909,15 +909,17 @@ ImGuiID ImGui::GetWindowScrollbarID(ImGuiWindow* window, ImGuiAxis axis)
|
||||
// Return scrollbar rectangle, must only be called for corresponding axis if window->ScrollbarX/Y is set.
|
||||
ImRect ImGui::GetWindowScrollbarRect(ImGuiWindow* window, ImGuiAxis axis)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
const ImRect outer_rect = window->Rect();
|
||||
const ImRect inner_rect = window->InnerRect;
|
||||
const float border_size = window->WindowBorderSize;
|
||||
const float scrollbar_size = window->ScrollbarSizes[axis ^ 1]; // (ScrollbarSizes.x = width of Y scrollbar; ScrollbarSizes.y = height of X scrollbar)
|
||||
IM_ASSERT(scrollbar_size > 0.0f);
|
||||
const float border_size = IM_ROUND(window->WindowBorderSize * 0.5f);
|
||||
const float border_top = (window->Flags & ImGuiWindowFlags_MenuBar) ? IM_ROUND(g.Style.FrameBorderSize * 0.5f) : 0.0f;
|
||||
if (axis == ImGuiAxis_X)
|
||||
return ImRect(inner_rect.Min.x, ImMax(outer_rect.Min.y, outer_rect.Max.y - border_size - scrollbar_size), inner_rect.Max.x - border_size, outer_rect.Max.y - border_size);
|
||||
return ImRect(inner_rect.Min.x + border_size, ImMax(outer_rect.Min.y + border_size, outer_rect.Max.y - border_size - scrollbar_size), inner_rect.Max.x - border_size, outer_rect.Max.y - border_size);
|
||||
else
|
||||
return ImRect(ImMax(outer_rect.Min.x, outer_rect.Max.x - border_size - scrollbar_size), inner_rect.Min.y, outer_rect.Max.x - border_size, inner_rect.Max.y - border_size);
|
||||
return ImRect(ImMax(outer_rect.Min.x, outer_rect.Max.x - border_size - scrollbar_size), inner_rect.Min.y + border_top, outer_rect.Max.x - border_size, inner_rect.Max.y - border_size);
|
||||
}
|
||||
|
||||
void ImGui::Scrollbar(ImGuiAxis axis)
|
||||
@@ -4244,6 +4246,23 @@ void ImGuiInputTextCallbackData::InsertChars(int pos, const char* new_text, cons
|
||||
BufTextLen += new_text_len;
|
||||
}
|
||||
|
||||
void ImGui::PushPasswordFont()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImFont* in_font = g.Font;
|
||||
ImFont* out_font = &g.InputTextPasswordFont;
|
||||
const ImFontGlyph* glyph = in_font->FindGlyph('*');
|
||||
out_font->FontSize = in_font->FontSize;
|
||||
out_font->Scale = in_font->Scale;
|
||||
out_font->Ascent = in_font->Ascent;
|
||||
out_font->Descent = in_font->Descent;
|
||||
out_font->ContainerAtlas = in_font->ContainerAtlas;
|
||||
out_font->FallbackGlyph = glyph;
|
||||
out_font->FallbackAdvanceX = glyph->AdvanceX;
|
||||
IM_ASSERT(out_font->Glyphs.Size == 0 && out_font->IndexAdvanceX.Size == 0 && out_font->IndexLookup.Size == 0);
|
||||
PushFont(out_font);
|
||||
}
|
||||
|
||||
// Return false to discard a character.
|
||||
static bool InputTextFilterCharacter(ImGuiContext* ctx, unsigned int* p_char, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data, bool input_source_is_clipboard)
|
||||
{
|
||||
@@ -4654,19 +4673,7 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
|
||||
|
||||
// Password pushes a temporary font with only a fallback glyph
|
||||
if (is_password && !is_displaying_hint)
|
||||
{
|
||||
const ImFontGlyph* glyph = g.Font->FindGlyph('*');
|
||||
ImFont* password_font = &g.InputTextPasswordFont;
|
||||
password_font->FontSize = g.Font->FontSize;
|
||||
password_font->Scale = g.Font->Scale;
|
||||
password_font->Ascent = g.Font->Ascent;
|
||||
password_font->Descent = g.Font->Descent;
|
||||
password_font->ContainerAtlas = g.Font->ContainerAtlas;
|
||||
password_font->FallbackGlyph = glyph;
|
||||
password_font->FallbackAdvanceX = glyph->AdvanceX;
|
||||
IM_ASSERT(password_font->Glyphs.empty() && password_font->IndexAdvanceX.empty() && password_font->IndexLookup.empty());
|
||||
PushFont(password_font);
|
||||
}
|
||||
PushPasswordFont();
|
||||
|
||||
// Process mouse inputs and character inputs
|
||||
if (g.ActiveId == id)
|
||||
@@ -5902,7 +5909,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
|
||||
if ((flags & ImGuiColorEditFlags_NoLabel))
|
||||
Text("Current");
|
||||
|
||||
ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf | ImGuiColorEditFlags_NoTooltip;
|
||||
ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_AlphaMask_ | ImGuiColorEditFlags_NoTooltip;
|
||||
ColorButton("##current", col_v4, (flags & sub_flags_to_forward), ImVec2(square_sz * 3, square_sz * 2));
|
||||
if (ref_col != NULL)
|
||||
{
|
||||
@@ -5942,7 +5949,7 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
|
||||
if ((flags & ImGuiColorEditFlags_NoInputs) == 0)
|
||||
{
|
||||
PushItemWidth((alpha_bar ? bar1_pos_x : bar0_pos_x) + bars_width - picker_pos.x);
|
||||
ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags_DataTypeMask_ | ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoTooltip | ImGuiColorEditFlags_NoSmallPreview | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf;
|
||||
ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags_DataTypeMask_ | ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_AlphaMask_ | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoTooltip | ImGuiColorEditFlags_NoSmallPreview;
|
||||
ImGuiColorEditFlags sub_flags = (flags & sub_flags_to_forward) | ImGuiColorEditFlags_NoPicker;
|
||||
if (flags & ImGuiColorEditFlags_DisplayRGB || (flags & ImGuiColorEditFlags_DisplayMask_) == 0)
|
||||
if (ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_DisplayRGB))
|
||||
@@ -6118,8 +6125,8 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
|
||||
bool hovered, held;
|
||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held);
|
||||
|
||||
if (flags & ImGuiColorEditFlags_NoAlpha)
|
||||
flags &= ~(ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
if (flags & (ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaOpaque))
|
||||
flags &= ~(ImGuiColorEditFlags_AlphaNoBg | ImGuiColorEditFlags_AlphaPreviewHalf);
|
||||
|
||||
ImVec4 col_rgb = col;
|
||||
if (flags & ImGuiColorEditFlags_InputHSV)
|
||||
@@ -6138,14 +6145,17 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
|
||||
if ((flags & ImGuiColorEditFlags_AlphaPreviewHalf) && col_rgb.w < 1.0f)
|
||||
{
|
||||
float mid_x = IM_ROUND((bb_inner.Min.x + bb_inner.Max.x) * 0.5f);
|
||||
RenderColorRectWithAlphaCheckerboard(window->DrawList, ImVec2(bb_inner.Min.x + grid_step, bb_inner.Min.y), bb_inner.Max, GetColorU32(col_rgb), grid_step, ImVec2(-grid_step + off, off), rounding, ImDrawFlags_RoundCornersRight);
|
||||
if ((flags & ImGuiColorEditFlags_AlphaNoBg) == 0)
|
||||
RenderColorRectWithAlphaCheckerboard(window->DrawList, ImVec2(bb_inner.Min.x + grid_step, bb_inner.Min.y), bb_inner.Max, GetColorU32(col_rgb), grid_step, ImVec2(-grid_step + off, off), rounding, ImDrawFlags_RoundCornersRight);
|
||||
else
|
||||
window->DrawList->AddRectFilled(ImVec2(bb_inner.Min.x + grid_step, bb_inner.Min.y), bb_inner.Max, GetColorU32(col_rgb), rounding, ImDrawFlags_RoundCornersRight);
|
||||
window->DrawList->AddRectFilled(bb_inner.Min, ImVec2(mid_x, bb_inner.Max.y), GetColorU32(col_rgb_without_alpha), rounding, ImDrawFlags_RoundCornersLeft);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Because GetColorU32() multiplies by the global style Alpha and we don't want to display a checkerboard if the source code had no alpha
|
||||
ImVec4 col_source = (flags & ImGuiColorEditFlags_AlphaPreview) ? col_rgb : col_rgb_without_alpha;
|
||||
if (col_source.w < 1.0f)
|
||||
ImVec4 col_source = (flags & ImGuiColorEditFlags_AlphaOpaque) ? col_rgb_without_alpha : col_rgb;
|
||||
if (col_source.w < 1.0f && (flags & ImGuiColorEditFlags_AlphaNoBg) == 0)
|
||||
RenderColorRectWithAlphaCheckerboard(window->DrawList, bb_inner.Min, bb_inner.Max, GetColorU32(col_source), grid_step, ImVec2(off, off), rounding);
|
||||
else
|
||||
window->DrawList->AddRectFilled(bb_inner.Min, bb_inner.Max, GetColorU32(col_source), rounding);
|
||||
@@ -6175,7 +6185,7 @@ bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFl
|
||||
|
||||
// Tooltip
|
||||
if (!(flags & ImGuiColorEditFlags_NoTooltip) && hovered && IsItemHovered(ImGuiHoveredFlags_ForTooltip))
|
||||
ColorTooltip(desc_id, &col.x, flags & (ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf));
|
||||
ColorTooltip(desc_id, &col.x, flags & (ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_AlphaMask_));
|
||||
|
||||
return pressed;
|
||||
}
|
||||
@@ -6216,7 +6226,8 @@ void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags
|
||||
ImVec2 sz(g.FontSize * 3 + g.Style.FramePadding.y * 2, g.FontSize * 3 + g.Style.FramePadding.y * 2);
|
||||
ImVec4 cf(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
|
||||
int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]);
|
||||
ColorButton("##preview", cf, (flags & (ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf)) | ImGuiColorEditFlags_NoTooltip, sz);
|
||||
ImGuiColorEditFlags flags_to_forward = ImGuiColorEditFlags_InputMask_ | ImGuiColorEditFlags_AlphaMask_;
|
||||
ColorButton("##preview", cf, (flags & flags_to_forward) | ImGuiColorEditFlags_NoTooltip, sz);
|
||||
SameLine();
|
||||
if ((flags & ImGuiColorEditFlags_InputRGB) || !(flags & ImGuiColorEditFlags_InputMask_))
|
||||
{
|
||||
@@ -6937,13 +6948,9 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
||||
if (size_arg.x == 0.0f || (flags & ImGuiSelectableFlags_SpanAvailWidth))
|
||||
size.x = ImMax(label_size.x, max_x - min_x);
|
||||
|
||||
// Text stays at the submission position, but bounding box may be extended on both sides
|
||||
const ImVec2 text_min = pos;
|
||||
const ImVec2 text_max(min_x + size.x, pos.y + size.y);
|
||||
|
||||
// Selectables are meant to be tightly packed together with no click-gap, so we extend their box to cover spacing between selectable.
|
||||
// FIXME: Not part of layout so not included in clipper calculation, but ItemSize currently doesn't allow offsetting CursorPos.
|
||||
ImRect bb(min_x, pos.y, text_max.x, text_max.y);
|
||||
ImRect bb(min_x, pos.y, min_x + size.x, pos.y + size.y);
|
||||
if ((flags & ImGuiSelectableFlags_NoPadWithHalfSpacing) == 0)
|
||||
{
|
||||
const float spacing_x = span_all_columns ? 0.0f : style.ItemSpacing.x;
|
||||
@@ -7079,8 +7086,9 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
||||
PopColumnsBackground();
|
||||
}
|
||||
|
||||
// Text stays at the submission position. Alignment/clipping extents ignore SpanAllColumns.
|
||||
if (is_visible)
|
||||
RenderTextClipped(text_min, text_max, label, NULL, &label_size, style.SelectableTextAlign, &bb);
|
||||
RenderTextClipped(pos, ImVec2(window->WorkRect.Max.x, pos.y + size.y), label, NULL, &label_size, style.SelectableTextAlign, &bb);
|
||||
|
||||
// Automatically close popups
|
||||
if (pressed && (window->Flags & ImGuiWindowFlags_Popup) && !(flags & ImGuiSelectableFlags_NoAutoClosePopups) && (g.LastItemData.ItemFlags & ImGuiItemFlags_AutoClosePopups))
|
||||
@@ -8622,12 +8630,13 @@ bool ImGui::BeginMenuBar()
|
||||
|
||||
IM_ASSERT(!window->DC.MenuBarAppending);
|
||||
BeginGroup(); // Backup position on layer 0 // FIXME: Misleading to use a group for that backup/restore
|
||||
PushID("##menubar");
|
||||
PushID("##MenuBar");
|
||||
|
||||
// We don't clip with current window clipping rectangle as it is already set to the area below. However we clip with window full rect.
|
||||
// We remove 1 worth of rounding to Max.x to that text in long menus and small windows don't tend to display over the lower-right rounded area, which looks particularly glitchy.
|
||||
const float border_top = ImMax(window->WindowBorderSize * 0.5f - window->TitleBarHeight, 0.0f);
|
||||
ImRect bar_rect = window->MenuBarRect();
|
||||
ImRect clip_rect(IM_ROUND(bar_rect.Min.x + window->WindowBorderSize), IM_ROUND(bar_rect.Min.y + window->WindowBorderSize), IM_ROUND(ImMax(bar_rect.Min.x, bar_rect.Max.x - ImMax(window->WindowRounding, window->WindowBorderSize))), IM_ROUND(bar_rect.Max.y));
|
||||
ImRect clip_rect(IM_ROUND(bar_rect.Min.x + window->WindowBorderSize * 0.5f), IM_ROUND(bar_rect.Min.y + border_top), IM_ROUND(ImMax(bar_rect.Min.x, bar_rect.Max.x - ImMax(window->WindowRounding, window->WindowBorderSize * 0.5f))), IM_ROUND(bar_rect.Max.y));
|
||||
clip_rect.ClipWith(window->OuterRectClipped);
|
||||
PushClipRect(clip_rect.Min, clip_rect.Max, false);
|
||||
|
||||
@@ -8648,6 +8657,10 @@ void ImGui::EndMenuBar()
|
||||
return;
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
IM_MSVC_WARNING_SUPPRESS(6011); // Static Analysis false positive "warning C6011: Dereferencing NULL pointer 'window'"
|
||||
IM_ASSERT(window->Flags & ImGuiWindowFlags_MenuBar);
|
||||
IM_ASSERT(window->DC.MenuBarAppending);
|
||||
|
||||
// Nav: When a move request within one of our child menu failed, capture the request to navigate among our siblings.
|
||||
if (NavMoveRequestButNoResultYet() && (g.NavMoveDir == ImGuiDir_Left || g.NavMoveDir == ImGuiDir_Right) && (g.NavWindow->Flags & ImGuiWindowFlags_ChildMenu))
|
||||
{
|
||||
@@ -8674,9 +8687,6 @@ void ImGui::EndMenuBar()
|
||||
}
|
||||
}
|
||||
|
||||
IM_MSVC_WARNING_SUPPRESS(6011); // Static Analysis false positive "warning C6011: Dereferencing NULL pointer 'window'"
|
||||
IM_ASSERT(window->Flags & ImGuiWindowFlags_MenuBar);
|
||||
IM_ASSERT(window->DC.MenuBarAppending);
|
||||
PopClipRect();
|
||||
PopID();
|
||||
window->DC.MenuBarOffset.x = window->DC.CursorPos.x - window->Pos.x; // Save horizontal position so next append can reuse it. This is kinda equivalent to a per-layer CursorPos.
|
||||
@@ -8745,22 +8755,33 @@ bool ImGui::BeginMainMenuBar()
|
||||
float height = GetFrameHeight();
|
||||
bool is_open = BeginViewportSideBar("##MainMenuBar", viewport, ImGuiDir_Up, height, window_flags);
|
||||
g.NextWindowData.MenuBarOffsetMinVal = ImVec2(0.0f, 0.0f);
|
||||
|
||||
if (is_open)
|
||||
BeginMenuBar();
|
||||
else
|
||||
if (!is_open)
|
||||
{
|
||||
End();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Temporarily disable _NoSavedSettings, in the off-chance that tables or child windows submitted within the menu-bar may want to use settings. (#8356)
|
||||
g.CurrentWindow->Flags &= ~ImGuiWindowFlags_NoSavedSettings;
|
||||
BeginMenuBar();
|
||||
return is_open;
|
||||
}
|
||||
|
||||
void ImGui::EndMainMenuBar()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (!g.CurrentWindow->DC.MenuBarAppending)
|
||||
{
|
||||
IM_ASSERT_USER_ERROR(0, "Calling EndMainMenuBar() not from a menu-bar!"); // Not technically testing that it is the main menu bar
|
||||
return;
|
||||
}
|
||||
|
||||
EndMenuBar();
|
||||
g.CurrentWindow->Flags |= ImGuiWindowFlags_NoSavedSettings; // Restore _NoSavedSettings (#8356)
|
||||
|
||||
// When the user has left the menu layer (typically: closed menus through activation of an item), we restore focus to the previous window
|
||||
// FIXME: With this strategy we won't be able to restore a NULL focus.
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (g.CurrentWindow == g.NavWindow && g.NavLayer == ImGuiNavLayer_Main && !g.NavAnyRequest)
|
||||
if (g.CurrentWindow == g.NavWindow && g.NavLayer == ImGuiNavLayer_Main && !g.NavAnyRequest && g.ActiveId == 0)
|
||||
FocusTopMostWindowUnderOne(g.NavWindow, NULL, NULL, ImGuiFocusRequestFlags_UnlessBelowModal | ImGuiFocusRequestFlags_RestoreFocusedChild);
|
||||
|
||||
End();
|
||||
@@ -9921,7 +9942,7 @@ bool ImGui::BeginTabItem(const char* label, bool* p_open, ImGuiTabItemFlags f
|
||||
IM_ASSERT_USER_ERROR(tab_bar, "Needs to be called between BeginTabBar() and EndTabBar()!");
|
||||
return false;
|
||||
}
|
||||
IM_ASSERT(!(flags & ImGuiTabItemFlags_Button)); // BeginTabItem() Can't be used with button flags, use TabItemButton() instead!
|
||||
IM_ASSERT((flags & ImGuiTabItemFlags_Button) == 0); // BeginTabItem() Can't be used with button flags, use TabItemButton() instead!
|
||||
|
||||
bool ret = TabItemEx(tab_bar, label, p_open, flags, NULL);
|
||||
if (ret && !(flags & ImGuiTabItemFlags_NoPushId))
|
||||
@@ -9967,6 +9988,23 @@ bool ImGui::TabItemButton(const char* label, ImGuiTabItemFlags flags)
|
||||
return TabItemEx(tab_bar, label, NULL, flags | ImGuiTabItemFlags_Button | ImGuiTabItemFlags_NoReorder, NULL);
|
||||
}
|
||||
|
||||
void ImGui::TabItemSpacing(const char* str_id, ImGuiTabItemFlags flags, float width)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
if (window->SkipItems)
|
||||
return;
|
||||
|
||||
ImGuiTabBar* tab_bar = g.CurrentTabBar;
|
||||
if (tab_bar == NULL)
|
||||
{
|
||||
IM_ASSERT_USER_ERROR(tab_bar != NULL, "Needs to be called between BeginTabBar() and EndTabBar()!");
|
||||
return;
|
||||
}
|
||||
SetNextItemWidth(width);
|
||||
TabItemEx(tab_bar, str_id, NULL, flags | ImGuiTabItemFlags_Button | ImGuiTabItemFlags_NoReorder | ImGuiTabItemFlags_Invisible, NULL);
|
||||
}
|
||||
|
||||
bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open, ImGuiTabItemFlags flags, ImGuiWindow* docked_window)
|
||||
{
|
||||
// Layout whole tab bar if not already done
|
||||
@@ -10112,8 +10150,11 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
||||
ImGuiButtonFlags button_flags = ((is_tab_button ? ImGuiButtonFlags_PressedOnClickRelease : ImGuiButtonFlags_PressedOnClick) | ImGuiButtonFlags_AllowOverlap);
|
||||
if (g.DragDropActive)
|
||||
button_flags |= ImGuiButtonFlags_PressedOnDragDropHold;
|
||||
bool hovered, held;
|
||||
bool pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags);
|
||||
bool hovered, held, pressed;
|
||||
if (flags & ImGuiTabItemFlags_Invisible)
|
||||
hovered = held = pressed = false;
|
||||
else
|
||||
pressed = ButtonBehavior(bb, id, &hovered, &held, button_flags);
|
||||
if (pressed && !is_tab_button)
|
||||
TabBarQueueFocus(tab_bar, tab);
|
||||
|
||||
@@ -10145,36 +10186,59 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
||||
#endif
|
||||
|
||||
// Render tab shape
|
||||
ImDrawList* display_draw_list = window->DrawList;
|
||||
const ImU32 tab_col = GetColorU32((held || hovered) ? ImGuiCol_TabHovered : tab_contents_visible ? (tab_bar_focused ? ImGuiCol_TabSelected : ImGuiCol_TabDimmedSelected) : (tab_bar_focused ? ImGuiCol_Tab : ImGuiCol_TabDimmed));
|
||||
TabItemBackground(display_draw_list, bb, flags, tab_col);
|
||||
if (tab_contents_visible && (tab_bar->Flags & ImGuiTabBarFlags_DrawSelectedOverline) && style.TabBarOverlineSize > 0.0f)
|
||||
const bool is_visible = (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_Visible) && !(flags & ImGuiTabItemFlags_Invisible);
|
||||
if (is_visible)
|
||||
{
|
||||
float x_offset = IM_TRUNC(0.4f * style.TabRounding);
|
||||
if (x_offset < 2.0f * g.CurrentDpiScale)
|
||||
x_offset = 0.0f;
|
||||
float y_offset = 1.0f * g.CurrentDpiScale;
|
||||
display_draw_list->AddLine(bb.GetTL() + ImVec2(x_offset, y_offset), bb.GetTR() + ImVec2(-x_offset, y_offset), GetColorU32(tab_bar_focused ? ImGuiCol_TabSelectedOverline : ImGuiCol_TabDimmedSelectedOverline), style.TabBarOverlineSize);
|
||||
}
|
||||
RenderNavCursor(bb, id);
|
||||
ImDrawList* display_draw_list = window->DrawList;
|
||||
const ImU32 tab_col = GetColorU32((held || hovered) ? ImGuiCol_TabHovered : tab_contents_visible ? (tab_bar_focused ? ImGuiCol_TabSelected : ImGuiCol_TabDimmedSelected) : (tab_bar_focused ? ImGuiCol_Tab : ImGuiCol_TabDimmed));
|
||||
TabItemBackground(display_draw_list, bb, flags, tab_col);
|
||||
if (tab_contents_visible && (tab_bar->Flags & ImGuiTabBarFlags_DrawSelectedOverline) && style.TabBarOverlineSize > 0.0f)
|
||||
{
|
||||
// Might be moved to TabItemBackground() ?
|
||||
ImVec2 tl = bb.GetTL() + ImVec2(0, 1.0f * g.CurrentDpiScale);
|
||||
ImVec2 tr = bb.GetTR() + ImVec2(0, 1.0f * g.CurrentDpiScale);
|
||||
ImU32 overline_col = GetColorU32(tab_bar_focused ? ImGuiCol_TabSelectedOverline : ImGuiCol_TabDimmedSelectedOverline);
|
||||
if (style.TabRounding > 0.0f)
|
||||
{
|
||||
float rounding = style.TabRounding;
|
||||
display_draw_list->PathArcToFast(tl + ImVec2(+rounding, +rounding), rounding, 7, 9);
|
||||
display_draw_list->PathArcToFast(tr + ImVec2(-rounding, +rounding), rounding, 9, 11);
|
||||
display_draw_list->PathStroke(overline_col, 0, style.TabBarOverlineSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
display_draw_list->AddLine(tl - ImVec2(0.5f, 0.5f), tr - ImVec2(0.5f, 0.5f), overline_col, style.TabBarOverlineSize);
|
||||
}
|
||||
}
|
||||
RenderNavCursor(bb, id);
|
||||
|
||||
// Select with right mouse button. This is so the common idiom for context menu automatically highlight the current widget.
|
||||
const bool hovered_unblocked = IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup);
|
||||
if (tab_bar->SelectedTabId != tab->ID && hovered_unblocked && (IsMouseClicked(1) || IsMouseReleased(1)) && !is_tab_button)
|
||||
TabBarQueueFocus(tab_bar, tab);
|
||||
// Select with right mouse button. This is so the common idiom for context menu automatically highlight the current widget.
|
||||
const bool hovered_unblocked = IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup);
|
||||
if (tab_bar->SelectedTabId != tab->ID && hovered_unblocked && (IsMouseClicked(1) || IsMouseReleased(1)) && !is_tab_button)
|
||||
TabBarQueueFocus(tab_bar, tab);
|
||||
|
||||
if (tab_bar->Flags & ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)
|
||||
flags |= ImGuiTabItemFlags_NoCloseWithMiddleMouseButton;
|
||||
if (tab_bar->Flags & ImGuiTabBarFlags_NoCloseWithMiddleMouseButton)
|
||||
flags |= ImGuiTabItemFlags_NoCloseWithMiddleMouseButton;
|
||||
|
||||
// Render tab label, process close button
|
||||
const ImGuiID close_button_id = p_open ? GetIDWithSeed("#CLOSE", NULL, id) : 0;
|
||||
bool just_closed;
|
||||
bool text_clipped;
|
||||
TabItemLabelAndCloseButton(display_draw_list, bb, tab_just_unsaved ? (flags & ~ImGuiTabItemFlags_UnsavedDocument) : flags, tab_bar->FramePadding, label, id, close_button_id, tab_contents_visible, &just_closed, &text_clipped);
|
||||
if (just_closed && p_open != NULL)
|
||||
{
|
||||
*p_open = false;
|
||||
TabBarCloseTab(tab_bar, tab);
|
||||
// Render tab label, process close button
|
||||
const ImGuiID close_button_id = p_open ? GetIDWithSeed("#CLOSE", NULL, id) : 0;
|
||||
bool just_closed;
|
||||
bool text_clipped;
|
||||
TabItemLabelAndCloseButton(display_draw_list, bb, tab_just_unsaved ? (flags & ~ImGuiTabItemFlags_UnsavedDocument) : flags, tab_bar->FramePadding, label, id, close_button_id, tab_contents_visible, &just_closed, &text_clipped);
|
||||
if (just_closed && p_open != NULL)
|
||||
{
|
||||
*p_open = false;
|
||||
TabBarCloseTab(tab_bar, tab);
|
||||
}
|
||||
|
||||
// Tooltip
|
||||
// (Won't work over the close button because ItemOverlap systems messes up with HoveredIdTimer-> seems ok)
|
||||
// (We test IsItemHovered() to discard e.g. when another item is active or drag and drop over the tab bar, which g.HoveredId ignores)
|
||||
// FIXME: This is a mess.
|
||||
// FIXME: We may want disabled tab to still display the tooltip?
|
||||
if (text_clipped && g.HoveredId == id && !held)
|
||||
if (!(tab_bar->Flags & ImGuiTabBarFlags_NoTooltip) && !(tab->Flags & ImGuiTabItemFlags_NoTooltip))
|
||||
SetItemTooltip("%.*s", (int)(FindRenderedTextEnd(label) - label), label);
|
||||
}
|
||||
|
||||
// Restore main window position so user can draw there
|
||||
@@ -10182,15 +10246,6 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
|
||||
PopClipRect();
|
||||
window->DC.CursorPos = backup_main_cursor_pos;
|
||||
|
||||
// Tooltip
|
||||
// (Won't work over the close button because ItemOverlap systems messes up with HoveredIdTimer-> seems ok)
|
||||
// (We test IsItemHovered() to discard e.g. when another item is active or drag and drop over the tab bar, which g.HoveredId ignores)
|
||||
// FIXME: This is a mess.
|
||||
// FIXME: We may want disabled tab to still display the tooltip?
|
||||
if (text_clipped && g.HoveredId == id && !held)
|
||||
if (!(tab_bar->Flags & ImGuiTabBarFlags_NoTooltip) && !(tab->Flags & ImGuiTabItemFlags_NoTooltip))
|
||||
SetItemTooltip("%.*s", (int)(FindRenderedTextEnd(label) - label), label);
|
||||
|
||||
IM_ASSERT(!is_tab_button || !(tab_bar->SelectedTabId == tab->ID && is_tab_button)); // TabItemButton should not be selected
|
||||
if (is_tab_button)
|
||||
return pressed;
|
||||
|
||||
@@ -332,8 +332,9 @@ PAPX-90230:
|
||||
name-en: "Arc the Lad - Seirei no Tasogare - Premiere Disc [ShopDemo]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
PAPX-90231:
|
||||
name: "怪盗 スライ・クーパー [体験版]"
|
||||
name-sort: "かいとう すらいくーぱー [たいけんばん]"
|
||||
@@ -917,8 +918,9 @@ PCPX-96330:
|
||||
name-en: "Arc the Lad - Seirei no Tasogare - Premiere Disc [ShopTrial]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
PCPX-96554:
|
||||
name: "Games of Our Style - Tokyo Game Show 2003 Disc"
|
||||
name-sort: "げーむず おぶ あわー すたいる - とうきょう げーむしょう 2003 でぃすく"
|
||||
@@ -1379,8 +1381,9 @@ SCAJ-20019:
|
||||
name-en: "Arc the Lad - Twilight of the Spirits"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCAJ-20020:
|
||||
name: "Drag-on Dragoon"
|
||||
region: "NTSC-C-J"
|
||||
@@ -1465,11 +1468,12 @@ SCAJ-20037:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 1 # Corrects shadow misalignment.
|
||||
SCAJ-20038:
|
||||
name: "Arc the Lad - Twilight of the Spirits"
|
||||
region: "NTSC-Unk"
|
||||
name: "Arc the Lad - Jing Ling Zhi Huang Hun"
|
||||
region: "NTSC-C"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCAJ-20039:
|
||||
name: "Sidewinder V"
|
||||
region: "NTSC-Unk"
|
||||
@@ -1481,6 +1485,7 @@ SCAJ-20041:
|
||||
name: "Energy Airforce - Aim Strike!"
|
||||
region: "NTSC-Unk"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Alleviates color banding.
|
||||
autoFlush: 2 # Corrects post-processing effect on jet exhausts.
|
||||
SCAJ-20043:
|
||||
name: "Chain Dive"
|
||||
@@ -1840,6 +1845,8 @@ SCAJ-20108:
|
||||
region: "NTSC-Unk"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCAJ-20109:
|
||||
name: "Ratchet & Clank 3 - Up Your Arsenal"
|
||||
region: "NTSC-Unk"
|
||||
@@ -2660,8 +2667,9 @@ SCCS-40007:
|
||||
name-en: "Arc the Lad - Seirei no Tasogare"
|
||||
region: "NTSC-C"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCCS-40009:
|
||||
name: "龙珠二世"
|
||||
name-sort: "Longzhu Ershi"
|
||||
@@ -5329,8 +5337,9 @@ SCES-51910:
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCES-51920:
|
||||
name: "Forbidden Siren"
|
||||
region: "PAL-E"
|
||||
@@ -6948,8 +6957,9 @@ SCKA-20012:
|
||||
name: "Arc the Lad - Jeongryeongui Hwanghon"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCKA-20013:
|
||||
name: "SOCOM - U.S. Navy SEALs"
|
||||
region: "NTSC-K"
|
||||
@@ -8427,16 +8437,18 @@ SCPS-15040:
|
||||
name-en: "Arc the Lad - Twilight of the Spirits [Limited Edition]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCPS-15041:
|
||||
name: "アークザラッド 精霊の黄昏"
|
||||
name-sort: "あーくざらっど せいれいのたそがれ"
|
||||
name-en: "Arc the Lad - Twilight of the Spirits"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCPS-15042:
|
||||
name: "デカボイス [マイク同梱版]"
|
||||
name-sort: "でかぼいす [まいくどうこんばん]"
|
||||
@@ -8570,6 +8582,8 @@ SCPS-15058:
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCPS-15059:
|
||||
name: "みんなのGOLF 4"
|
||||
name-sort: "みんなのごるふ 4"
|
||||
@@ -10364,9 +10378,14 @@ SCPS-56016:
|
||||
gameFixes:
|
||||
- GIFFIFOHack
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes post processing position.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
estimateTextureRegion: 1 # Improves performance and reduces hash cache size.
|
||||
gpuPaletteConversion: 2 # Improves performance and reduces hash cache size.
|
||||
autoFlush: 1 # Corrects shadows (Currently still broken even with this).
|
||||
recommendedBlendingLevel: 4 # Fixes car shadows but addeds about 5000 barriers, might impact slower machines.
|
||||
gpuTargetCLUT: 2 # Fixes light flicker.
|
||||
getSkipCount: "GSC_DTGames"
|
||||
SCPS-72001:
|
||||
name: "GRAN TURISMO3 A-spec [MEGA HITS!]"
|
||||
name-sort: "ぐらんつーりすも3 A-spec [MEGA HITS!]"
|
||||
@@ -10992,8 +11011,9 @@ SCUS-97231:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCUS-97232:
|
||||
name: "The Getaway [Demo]"
|
||||
name-sort: "Getaway, The [Demo]"
|
||||
@@ -11210,8 +11230,9 @@ SCUS-97282:
|
||||
name: "Arc the Lad - Twilight of the Spirits [Demo]"
|
||||
region: "NTSC-U"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SCUS-97292:
|
||||
name: "Amplitude [Demo]"
|
||||
region: "NTSC-U"
|
||||
@@ -12935,6 +12956,7 @@ SLED-50117:
|
||||
region: "PAL-E"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -14651,6 +14673,7 @@ SLES-50383:
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -14660,6 +14683,7 @@ SLES-50384:
|
||||
region: "PAL-I"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -14669,6 +14693,7 @@ SLES-50385:
|
||||
region: "PAL-S"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -14697,6 +14722,10 @@ SLES-50396:
|
||||
SLES-50397:
|
||||
name: "Prisoner of War"
|
||||
region: "PAL-M5"
|
||||
speedHacks:
|
||||
instantVU1: 0 # Fixes NPCs getting stuck in place.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Fixes shading and shadow definition.
|
||||
SLES-50398:
|
||||
name: "UEFA Champions League"
|
||||
region: "PAL-M5"
|
||||
@@ -16553,6 +16582,7 @@ SLES-51203:
|
||||
- EETimingHack # Fixes various VIF errors.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # Improves banding.
|
||||
recommendedBlendingLevel: 4 # Fixes missing text brightness.
|
||||
SLES-51208:
|
||||
name: "Rocky"
|
||||
region: "PAL-M5"
|
||||
@@ -17970,7 +18000,8 @@ SLES-51824:
|
||||
name: "Colin McRae Rally '04"
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
alignSprite: 1 # Fixes vertical lines.
|
||||
halfPixelOffset: 4 # Fixes vertical lines and depth lines.
|
||||
autoFlush: 2 # Fixes sun intensity.
|
||||
SLES-51825:
|
||||
name: "Pop Idol"
|
||||
region: "PAL-E"
|
||||
@@ -18281,6 +18312,7 @@ SLES-51918:
|
||||
gsHWFixes:
|
||||
autoFlush: 2 # Reduces post-processing misalignment.
|
||||
halfPixelOffset: 4 # Reduces post-processing misalignment.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
SLES-51924:
|
||||
name: "World War Zero - Ironstorm"
|
||||
region: "PAL-M5"
|
||||
@@ -18754,6 +18786,8 @@ SLES-52132:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLES-52133:
|
||||
name: "Hitman - Contracts"
|
||||
region: "PAL-F"
|
||||
@@ -18762,6 +18796,8 @@ SLES-52133:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLES-52134:
|
||||
name: "Hitman - Contracts"
|
||||
region: "PAL-I"
|
||||
@@ -18771,6 +18807,8 @@ SLES-52134:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLES-52135:
|
||||
name: "Hitman - Contracts"
|
||||
region: "PAL-G"
|
||||
@@ -18779,6 +18817,8 @@ SLES-52135:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLES-52136:
|
||||
name: "Hitman - Contracts"
|
||||
region: "PAL-S"
|
||||
@@ -18787,6 +18827,8 @@ SLES-52136:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLES-52143:
|
||||
name: "Carmen Sandiego - The Secret of the Stolen Drums"
|
||||
region: "PAL-M4"
|
||||
@@ -18987,16 +19029,19 @@ SLES-52265:
|
||||
name: "Energy Airforce - Aim Strike!"
|
||||
region: "PAL-E"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Alleviates color banding.
|
||||
autoFlush: 2 # Corrects post-processing effect on jet exhausts.
|
||||
SLES-52266:
|
||||
name: "Energy Airforce - Aim Strike!"
|
||||
region: "PAL-F"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Alleviates color banding.
|
||||
autoFlush: 2 # Corrects post-processing effect on jet exhausts.
|
||||
SLES-52267:
|
||||
name: "Energy Airforce - Aim Strike!"
|
||||
region: "PAL-I"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Alleviates color banding.
|
||||
autoFlush: 2 # Corrects post-processing effect on jet exhausts.
|
||||
SLES-52275:
|
||||
name: "Way of the Samurai 2"
|
||||
@@ -19263,6 +19308,7 @@ SLES-52372:
|
||||
name: "Spider-Man 2"
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
@@ -19446,6 +19492,7 @@ SLES-52447:
|
||||
name: "Spider-Man 2"
|
||||
region: "PAL-I"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
@@ -19563,6 +19610,7 @@ SLES-52493:
|
||||
name: "Spider-Man 2"
|
||||
region: "PAL-E"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
@@ -22626,6 +22674,7 @@ SLES-53523:
|
||||
minimumBlendingLevel: 3 # Fixes broken light and shadow rendering.
|
||||
halfPixelOffset: 2 # Fixes misaligned bloom and character shadows.
|
||||
autoFlush: 1 # Fixes missing bloom intensity and alignment.
|
||||
nativeScaling: 2 # Helps fix offset blur and bloom on shadows and the UI.
|
||||
SLES-53524:
|
||||
name: "Mortal Kombat - Shaolin Monks"
|
||||
region: "PAL-M5"
|
||||
@@ -23160,6 +23209,9 @@ SLES-53645:
|
||||
name: "Knights of the Temple II"
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Improves shadow quality.
|
||||
autoFlush: 1 # Fixes light leaking and fire bloom intensity.
|
||||
SLES-53646:
|
||||
name: "World Racing 2"
|
||||
region: "PAL-M5"
|
||||
@@ -23172,6 +23224,7 @@ SLES-53647:
|
||||
minimumBlendingLevel: 3 # Fixes broken light and shadow rendering.
|
||||
halfPixelOffset: 2 # Fixes misaligned bloom and character shadows.
|
||||
autoFlush: 1 # Fixes missing bloom intensity and alignment.
|
||||
nativeScaling: 2 # Helps fix offset blur and bloom on shadows and the UI.
|
||||
SLES-53651:
|
||||
name: "WWII - Soldier"
|
||||
region: "PAL-E"
|
||||
@@ -23953,9 +24006,13 @@ SLES-53904:
|
||||
clampModes:
|
||||
vuClampMode: 0 # Fixes black artifacts on tracks
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes post processing position.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
estimateTextureRegion: 1 # Improves performance and reduces hash cache size.
|
||||
gpuPaletteConversion: 2 # Improves performance and reduces hash cache size.
|
||||
autoFlush: 1 # Corrects shadows (Currently still broken even with this).
|
||||
gpuTargetCLUT: 2 # Fixes light flicker.
|
||||
getSkipCount: "GSC_DTGames"
|
||||
SLES-53906:
|
||||
name: "50 Cent - Bulletproof"
|
||||
region: "PAL-F"
|
||||
@@ -24613,13 +24670,13 @@ SLES-54159:
|
||||
region: "PAL-M5"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes post processing misalignment.
|
||||
recommendedBlendingLevel: 3 # Improves reflection quality.
|
||||
recommendedBlendingLevel: 4 # Improves reflection quality and terrain lighting.
|
||||
SLES-54160:
|
||||
name: "Eragon"
|
||||
region: "PAL-R"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes post processing misalignment.
|
||||
recommendedBlendingLevel: 3 # Improves reflection quality.
|
||||
recommendedBlendingLevel: 4 # Improves reflection quality and terrain lighting.
|
||||
SLES-54161:
|
||||
name: "Super Dragon Ball Z"
|
||||
region: "PAL-E"
|
||||
@@ -24777,6 +24834,8 @@ SLES-54187:
|
||||
SLES-54188:
|
||||
name: "Nickelodeon Avatar - The Legend of Aang"
|
||||
region: "PAL-M4"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 3 # Fixes missing lighting and skin color.
|
||||
SLES-54193:
|
||||
name: "Carol Vorderman's Sudoku"
|
||||
region: "PAL-E"
|
||||
@@ -25933,6 +25992,9 @@ SLES-54590:
|
||||
name: "Hard Knock High"
|
||||
region: "PAL-E"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns post effects.
|
||||
nativeScaling: 1 # Fixes post effects.
|
||||
SLES-54591:
|
||||
name: "Special Forces"
|
||||
region: "PAL-E"
|
||||
@@ -25976,11 +26038,16 @@ SLES-54615:
|
||||
SLES-54616:
|
||||
name: "Fantastic Four - Rise of the Silver Surfer"
|
||||
region: "PAL-M5"
|
||||
speedHacks:
|
||||
eeCycleRate: 1 # Helps alleviate FPS drops during FMVs.
|
||||
gsHWFixes:
|
||||
roundSprite: 2 # Fixes edge depth bleeding during power attacks and misaligned bloom.
|
||||
nativeScaling: 1 # Fixes Post effect.
|
||||
SLES-54617:
|
||||
name: "Action Man A.T.O.M. - Alpha Teens on Machines"
|
||||
region: "PAL-M9"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Fixes depth line.
|
||||
SLES-54619:
|
||||
name: "Pinocchio"
|
||||
region: "PAL-M3"
|
||||
@@ -26192,9 +26259,9 @@ SLES-54674:
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Needed for post processing effects.
|
||||
halfPixelOffset: 4 # Fixes offset post processing.
|
||||
halfPixelOffset: 2 # Fixes offset post processing.
|
||||
autoFlush: 1 # Fixes bloom intensity.
|
||||
nativeScaling: 1 # Fixes post processing.
|
||||
nativeScaling: 2 # Fixes post processing.
|
||||
SLES-54675:
|
||||
name: "Street Warrior"
|
||||
region: "PAL-E"
|
||||
@@ -26497,8 +26564,11 @@ SLES-54774:
|
||||
SLES-54776:
|
||||
name: "Fantastic Four - Rise of the Silver Surfer"
|
||||
region: "PAL-E-I"
|
||||
speedHacks:
|
||||
eeCycleRate: 1 # Helps alleviate FPS drops during FMVs.
|
||||
gsHWFixes:
|
||||
roundSprite: 2 # Fixes edge depth bleeding during power attacks and misaligned bloom.
|
||||
nativeScaling: 1 # Fixes Post effect.
|
||||
SLES-54778:
|
||||
name: "Harry Potter and the Order of the Phoenix"
|
||||
region: "PAL-E"
|
||||
@@ -27211,6 +27281,8 @@ SLES-54997:
|
||||
gameFixes:
|
||||
- EETimingHack # Flickery textures.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLES-54998:
|
||||
name: "Mercenaries 2 - L'enfer des Favelas"
|
||||
@@ -27218,6 +27290,8 @@ SLES-54998:
|
||||
gameFixes:
|
||||
- EETimingHack # Flickery textures.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLES-54999:
|
||||
name: "Mercenaries 2 - Inferno di Fuoco"
|
||||
@@ -27225,6 +27299,8 @@ SLES-54999:
|
||||
gameFixes:
|
||||
- EETimingHack # Flickery textures.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLES-55000:
|
||||
name: "Mercenaries 2 - World in Flames"
|
||||
@@ -27232,6 +27308,8 @@ SLES-55000:
|
||||
gameFixes:
|
||||
- EETimingHack # Flickery textures.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLES-55001:
|
||||
name: "Mercenaries 2 - World in Flames"
|
||||
@@ -27239,6 +27317,8 @@ SLES-55001:
|
||||
gameFixes:
|
||||
- EETimingHack # Flickery textures.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLES-55002:
|
||||
name: "Need for Speed - ProStreet"
|
||||
@@ -27714,6 +27794,7 @@ SLES-55184:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55185:
|
||||
name: "Disney/Pixar WALL-E"
|
||||
region: "PAL-UK"
|
||||
@@ -27722,6 +27803,7 @@ SLES-55185:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55186:
|
||||
name: "Disney/Pixar WALL-E"
|
||||
region: "PAL-S-P"
|
||||
@@ -27730,6 +27812,7 @@ SLES-55186:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55187:
|
||||
name: "Disney/Pixar WALL-E"
|
||||
region: "PAL-F-G"
|
||||
@@ -27738,6 +27821,7 @@ SLES-55187:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55188:
|
||||
name: "Disney/Pixar WALL-E"
|
||||
region: "PAL-G"
|
||||
@@ -27746,6 +27830,7 @@ SLES-55188:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55189:
|
||||
name: "Nick Jr. Go Diego Go! Safari Rescue"
|
||||
region: "PAL-E-F"
|
||||
@@ -27773,6 +27858,7 @@ SLES-55193:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55194:
|
||||
name: "Disney/Pixar WALL-E"
|
||||
region: "PAL-SC"
|
||||
@@ -27781,6 +27867,7 @@ SLES-55194:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55195:
|
||||
name: "Disney/Pixar WALL-E"
|
||||
region: "PAL-GR-I"
|
||||
@@ -27789,6 +27876,7 @@ SLES-55195:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55196:
|
||||
name: "Disney/Pixar WALL-E"
|
||||
region: "PAL-PL-CR"
|
||||
@@ -27797,6 +27885,7 @@ SLES-55196:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLES-55197:
|
||||
name: "Dancing Stage SuperNOVA 2"
|
||||
region: "PAL-M5"
|
||||
@@ -28177,6 +28266,9 @@ SLES-55345:
|
||||
name: "007 - Quantum of Solace"
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Reduces bloom misalignment and fixes depth lines.
|
||||
nativeScaling: 2 # Fixes bloom intensity.
|
||||
SLES-55346:
|
||||
name: "Rugby League 2 - World Cup Edition"
|
||||
region: "PAL-E"
|
||||
@@ -29010,6 +29102,7 @@ SLES-82009:
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -29580,6 +29673,7 @@ SLKA-25032:
|
||||
- EETimingHack # Fixes various VIF errors.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # Improves banding.
|
||||
recommendedBlendingLevel: 4 # Fixes missing text brightness.
|
||||
SLKA-25033:
|
||||
name: "Gregory Horror Show"
|
||||
region: "NTSC-K"
|
||||
@@ -30147,9 +30241,10 @@ SLKA-25180:
|
||||
halfPixelOffset: 4 # Aligns post effects.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
SLKA-25181:
|
||||
name: "Energy Airforce Aim Strike"
|
||||
name: "Energy Airforce Aim Strike!"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Alleviates color banding.
|
||||
autoFlush: 2 # Corrects post-processing effect on jet exhausts.
|
||||
SLKA-25182:
|
||||
name: "Hajime no Ippo2 Victorious Road"
|
||||
@@ -30323,6 +30418,8 @@ SLKA-25218:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLKA-25219:
|
||||
name: "Monster Hunter G"
|
||||
region: "NTSC-K"
|
||||
@@ -31310,6 +31407,9 @@ SLKA-25441:
|
||||
SLKA-25442:
|
||||
name: "007 - Quantum of Solace"
|
||||
region: "NTSC-K"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Reduces bloom misalignment and fixes depth lines.
|
||||
nativeScaling: 2 # Fixes bloom intensity.
|
||||
SLKA-25443:
|
||||
name: "Musou Orochi Maou Sairin"
|
||||
region: "NTSC-K"
|
||||
@@ -31462,6 +31562,7 @@ SLKA-35001:
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -32085,6 +32186,8 @@ SLPM-55110:
|
||||
name-en: "Mercenaries 2 - World in Flames"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLPM-55112:
|
||||
name: "三國志11 with パワーアップキット"
|
||||
@@ -32278,6 +32381,9 @@ SLPM-55148:
|
||||
name-sort: "007 なぐさめのほうしゅう"
|
||||
name-en: "007 - Nagusame no Houshuu"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Reduces bloom misalignment and fixes depth lines.
|
||||
nativeScaling: 2 # Fixes bloom intensity.
|
||||
SLPM-55149:
|
||||
name: "ラブルートゼロ KissKiss☆ラビリンス [通常版]"
|
||||
name-sort: "らぶるーとぜろ きすきすらびりんす [つうじょうばん]"
|
||||
@@ -32662,6 +32768,8 @@ SLPM-55230:
|
||||
name-en: "Mercenaries 2 - World in Flames [EA:SY! 1980]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLPM-55231:
|
||||
name: "サイレントヒル シャッタードメモリーズ"
|
||||
@@ -34885,6 +34993,7 @@ SLPM-62043:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -39193,6 +39302,7 @@ SLPM-65077:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -39207,6 +39317,7 @@ SLPM-65078:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -40879,6 +40990,7 @@ SLPM-65374:
|
||||
instantVU1: 0 # Fixes hanging while going ingame.
|
||||
mtvu: 0
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Alleviates color banding.
|
||||
autoFlush: 2 # Corrects post-processing effect on jet exhausts.
|
||||
SLPM-65375:
|
||||
name: "真・三國無双3 & 真・三國無双3 猛将伝 [ディスク 1] [プレミアムパック]"
|
||||
@@ -42473,6 +42585,7 @@ SLPM-65662:
|
||||
name-en: "Spider-Man 2"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
@@ -43021,6 +43134,7 @@ SLPM-65754:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -45210,6 +45324,7 @@ SLPM-66121:
|
||||
name: "Spider-Man 2 [TAITO BEST]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
@@ -47654,6 +47769,7 @@ SLPM-66503:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -49419,6 +49535,7 @@ SLPM-66792:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -49430,6 +49547,7 @@ SLPM-66793:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -50560,6 +50678,7 @@ SLPM-67002:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -50604,6 +50723,7 @@ SLPM-67008:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -50745,6 +50865,7 @@ SLPM-67515:
|
||||
region: "NTSC-K"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -50978,6 +51099,7 @@ SLPM-68503:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -51527,6 +51649,7 @@ SLPM-74255:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -51538,6 +51661,7 @@ SLPM-74256:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -51840,6 +51964,7 @@ SLPM-74901:
|
||||
region: "NTSC-J"
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -54171,6 +54296,9 @@ SLPS-20474:
|
||||
name-sort: "しんぷる2000しりーず Vol.107 THE ほのおのかくとうばんちょう"
|
||||
name-en: "Simple 2000 Series Vol. 107 - The Honoo no Kakutou Banchou"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns post effects.
|
||||
nativeScaling: 1 # Fixes post effects.
|
||||
SLPS-20475:
|
||||
name: "山佐DigiワールドSP ジャイアントパルサー"
|
||||
name-sort: "やまさでじわーるどSP じゃいあんとぱるさー"
|
||||
@@ -55863,6 +55991,7 @@ SLPS-25254:
|
||||
- EETimingHack # Fixes various VIF errors.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # Improves banding.
|
||||
recommendedBlendingLevel: 4 # Fixes missing text brightness.
|
||||
SLPS-25255:
|
||||
name: "サイドワインダーV フライトBOX [特別限定版]"
|
||||
name-sort: "さいどわいんだーV ふらいとBOX [とくべつげんていばん]"
|
||||
@@ -56758,6 +56887,8 @@ SLPS-25406:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLPS-25407:
|
||||
name: "THE KING OF FIGHTERS 2003"
|
||||
name-sort: "ざ きんぐ おぶ ふぁいたーず2003"
|
||||
@@ -57659,6 +57790,8 @@ SLPS-25563:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLPS-25564:
|
||||
name: "Gallop Racer 8 - Live Horse Racing -"
|
||||
name-sort: "ぎゃろっぷ れーさー 8 らいゔほーすれーしんぐ"
|
||||
@@ -59454,9 +59587,9 @@ SLPS-25856:
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Needed for post processing effects.
|
||||
halfPixelOffset: 4 # Fixes offset post processing.
|
||||
halfPixelOffset: 2 # Fixes offset post processing.
|
||||
autoFlush: 1 # Fixes bloom intensity.
|
||||
nativeScaling: 1 # Fixes post processing.
|
||||
nativeScaling: 2 # Fixes post processing.
|
||||
SLPS-25858:
|
||||
name: "灼眼のシャナ [電撃SP]"
|
||||
name-sort: "しゃくがんのしゃな [でんげきSP]"
|
||||
@@ -59961,9 +60094,9 @@ SLPS-25946:
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Needed for post processing effects.
|
||||
halfPixelOffset: 4 # Fixes offset post processing.
|
||||
halfPixelOffset: 2 # Fixes offset post processing.
|
||||
autoFlush: 1 # Fixes bloom intensity.
|
||||
nativeScaling: 1 # Fixes post processing.
|
||||
nativeScaling: 2 # Fixes post processing.
|
||||
SLPS-25947:
|
||||
name: "サモンナイトグランテーゼ 滅びの剣と約束の騎士"
|
||||
name-sort: "さもんないとぐらんてーぜ ほろびのけんとやくそくのきし"
|
||||
@@ -61642,6 +61775,7 @@ SLUS-20144:
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -63150,6 +63284,7 @@ SLUS-20454:
|
||||
- EETimingHack # Fixes various VIF errors.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # Improves banding.
|
||||
recommendedBlendingLevel: 4 # Fixes missing text brightness.
|
||||
SLUS-20455:
|
||||
name: "F1 2002"
|
||||
region: "NTSC-U"
|
||||
@@ -63670,6 +63805,7 @@ SLUS-20554:
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -64887,6 +65023,7 @@ SLUS-20776:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
@@ -65423,6 +65560,8 @@ SLUS-20882:
|
||||
autoFlush: 1 # Fixes bloom rendering.
|
||||
roundModes:
|
||||
vu1RoundMode: 0 # Fixes missing light cones curtains and certain effects.
|
||||
speedHacks:
|
||||
instantVU1: 0 # Lowers overall system load.
|
||||
SLUS-20883:
|
||||
name: "Tom Clancy's Rainbow Six 3"
|
||||
region: "NTSC-U"
|
||||
@@ -66709,9 +66848,13 @@ SLUS-21095:
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes post processing position.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
estimateTextureRegion: 1 # Improves performance and reduces hash cache size.
|
||||
gpuPaletteConversion: 2 # Improves performance and reduces hash cache size.
|
||||
autoFlush: 1 # Corrects shadows (Currently still broken even with this).
|
||||
gpuTargetCLUT: 2 # Fixes light flicker.
|
||||
getSkipCount: "GSC_DTGames"
|
||||
SLUS-21096:
|
||||
name: "Ape Escape - Pumped & Primed"
|
||||
region: "NTSC-U"
|
||||
@@ -66978,6 +67121,7 @@ SLUS-21139:
|
||||
minimumBlendingLevel: 3 # Fixes broken light and shadow rendering.
|
||||
halfPixelOffset: 2 # Fixes misaligned bloom and character shadows.
|
||||
autoFlush: 1 # Fixes missing bloom intensity and alignment.
|
||||
nativeScaling: 2 # Helps fix offset blur and bloom on shadows and the UI.
|
||||
SLUS-21140:
|
||||
name: "Mobile Suit Gundam Seed - Never Ending Tomorrow"
|
||||
region: "NTSC-U"
|
||||
@@ -67112,6 +67256,8 @@ SLUS-21165:
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Fixes post processing alignment.
|
||||
nativeScaling: 1 # Fixes depth blur intensity.
|
||||
textureInsideRT: 1 # Fixes on screen garbage.
|
||||
SLUS-21166:
|
||||
name: "Full Metal Alchemist 2 - Curse of the Crimson Elixir"
|
||||
region: "NTSC-U"
|
||||
@@ -68207,7 +68353,7 @@ SLUS-21322:
|
||||
vuClampMode: 3 # Fixes SPS and spawn issues.
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes post processing misalignment.
|
||||
recommendedBlendingLevel: 3 # Improves reflection quality.
|
||||
recommendedBlendingLevel: 4 # Improves reflection quality and terrain lighting.
|
||||
SLUS-21323:
|
||||
name: "Rampage - Total Destruction"
|
||||
region: "NTSC-U"
|
||||
@@ -68717,6 +68863,8 @@ SLUS-21395:
|
||||
name: "Avatar - The Last Airbender"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 3 # Fixes missing lighting and skin color.
|
||||
SLUS-21396:
|
||||
name: "Star Trek - Encounters"
|
||||
region: "NTSC-U"
|
||||
@@ -69433,8 +69581,11 @@ SLUS-21544:
|
||||
name: "Fantastic 4 - Rise of Silver Surfer"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
speedHacks:
|
||||
eeCycleRate: 1 # Helps alleviate FPS drops during FMVs.
|
||||
gsHWFixes:
|
||||
roundSprite: 2 # Fixes edge depth bleeding during power attacks and misaligned bloom.
|
||||
nativeScaling: 1 # Fixes Post effect.
|
||||
SLUS-21545:
|
||||
name: "Pirates of the Caribbean - At World's End"
|
||||
region: "NTSC-U"
|
||||
@@ -69497,9 +69648,9 @@ SLUS-21555:
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
textureInsideRT: 1 # Needed for post processing effects.
|
||||
halfPixelOffset: 4 # Fixes offset post processing.
|
||||
halfPixelOffset: 2 # Fixes offset post processing.
|
||||
autoFlush: 1 # Fixes bloom intensity.
|
||||
nativeScaling: 1 # Fixes post processing.
|
||||
nativeScaling: 2 # Fixes post processing.
|
||||
SLUS-21556:
|
||||
name: "Konami Kids Playground - Dinosaur Shapes & Colors"
|
||||
region: "NTSC-U"
|
||||
@@ -70072,6 +70223,8 @@ SLUS-21650:
|
||||
gameFixes:
|
||||
- EETimingHack # Flickery textures.
|
||||
gsHWFixes:
|
||||
minimumBlendingLevel: 2 # General lighting improvement over basic blend.
|
||||
recommendedBlendingLevel: 4 # Further improves lighting on things like plants.
|
||||
nativeScaling: 1 # Fixes post lighting.
|
||||
SLUS-21651:
|
||||
name: "Noddy and the Magic Book"
|
||||
@@ -70507,6 +70660,7 @@ SLUS-21736:
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 4 # Aligns Post Effect.
|
||||
nativeScaling: 2 # Fixes Post effect.
|
||||
autoFlush: 1 # Fixes post lighting.
|
||||
SLUS-21737:
|
||||
name: "Riding Star"
|
||||
region: "NTSC-U"
|
||||
@@ -70824,10 +70978,12 @@ SLUS-21793:
|
||||
compat: 3
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Fixes post processing position.
|
||||
nativeScaling: 1 # Fixes post effects.
|
||||
nativeScaling: 2 # Fixes post effects.
|
||||
estimateTextureRegion: 1 # Improves performance and reduces hash cache size.
|
||||
gpuPaletteConversion: 2 # Improves performance and reduces hash cache size.
|
||||
autoFlush: 1 # Corrects shadows (Currently still broken even with this).
|
||||
gpuTargetCLUT: 2 # Fixes light flicker.
|
||||
getSkipCount: "GSC_DTGames"
|
||||
SLUS-21794:
|
||||
name: "Go, Diego, Go! Great Dinosaur Rescue"
|
||||
region: "NTSC-U"
|
||||
@@ -70933,6 +71089,9 @@ SLUS-21813:
|
||||
name: "007 - Quantum of Solace"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gsHWFixes:
|
||||
halfPixelOffset: 2 # Reduces bloom misalignment and fixes depth lines.
|
||||
nativeScaling: 2 # Fixes bloom intensity.
|
||||
SLUS-21814:
|
||||
name: "Disney - Think Fast"
|
||||
region: "NTSC-U"
|
||||
@@ -71816,6 +71975,7 @@ SLUS-29003:
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- InstantDMAHack # Fixes broken half-bottom artifacts.
|
||||
- BlitInternalFPSHack # Fixes internal FPS detection.
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes broken skin colour on Vlad and others.
|
||||
autoFlush: 1 # Fixes motion blur effect.
|
||||
@@ -72724,6 +72884,17 @@ TCPS-10068:
|
||||
name-sort: "でんしゃでごー りょじょうへん [こんとろーらどうこんせっと]"
|
||||
name-en: "Densha de Go! Ryojou-hen [with Controller]"
|
||||
region: "NTSC-J"
|
||||
TCPS-10073:
|
||||
name: "エナジーエアフォース エイムストライク!"
|
||||
name-sort: "えなじーえあふぉーす えいむすとらいく!"
|
||||
name-en: "Energy Airforce - Aim Strike! [TAITO 2002]"
|
||||
region: "NTSC-J"
|
||||
speedHacks:
|
||||
instantVU1: 0 # Fixes hanging while going ingame.
|
||||
mtvu: 0
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 5 # Alleviates color banding.
|
||||
autoFlush: 2 # Corrects post-processing effect on jet exhausts.
|
||||
TCPS-10074:
|
||||
name: "スペースインベーダー アニバーサリー [筐体型コントローラ同梱セット]"
|
||||
name-sort: "すぺーすいんべーだー あにばーさりー [きょうたいけいこんとろーらどうこんせっと]"
|
||||
@@ -72760,6 +72931,7 @@ TCPS-10092:
|
||||
name-en: "Spider-Man 2"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
@@ -72835,6 +73007,7 @@ TCPS-10127:
|
||||
name: "Spider-Man 2 [TAITO BEST]"
|
||||
region: "NTSC-J"
|
||||
gsHWFixes:
|
||||
recommendedBlendingLevel: 3 # Fixes missing water sheen.
|
||||
cpuSpriteRenderBW: 1 # Fixes textures.
|
||||
autoFlush: 2 # Fixes the position of the shadow and makes it not blocky.
|
||||
halfPixelOffset: 2 # Fixes shadows.
|
||||
|
||||
@@ -446,7 +446,6 @@
|
||||
03000000250900006688000000000000,MP-8866 Super Dual Box,a:b2,b:b1,back:b9,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:a2,righty:a3,start:b8,x:b3,y:b0,platform:Windows,
|
||||
03000000091200004488000000000000,MUSIA PlayStation 2 Input Display,a:b0,b:b2,back:b4,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b8,leftstick:b6,lefttrigger:b10,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:b11,rightx:a2,righty:a3,start:b5,x:b1,y:b3,platform:Windows,
|
||||
03000000f70600000100000000000000,N64 Adaptoid,+rightx:b2,+righty:b1,-rightx:b4,-righty:b5,a:b0,b:b3,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,platform:Windows,
|
||||
030000006f0e00001311000000000000,N64 Controller,+rightx:b10,+righty:b3,-rightx:b0,-righty:b11,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,platform:Windows,
|
||||
030000006b140000010c000000000000,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:Windows,
|
||||
030000006b1400001106000000000000,Nacon Revolution 3 PS4 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:a5,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
|
||||
0300000085320000170d000000000000,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:Windows,
|
||||
@@ -637,6 +636,7 @@
|
||||
030000000d0f0000ad00000000000000,RX Gamepad,a:b0,b:b4,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b3,rightshoulder:b6,start:b9,x:b2,y:b1,platform:Windows,
|
||||
030000008916000000fe000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
03000000c6240000045d000000000000,Sabertooth,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b8,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Windows,
|
||||
030000006f0e00001311000000000000,Saffun Controller,a:b2,b:b3,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:b1,y:b0,platform:Windows,
|
||||
03000000a30600001af5000000000000,Saitek Cyborg,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:a3,righty:a4,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000a306000023f6000000000000,Saitek Cyborg,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:a4,start:b9,x:b0,y:b3,platform:Windows,
|
||||
03000000300f00001201000000000000,Saitek Dual Analog,a:b2,b:b3,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b5,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b11,righttrigger:b7,rightx:a3,righty:a2,start:b9,x:b0,y:b1,platform:Windows,
|
||||
@@ -1441,7 +1441,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
03000000250900006688000000010000,MP8866 Super Dual Box,a:b2,b:b1,back:b9,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:a2,righty:a3,start:b8,x:b3,y:b0,platform:Linux,
|
||||
030000005e0400008e02000010020000,MSI GC20 V2,a:b0,b:b1,back:b6,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,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,
|
||||
03000000f70600000100000000010000,N64 Adaptoid,+rightx:b2,+righty:b1,-rightx:b4,-righty:b5,a:b0,b:b3,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,lefttrigger:b9,leftx:a0,lefty:a1,rightshoulder:b7,start:b8,platform:Linux,
|
||||
030000006f0e00001311000011010000,N64 Controller,+rightx:b10,+righty:b3,-rightx:b0,-righty:b11,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,start:b9,platform:Linux,
|
||||
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,
|
||||
@@ -1497,11 +1496,11 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000006f0e00000901000011010000,PDP PS3 Versus Fighting,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:Linux,
|
||||
030000006f0e00002f01000011010000,PDP Wired PS3 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,
|
||||
03000000ad1b000004f9000000010000,PDP Xbox 360 Versus Fighting,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,start:b7,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e0000f102000000000000,PDP Xbox Atomic,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,
|
||||
030000006f0e0000a802000023020000,PDP Xbox One Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
|
||||
030000006f0e0000a702000023020000,PDP Xbox One Raven Black,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,
|
||||
030000006f0e0000d802000006640000,PDP 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,
|
||||
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,
|
||||
030000006f0e0000f102000000000000,PDP Xbox Atomic,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,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,
|
||||
@@ -1611,6 +1610,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
|
||||
030000006f0e00001e01000011010000,Rock Candy PS3 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,
|
||||
03000000c6240000fefa000000010000,Rock Candy Xbox 360 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,
|
||||
030000006f0e00004601000001010000,Rock Candy Xbox One Controller,a:b0,b:b1,back:b6,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,
|
||||
030000006f0e00001311000011010000,Saffun Controller,a:b2,b:b3,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:b1,y:b0,platform:Linux,
|
||||
03000000a306000023f6000011010000,Saitek Cyborg PlayStation 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:a4,start:b9,x:b0,y:b3,platform:Linux,
|
||||
03000000a30600001005000000010000,Saitek P150,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b7,lefttrigger:b6,rightshoulder:b2,righttrigger:b5,x:b3,y:b4,platform:Linux,
|
||||
03000000a30600000701000000010000,Saitek P220,a:b2,b:b3,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,x:b0,y:b1,platform:Linux,
|
||||
|
||||
@@ -246,7 +246,7 @@ void Host::BeginPresentFrame()
|
||||
GSJoinSnapshotThreads();
|
||||
|
||||
// queue dumping of this frame
|
||||
std::string dump_path(fmt::format("{}_frame{}.png", s_output_prefix, s_dump_frame_number));
|
||||
std::string dump_path(fmt::format("{}_frame{:05}.png", s_output_prefix, s_dump_frame_number));
|
||||
GSQueueSnapshot(dump_path);
|
||||
}
|
||||
|
||||
@@ -443,8 +443,17 @@ static void PrintCommandLineHelp(const char* progname)
|
||||
std::fprintf(stderr, " -help: Displays this information and exits.\n");
|
||||
std::fprintf(stderr, " -version: Displays version information and exits.\n");
|
||||
std::fprintf(stderr, " -dumpdir <dir>: Frame dump directory (will be dumped as filename_frameN.png).\n");
|
||||
std::fprintf(stderr, " -dump [rt|tex|z|f|a|i]: Enabling dumping of render target, texture, z buffer, frame, "
|
||||
"alphas, and info (context, vertices), respectively, per draw. Generates lots of data.\n");
|
||||
std::fprintf(stderr, " -dumprange N[,L,B]: Start dumping from draw N (base 0), stops after L draws, and only "
|
||||
"those draws that are multiples of B (intersection of -dumprange and -dumprangef used)."
|
||||
"Defaults to 0,-1,1 (all draws). Only used if -dump used.\n");
|
||||
std::fprintf(stderr, " -dumprangef NF[,LF,BF]: Start dumping from frame NF (base 0), stops after LF frames, "
|
||||
"and only those frames that are multiples of BF (intersection of -dumprange and -dumprangef used).\n"
|
||||
"Defaults to 0,-1,1 (all frames). Only used if -dump is used.\n");
|
||||
std::fprintf(stderr, " -loop <count>: Loops dump playback N times. Defaults to 1. 0 will loop infinitely.\n");
|
||||
std::fprintf(stderr, " -renderer <renderer>: Sets the graphics renderer. Defaults to Auto.\n");
|
||||
std::fprintf(stderr, " -swthreads <threads>: Sets the number of threads for the software renderer.\n");
|
||||
std::fprintf(stderr, " -window: Forces a window to be displayed.\n");
|
||||
std::fprintf(stderr, " -surfaceless: Disables showing a window.\n");
|
||||
std::fprintf(stderr, " -logfile <filename>: Writes emu log to filename.\n");
|
||||
@@ -465,6 +474,7 @@ void GSRunner::InitializeConsole()
|
||||
|
||||
bool GSRunner::ParseCommandLineArgs(int argc, char* argv[], VMBootParameters& params)
|
||||
{
|
||||
std::string dumpdir; // Save from argument -dumpdir for creating sub-directories
|
||||
bool no_more_args = false;
|
||||
for (int i = 1; i < argc; i++)
|
||||
{
|
||||
@@ -485,7 +495,7 @@ bool GSRunner::ParseCommandLineArgs(int argc, char* argv[], VMBootParameters& pa
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-dumpdir"))
|
||||
{
|
||||
s_output_prefix = StringUtil::StripWhitespace(argv[++i]);
|
||||
dumpdir = s_output_prefix = StringUtil::StripWhitespace(argv[++i]);
|
||||
if (s_output_prefix.empty())
|
||||
{
|
||||
Console.Error("Invalid dump directory specified.");
|
||||
@@ -500,6 +510,86 @@ bool GSRunner::ParseCommandLineArgs(int argc, char* argv[], VMBootParameters& pa
|
||||
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-dump"))
|
||||
{
|
||||
std::string str(argv[++i]);
|
||||
|
||||
s_settings_interface.SetBoolValue("EmuCore/GS", "dump", true);
|
||||
|
||||
if (str.find("rt") != std::string::npos)
|
||||
s_settings_interface.SetBoolValue("EmuCore/GS", "save", true);
|
||||
if (str.find("f") != std::string::npos)
|
||||
s_settings_interface.SetBoolValue("EmuCore/GS", "savef", true);
|
||||
if (str.find("tex") != std::string::npos)
|
||||
s_settings_interface.SetBoolValue("EmuCore/GS", "savet", true);
|
||||
if (str.find("z") != std::string::npos)
|
||||
s_settings_interface.SetBoolValue("EmuCore/GS", "savez", true);
|
||||
if (str.find("a") != std::string::npos)
|
||||
s_settings_interface.SetBoolValue("EmuCore/GS", "savea", true);
|
||||
if (str.find("i") != std::string::npos)
|
||||
s_settings_interface.SetBoolValue("EmuCore/GS", "savei", true);
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-dumprange"))
|
||||
{
|
||||
std::string str(argv[++i]);
|
||||
|
||||
std::vector<std::string_view> split = StringUtil::SplitString(str, ',');
|
||||
int start = 0;
|
||||
int num = -1;
|
||||
int by = 1;
|
||||
if (split.size() > 0)
|
||||
{
|
||||
start = StringUtil::FromChars<int>(split[0]).value_or(0);
|
||||
}
|
||||
if (split.size() > 1)
|
||||
{
|
||||
num = StringUtil::FromChars<int>(split[1]).value_or(-1);
|
||||
}
|
||||
if (split.size() > 2)
|
||||
{
|
||||
by = std::max(1, StringUtil::FromChars<int>(split[2]).value_or(1));
|
||||
}
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "saven", start);
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "savel", num);
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "saveb", by);
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-dumprangef"))
|
||||
{
|
||||
std::string str(argv[++i]);
|
||||
|
||||
std::vector<std::string_view> split = StringUtil::SplitString(str, ',');
|
||||
int start = 0;
|
||||
int num = -1;
|
||||
int by = 1;
|
||||
if (split.size() > 0)
|
||||
{
|
||||
start = StringUtil::FromChars<int>(split[0]).value_or(0);
|
||||
}
|
||||
if (split.size() > 1)
|
||||
{
|
||||
num = StringUtil::FromChars<int>(split[1]).value_or(-1);
|
||||
}
|
||||
if (split.size() > 2)
|
||||
{
|
||||
by = std::max(1, StringUtil::FromChars<int>(split[2]).value_or(1));
|
||||
}
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "savenf", start);
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "savelf", num);
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "savebf", by);
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-dumpdirhw"))
|
||||
{
|
||||
s_settings_interface.SetStringValue("EmuCore/GS", "HWDumpDirectory", argv[++i]);
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-dumpdirsw"))
|
||||
{
|
||||
s_settings_interface.SetStringValue("EmuCore/GS", "SWDumpDirectory", argv[++i]);
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-loop"))
|
||||
{
|
||||
s_loop_count = StringUtil::FromChars<s32>(argv[++i]).value_or(0);
|
||||
@@ -543,6 +633,19 @@ bool GSRunner::ParseCommandLineArgs(int argc, char* argv[], VMBootParameters& pa
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "Renderer", static_cast<int>(type));
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-swthreads"))
|
||||
{
|
||||
const int swthreads = StringUtil::FromChars<int>(argv[++i]).value_or(0);
|
||||
if (swthreads < 0)
|
||||
{
|
||||
Console.WriteLn("Invalid number of software threads");
|
||||
return false;
|
||||
}
|
||||
|
||||
Console.WriteLn(fmt::format("Setting number of software threads to {}", swthreads));
|
||||
s_settings_interface.SetIntValue("EmuCore/GS", "SWExtraThreads", swthreads);
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG_PARAM("-renderhacks"))
|
||||
{
|
||||
std::string str(argv[++i]);
|
||||
@@ -643,6 +746,18 @@ bool GSRunner::ParseCommandLineArgs(int argc, char* argv[], VMBootParameters& pa
|
||||
return false;
|
||||
}
|
||||
|
||||
if (s_settings_interface.GetBoolValue("EmuCore/GS", "dump") && !dumpdir.empty())
|
||||
{
|
||||
if (s_settings_interface.GetStringValue("EmuCore/GS", "HWDumpDirectory").empty())
|
||||
s_settings_interface.SetStringValue("EmuCore/GS", "HWDumpDirectory", dumpdir.c_str());
|
||||
if (s_settings_interface.GetStringValue("EmuCore/GS", "SWDumpDirectory").empty())
|
||||
s_settings_interface.SetStringValue("EmuCore/GS", "SWDumpDirectory", dumpdir.c_str());
|
||||
|
||||
// Disable saving frames with SaveSnapshotToMemory()
|
||||
// Instead we save more "raw" snapshots when using -dump.
|
||||
s_output_prefix = "";
|
||||
}
|
||||
|
||||
// set up the frame dump directory
|
||||
if (!s_output_prefix.empty())
|
||||
{
|
||||
|
||||
@@ -40,6 +40,7 @@ MemorySearchWidget::MemorySearchWidget(QWidget* parent)
|
||||
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);
|
||||
|
||||
// Ensures we don't retrigger the load results function unintentionally
|
||||
m_resultsLoadTimer.setInterval(100);
|
||||
@@ -249,7 +250,6 @@ bool handleSearchComparison(SearchComparison searchComparison, u32 searchAddress
|
||||
}
|
||||
case SearchComparison::IncreasedBy:
|
||||
{
|
||||
|
||||
const T priorValue = priorResult->getValue<T>();
|
||||
const T expectedIncrease = searchValue + priorValue;
|
||||
return memoryValueComparator(SearchComparison::Equals, readValue, expectedIncrease);
|
||||
@@ -282,6 +282,10 @@ bool handleSearchComparison(SearchComparison searchComparison, u32 searchAddress
|
||||
const T expectedDecrease = priorValue - searchValue;
|
||||
return memoryValueComparator(SearchComparison::Equals, readValue, expectedIncrease) || memoryValueComparator(SearchComparison::Equals, readValue, expectedDecrease);
|
||||
}
|
||||
case SearchComparison::UnknownValue:
|
||||
{
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
Console.Error("Debugger: Unknown type when doing memory search!");
|
||||
return false;
|
||||
@@ -506,63 +510,69 @@ void MemorySearchWidget::onSearchButtonClicked()
|
||||
const bool isFilterSearch = sender() == m_ui.btnFilterSearch;
|
||||
unsigned long long value;
|
||||
|
||||
switch (searchType)
|
||||
if(searchComparison != SearchComparison::UnknownValue)
|
||||
{
|
||||
case SearchType::ByteType:
|
||||
case SearchType::Int16Type:
|
||||
case SearchType::Int32Type:
|
||||
case SearchType::Int64Type:
|
||||
value = searchValue.toULongLong(&ok, searchHex ? 16 : 10);
|
||||
break;
|
||||
case SearchType::FloatType:
|
||||
case SearchType::DoubleType:
|
||||
searchValue.toDouble(&ok);
|
||||
break;
|
||||
case SearchType::StringType:
|
||||
ok = !searchValue.isEmpty();
|
||||
break;
|
||||
case SearchType::ArrayType:
|
||||
ok = !searchValue.trimmed().isEmpty();
|
||||
break;
|
||||
}
|
||||
if(doesSearchComparisonTakeInput(searchComparison))
|
||||
{
|
||||
switch (searchType)
|
||||
{
|
||||
case SearchType::ByteType:
|
||||
case SearchType::Int16Type:
|
||||
case SearchType::Int32Type:
|
||||
case SearchType::Int64Type:
|
||||
value = searchValue.toULongLong(&ok, searchHex ? 16 : 10);
|
||||
break;
|
||||
case SearchType::FloatType:
|
||||
case SearchType::DoubleType:
|
||||
searchValue.toDouble(&ok);
|
||||
break;
|
||||
case SearchType::StringType:
|
||||
ok = !searchValue.isEmpty();
|
||||
break;
|
||||
case SearchType::ArrayType:
|
||||
ok = !searchValue.trimmed().isEmpty();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
QMessageBox::critical(this, tr("Debugger"), tr("Invalid search value"));
|
||||
return;
|
||||
}
|
||||
if (!ok)
|
||||
{
|
||||
QMessageBox::critical(this, tr("Debugger"), tr("Invalid search value"));
|
||||
return;
|
||||
}
|
||||
|
||||
switch (searchType)
|
||||
{
|
||||
case SearchType::ArrayType:
|
||||
case SearchType::StringType:
|
||||
case SearchType::DoubleType:
|
||||
case SearchType::FloatType:
|
||||
break;
|
||||
case SearchType::Int64Type:
|
||||
if (value <= std::numeric_limits<unsigned long long>::max())
|
||||
break;
|
||||
case SearchType::Int32Type:
|
||||
if (value <= std::numeric_limits<unsigned long>::max())
|
||||
break;
|
||||
case SearchType::Int16Type:
|
||||
if (value <= std::numeric_limits<unsigned short>::max())
|
||||
break;
|
||||
case SearchType::ByteType:
|
||||
if (value <= std::numeric_limits<unsigned char>::max())
|
||||
break;
|
||||
default:
|
||||
QMessageBox::critical(this, tr("Debugger"), tr("Value is larger than type"));
|
||||
switch (searchType)
|
||||
{
|
||||
case SearchType::ArrayType:
|
||||
case SearchType::StringType:
|
||||
case SearchType::DoubleType:
|
||||
case SearchType::FloatType:
|
||||
break;
|
||||
case SearchType::Int64Type:
|
||||
if (value <= std::numeric_limits<unsigned long long>::max())
|
||||
break;
|
||||
case SearchType::Int32Type:
|
||||
if (value <= std::numeric_limits<unsigned long>::max())
|
||||
break;
|
||||
case SearchType::Int16Type:
|
||||
if (value <= std::numeric_limits<unsigned short>::max())
|
||||
break;
|
||||
case SearchType::ByteType:
|
||||
if (value <= std::numeric_limits<unsigned char>::max())
|
||||
break;
|
||||
default:
|
||||
QMessageBox::critical(this, tr("Debugger"), tr("Value is larger than type"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isFilterSearch && (searchComparison == SearchComparison::Changed || searchComparison == SearchComparison::ChangedBy
|
||||
|| searchComparison == SearchComparison::Decreased || searchComparison == SearchComparison::DecreasedBy
|
||||
|| searchComparison == SearchComparison::Increased || searchComparison == SearchComparison::IncreasedBy
|
||||
|| searchComparison == SearchComparison::NotChanged))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Debugger"), tr("This search comparison can only be used with filter searches."));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isFilterSearch && (searchComparison == SearchComparison::Changed || searchComparison == SearchComparison::ChangedBy
|
||||
|| searchComparison == SearchComparison::Decreased || searchComparison == SearchComparison::DecreasedBy
|
||||
|| searchComparison == SearchComparison::Increased || searchComparison == SearchComparison::IncreasedBy
|
||||
|| searchComparison == SearchComparison::NotChanged))
|
||||
{
|
||||
QMessageBox::critical(this, tr("Debugger"), tr("This search comparison can only be used with filter searches."));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
QFutureWatcher<std::vector<SearchResult>>* workerWatcher = new QFutureWatcher<std::vector<SearchResult>>();
|
||||
@@ -637,6 +647,23 @@ SearchComparison MemorySearchWidget::getCurrentSearchComparison()
|
||||
return m_searchComparisonLabelMap.labelToEnum(m_ui.cmbSearchComparison->currentText());
|
||||
}
|
||||
|
||||
bool MemorySearchWidget::doesSearchComparisonTakeInput(const SearchComparison comparison)
|
||||
{
|
||||
switch (comparison) {
|
||||
case SearchComparison::Equals:
|
||||
case SearchComparison::NotEquals:
|
||||
case SearchComparison::GreaterThan:
|
||||
case SearchComparison::GreaterThanOrEqual:
|
||||
case SearchComparison::LessThan:
|
||||
case SearchComparison::LessThanOrEqual:
|
||||
case SearchComparison::IncreasedBy:
|
||||
case SearchComparison::DecreasedBy:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void MemorySearchWidget::onSearchTypeChanged(int newIndex)
|
||||
{
|
||||
if (newIndex < 4)
|
||||
@@ -654,6 +681,11 @@ void MemorySearchWidget::onSearchTypeChanged(int newIndex)
|
||||
updateSearchComparisonSelections();
|
||||
}
|
||||
|
||||
void MemorySearchWidget::onSearchComparisonChanged(int newValue)
|
||||
{
|
||||
m_ui.txtSearchValue->setEnabled(getCurrentSearchComparison() != SearchComparison::UnknownValue);
|
||||
}
|
||||
|
||||
void MemorySearchWidget::updateSearchComparisonSelections()
|
||||
{
|
||||
const QString selectedComparisonLabel = m_ui.cmbSearchComparison->currentText();
|
||||
@@ -704,5 +736,11 @@ std::vector<SearchComparison> MemorySearchWidget::getValidSearchComparisonsForSt
|
||||
comparisons.push_back(SearchComparison::ChangedBy);
|
||||
comparisons.push_back(SearchComparison::NotChanged);
|
||||
}
|
||||
|
||||
if(!hasResults)
|
||||
{
|
||||
comparisons.push_back(SearchComparison::UnknownValue);
|
||||
}
|
||||
|
||||
return comparisons;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
Changed,
|
||||
ChangedBy,
|
||||
NotChanged,
|
||||
UnknownValue,
|
||||
Invalid
|
||||
};
|
||||
|
||||
@@ -69,6 +70,7 @@ public:
|
||||
insert(SearchComparison::Changed, tr("Changed"));
|
||||
insert(SearchComparison::ChangedBy, tr("Changed By"));
|
||||
insert(SearchComparison::NotChanged, tr("Not Changed"));
|
||||
insert(SearchComparison::UnknownValue, tr("Unknown Initial Value"));
|
||||
insert(SearchComparison::Invalid, "");
|
||||
}
|
||||
SearchComparison labelToEnum(QString comparisonLabel)
|
||||
@@ -120,6 +122,7 @@ public slots:
|
||||
void onSearchButtonClicked();
|
||||
void onSearchResultsListScroll(u32 value);
|
||||
void onSearchTypeChanged(int newIndex);
|
||||
void onSearchComparisonChanged(int newIndex);
|
||||
void loadSearchResults();
|
||||
void contextSearchResultGoToDisassembly();
|
||||
void contextRemoveSearchResult();
|
||||
@@ -146,4 +149,5 @@ private:
|
||||
std::vector<SearchComparison> getValidSearchComparisonsForState(SearchType type, std::vector<SearchResult> &existingResults);
|
||||
SearchType getCurrentSearchType();
|
||||
SearchComparison getCurrentSearchComparison();
|
||||
bool doesSearchComparisonTakeInput(SearchComparison comparison);
|
||||
};
|
||||
|
||||
@@ -148,6 +148,11 @@
|
||||
<string>Less Than Or Equal</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Unknown Initial Value</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
||||
@@ -2040,6 +2040,7 @@ void QtHost::PrintCommandLineHelp(const std::string_view progname)
|
||||
std::fprintf(stderr, " -version: Displays version information and exits.\n");
|
||||
std::fprintf(stderr, " -batch: Enables batch mode (exits after shutting down).\n");
|
||||
std::fprintf(stderr, " -nogui: Hides main window while running (implies batch mode).\n");
|
||||
std::fprintf(stderr, " -portable: Force enable portable mode to store data in local PCSX2 path instead of the default configuration path.\n");
|
||||
std::fprintf(stderr, " -elf <file>: Overrides the boot ELF with the specified filename.\n");
|
||||
std::fprintf(stderr, " -gameargs <string>: passes the specified quoted space-delimited string of launch arguments.\n");
|
||||
std::fprintf(stderr, " -disc <path>: Uses the specified host DVD drive as a source.\n");
|
||||
@@ -2111,6 +2112,11 @@ bool QtHost::ParseCommandLineOptions(const QStringList& args, std::shared_ptr<VM
|
||||
s_nogui_mode = true;
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG(QStringLiteral("-portable")))
|
||||
{
|
||||
EmuConfig.IsPortableMode = true;
|
||||
continue;
|
||||
}
|
||||
else if (CHECK_ARG(QStringLiteral("-fastboot")))
|
||||
{
|
||||
AutoBoot(autoboot)->fast_boot = true;
|
||||
|
||||
@@ -121,7 +121,7 @@ bool MemoryCardConvertWorker::ConvertToFolder(const std::string& srcFileName, co
|
||||
// Set progress bar to the literal number of bytes in the memcard.
|
||||
// Plus two because there is a lag period after the Save calls complete
|
||||
// where the progress bar stalls out; this lets us stop the progress bar
|
||||
// just shy of 50 and 100% so it seems like its still doing some work.
|
||||
// just shy of 50 and 100% so it seems like it's still doing some work.
|
||||
this->SetProgressRange((sourceBuffer.size() * 2) + 2);
|
||||
this->SetProgressValue(0);
|
||||
|
||||
@@ -161,5 +161,7 @@ bool MemoryCardConvertWorker::ConvertToFolder(const std::string& srcFileName, co
|
||||
this->IncrementProgressValue();
|
||||
}
|
||||
|
||||
this->IncrementProgressValue();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10242,12 +10242,12 @@ Do you want to load this save and continue?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="2686"/>
|
||||
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="2687"/>
|
||||
<source>Stencil buffers and texture barriers are both unavailable, this will break some graphical effects.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="5064"/>
|
||||
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="5065"/>
|
||||
<source>Spin GPU During Readbacks is enabled, but calibrated timestamps are unavailable. This might be really slow.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -10349,7 +10349,7 @@ Please see our official documentation for more information.</source>
|
||||
<context>
|
||||
<name>GSDeviceVK</name>
|
||||
<message>
|
||||
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="2057"/>
|
||||
<location filename="../../pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp" line="2058"/>
|
||||
<source>Your GPU does not support the required Vulkan features.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -17162,162 +17162,168 @@ This action cannot be reversed, and you will lose any saves on the card.</source
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="123"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="59"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="60"/>
|
||||
<source>Equals</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="128"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="60"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="61"/>
|
||||
<source>Not Equals</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="133"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="61"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="62"/>
|
||||
<source>Greater Than</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="138"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="62"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="63"/>
|
||||
<source>Greater Than Or Equal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="143"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="63"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="64"/>
|
||||
<source>Less Than</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="148"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="64"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="65"/>
|
||||
<source>Less Than Or Equal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="156"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="153"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="73"/>
|
||||
<source>Unknown Initial Value</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="161"/>
|
||||
<source>Comparison</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="167"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="172"/>
|
||||
<source>Start</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="181"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.ui" line="186"/>
|
||||
<source>End</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="94"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="95"/>
|
||||
<source>Search Results List Context Menu</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="100"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="101"/>
|
||||
<source>Copy Address</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="104"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="105"/>
|
||||
<source>Go to in Disassembly</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="108"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="109"/>
|
||||
<source>Add to Saved Memory Addresses</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="115"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="116"/>
|
||||
<source>Remove Result</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="486"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="494"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="500"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="531"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="555"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="564"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="490"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="498"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="504"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="539"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="563"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="573"/>
|
||||
<source>Debugger</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="486"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="490"/>
|
||||
<source>Invalid start address</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="494"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="498"/>
|
||||
<source>Invalid end address</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="500"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="504"/>
|
||||
<source>Start address can't be equal to or greater than the end address</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="531"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="539"/>
|
||||
<source>Invalid search value</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="555"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="563"/>
|
||||
<source>Value is larger than type</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="564"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="573"/>
|
||||
<source>This search comparison can only be used with filter searches.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="577"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="587"/>
|
||||
<source>%0 results found</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="594"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.cpp" line="604"/>
|
||||
<source>Searching...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="65"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="66"/>
|
||||
<source>Increased</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="66"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="67"/>
|
||||
<source>Increased By</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="67"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="68"/>
|
||||
<source>Decreased</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="68"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="69"/>
|
||||
<source>Decreased By</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="69"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="70"/>
|
||||
<source>Changed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="70"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="71"/>
|
||||
<source>Changed By</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="71"/>
|
||||
<location filename="../Debugger/MemorySearchWidget.h" line="72"/>
|
||||
<source>Not Changed</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
@@ -18075,7 +18081,7 @@ This action cannot be reversed, and you will lose any saves on the card.</source
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../pcsx2/SIO/Pad/Pad.cpp" line="576"/>
|
||||
<location filename="../../pcsx2/SIO/Pad/Pad.cpp" line="579"/>
|
||||
<source>Controller port {0}, slot {1} has a {2} connected, but the save state has a {3}.
|
||||
Ejecting {3} and replacing it with {2}.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
||||
@@ -745,6 +745,8 @@ struct Pcsx2Config
|
||||
SaveFrame : 1,
|
||||
SaveTexture : 1,
|
||||
SaveDepth : 1,
|
||||
SaveAlpha : 1,
|
||||
SaveInfo : 1,
|
||||
DumpReplaceableTextures : 1,
|
||||
DumpReplaceableMipmaps : 1,
|
||||
DumpTexturesWithFMVActive : 1,
|
||||
@@ -822,6 +824,10 @@ struct Pcsx2Config
|
||||
|
||||
int SaveN = 0;
|
||||
int SaveL = 5000;
|
||||
int SaveB = 1;
|
||||
int SaveNF = 0;
|
||||
int SaveLF = -1;
|
||||
int SaveBF = 1;
|
||||
|
||||
s8 ExclusiveFullscreenControl = -1;
|
||||
GSScreenshotSize ScreenshotSize = GSScreenshotSize::WindowResolution;
|
||||
@@ -865,6 +871,9 @@ struct Pcsx2Config
|
||||
|
||||
bool operator==(const GSOptions& right) const;
|
||||
bool operator!=(const GSOptions& right) const;
|
||||
|
||||
// Should we dump this draw/frame?
|
||||
bool ShouldDump(int draw, int frame) const;
|
||||
};
|
||||
|
||||
struct SPU2Options
|
||||
@@ -1328,6 +1337,7 @@ struct Pcsx2Config
|
||||
std::string CurrentIRX;
|
||||
std::string CurrentGameArgs;
|
||||
AspectRatioType CurrentAspectRatio = AspectRatioType::RAuto4_3_3_2;
|
||||
bool IsPortableMode = false;
|
||||
|
||||
Pcsx2Config();
|
||||
void LoadSave(SettingsWrapper& wrap);
|
||||
|
||||
@@ -203,16 +203,15 @@ void GSDrawingContext::Dump(const std::string& filename)
|
||||
"\tTBW:%u\n"
|
||||
"\tPSM:0x%x\n"
|
||||
"\tTW:%u\n"
|
||||
"\tTH:%u\n"
|
||||
"\tTCC:%u\n"
|
||||
"\tTFX:%u\n"
|
||||
"\tCBP:0x%x\n"
|
||||
"\tCPSM:0x%x\n"
|
||||
"\tCSM:%u\n"
|
||||
"\tCSA:%u\n"
|
||||
"\tCLD:%u\n"
|
||||
"\tTH:%u\n",
|
||||
TEX0.TBP0, TEX0.TBW, TEX0.PSM, TEX0.TW, TEX0.TCC, TEX0.TFX, TEX0.CBP, TEX0.CPSM, TEX0.CSM, TEX0.CSA, TEX0.CLD,
|
||||
static_cast<uint32_t>(TEX0.TH));
|
||||
"\tCLD:%u\n\n",
|
||||
TEX0.TBP0, TEX0.TBW, TEX0.PSM, TEX0.TW, static_cast<uint32_t>(TEX0.TH), TEX0.TCC, TEX0.TFX, TEX0.CBP, TEX0.CPSM, TEX0.CSM, TEX0.CSA, TEX0.CLD);
|
||||
|
||||
fprintf(fp,
|
||||
"TEX1\n"
|
||||
|
||||
@@ -87,7 +87,6 @@ public:
|
||||
|
||||
fprintf(fp, "SCANMSK\n"
|
||||
"\tMSK:%u\n\n"
|
||||
"\n"
|
||||
, SCANMSK.MSK);
|
||||
|
||||
fprintf(fp, "TEXA\n"
|
||||
|
||||
@@ -662,11 +662,7 @@ void GSLocalMemory::SaveBMP(const std::string& fn, u32 bp, u32 bw, u32 psm, int
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
GSPng::Save(GSPng::RGB_A_PNG, fn, static_cast<u8*>(bits), w, h, pitch, GSConfig.PNGCompressionLevel, false);
|
||||
#else
|
||||
GSPng::Save(GSPng::RGB_PNG, fn, static_cast<u8*>(bits), w, h, pitch, GSConfig.PNGCompressionLevel, false);
|
||||
#endif
|
||||
GSPng::Save((IsDevBuild || GSConfig.SaveAlpha) ? GSPng::RGB_A_PNG : GSPng::RGB_PNG, fn, static_cast<u8*>(bits), w, h, pitch, GSConfig.PNGCompressionLevel, false);
|
||||
|
||||
_aligned_free(bits);
|
||||
}
|
||||
|
||||
@@ -443,7 +443,7 @@ void GSState::DumpVertices(const std::string& filename)
|
||||
file << std::fixed << std::setprecision(4);
|
||||
for (u32 i = 0; i < count; ++i)
|
||||
{
|
||||
file << "\t" << "v" << i << ": ";
|
||||
file << "\t" << std::dec << "v" << i << ": ";
|
||||
GSVertex v = buffer[m_index.buff[i]];
|
||||
|
||||
const float x = (v.XYZ.X - (int)m_context->XYOFFSET.OFX) / 16.0f;
|
||||
@@ -461,7 +461,7 @@ void GSState::DumpVertices(const std::string& filename)
|
||||
file << std::fixed << std::setprecision(6);
|
||||
for (u32 i = 0; i < count; ++i)
|
||||
{
|
||||
file << "\t" << "v" << i << ": ";
|
||||
file << "\t" << std::dec << "v" << i << ": ";
|
||||
GSVertex v = buffer[m_index.buff[i]];
|
||||
|
||||
file << std::setfill('0') << std::setw(3) << unsigned(v.RGBAQ.R) << DEL;
|
||||
@@ -479,7 +479,7 @@ void GSState::DumpVertices(const std::string& filename)
|
||||
file << "TEXTURE COORDS (" << qualifier << ")" << std::endl;;
|
||||
for (u32 i = 0; i < count; ++i)
|
||||
{
|
||||
file << "\t" << "v" << i << ": ";
|
||||
file << "\t" << "v" << std::dec << i << ": ";
|
||||
const GSVertex v = buffer[m_index.buff[i]];
|
||||
|
||||
// note
|
||||
@@ -1994,7 +1994,7 @@ void GSState::InitReadFIFO(u8* mem, int len)
|
||||
// Read the image all in one go.
|
||||
m_mem.ReadImageX(m_tr.x, m_tr.y, m_tr.buff, m_tr.total, m_env.BITBLTBUF, m_env.TRXPOS, m_env.TRXREG);
|
||||
|
||||
if (GSConfig.DumpGSData && GSConfig.SaveRT && s_n >= GSConfig.SaveN)
|
||||
if (GSConfig.SaveRT && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
const std::string s(GetDrawDumpPath(
|
||||
"%05d_read_%05x_%d_%d_%d_%d_%d_%d.bmp",
|
||||
@@ -2742,7 +2742,7 @@ int GSState::Defrost(const freezeData* fd)
|
||||
m_mem.m_clut.Reset();
|
||||
(PRIM->CTXT == 0) ? ApplyTEX0<0>(m_context->TEX0) : ApplyTEX0<1>(m_context->TEX0);
|
||||
|
||||
g_perfmon.SetFrame(5000);
|
||||
g_perfmon.SetFrame(0);
|
||||
|
||||
ResetPCRTC();
|
||||
|
||||
|
||||
@@ -546,9 +546,9 @@ void GSRenderer::EndPresentFrame()
|
||||
|
||||
void GSRenderer::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||
{
|
||||
if (GSConfig.DumpGSData && s_n >= GSConfig.SaveN)
|
||||
if (GSConfig.SaveInfo && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
DumpGSPrivRegs(*m_regs, GetDrawDumpPath("vsync_%05d_f%lld_gs_reg.txt", s_n, g_perfmon.GetFrame()));
|
||||
DumpGSPrivRegs(*m_regs, GetDrawDumpPath("%05d_f%05lld_vsync_gs_reg.txt", s_n, g_perfmon.GetFrame()));
|
||||
}
|
||||
|
||||
const int fb_sprite_blits = g_perfmon.GetDisplayFramebufferSpriteBlits();
|
||||
|
||||
@@ -35,11 +35,8 @@ bool GSTexture::Save(const std::string& fn)
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef PCSX2_DEVBUILD
|
||||
GSPng::Format format = GSPng::RGB_A_PNG;
|
||||
#else
|
||||
GSPng::Format format = GSPng::RGB_PNG;
|
||||
#endif
|
||||
GSPng::Format format = (IsDevBuild || GSConfig.SaveAlpha) ? GSPng::RGB_A_PNG : GSPng::RGB_PNG;
|
||||
|
||||
switch (m_format)
|
||||
{
|
||||
case Format::UNorm8:
|
||||
|
||||
@@ -154,6 +154,60 @@ bool GSHwHack::GSC_SFEX3(GSRendererHW& r, int& skip)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GSHwHack::GSC_DTGames(GSRendererHW& r, int& skip)
|
||||
{
|
||||
if (skip == 0)
|
||||
{
|
||||
// The game does a shuffle based on the result of a copy from the depth buffer, which ends up looking bizzare so PCSX2 doesn't know how to deal with it.
|
||||
// What they're actually doing is copying the red/green channel of the result (kind of a shadow stencil) to the alpha channel.
|
||||
// The further problem to this is the limitation of alpha we can save on an RT as they copy in 255, so I can cheese it here pretending it's RTA'd
|
||||
if (RTME && RFPSM == PSMCT32 && RTBP0 == RFBP && RTPSM == PSMCT16 && RTEST.ATE && RTEST.ATST == ATST_NEVER && RTEST.AFAIL == AFAIL_FB_ONLY && RFBMSK == 0xFFFFFF)
|
||||
{
|
||||
GSTextureCache::Target* rt = g_texture_cache->LookupTarget(GIFRegTEX0::Create(RTBP0, RFBW, RFPSM),
|
||||
GSVector2i(1, 1), r.GetTextureScaleFactor(), GSTextureCache::RenderTarget);
|
||||
|
||||
if (!rt)
|
||||
return false;
|
||||
|
||||
// Clear down the alpha first.
|
||||
GSHWDrawConfig& clear = r.BeginHLEHardwareDraw(
|
||||
rt->GetTexture(), nullptr, rt->GetScale(), nullptr, rt->GetScale(), rt->GetUnscaledRect());
|
||||
clear.colormask.wrgba = 0;
|
||||
clear.colormask.wa = 1;
|
||||
r.EndHLEHardwareDraw(false);
|
||||
|
||||
// Shuffle the green channel in to alpha.
|
||||
GSHWDrawConfig& config = r.BeginHLEHardwareDraw(
|
||||
rt->GetTexture(), nullptr, rt->GetScale(), rt->GetTexture(), rt->GetScale(), rt->GetUnscaledRect());
|
||||
config.ps.shuffle = 1;
|
||||
config.ps.dst_fmt = GSLocalMemory::PSM_FMT_32;
|
||||
config.ps.write_rg = 0;
|
||||
config.ps.shuffle_same = 0;
|
||||
config.ps.real16src = 0;
|
||||
config.ps.shuffle_across = 1;
|
||||
config.ps.process_rg = r.SHUFFLE_READ;
|
||||
config.ps.process_ba = r.SHUFFLE_WRITE;
|
||||
config.colormask.wrgba = 0;
|
||||
config.colormask.wa = 1;
|
||||
config.ps.rta_correction = 1;
|
||||
config.ps.tfx = TFX_DECAL;
|
||||
config.ps.tcc = true;
|
||||
r.EndHLEHardwareDraw(true);
|
||||
|
||||
rt->m_alpha_min = 0;
|
||||
rt->m_alpha_max = 255;
|
||||
skip = 69;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RTPSM != PSMCT16)
|
||||
skip = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GSHwHack::GSC_Tekken5(GSRendererHW& r, int& skip)
|
||||
{
|
||||
if (skip == 0)
|
||||
@@ -1471,6 +1525,7 @@ const GSHwHack::Entry<GSRendererHW::GSC_Ptr> GSHwHack::s_get_skip_count_function
|
||||
CRC_F(GSC_SakuraWarsSoLongMyLove),
|
||||
CRC_F(GSC_Simple2000Vol114),
|
||||
CRC_F(GSC_SFEX3),
|
||||
CRC_F(GSC_DTGames),
|
||||
CRC_F(GSC_TalesOfLegendia),
|
||||
CRC_F(GSC_TalesofSymphonia),
|
||||
CRC_F(GSC_UrbanReign),
|
||||
|
||||
@@ -11,6 +11,7 @@ public:
|
||||
static bool GSC_Manhunt2(GSRendererHW& r, int& skip);
|
||||
static bool GSC_SacredBlaze(GSRendererHW& r, int& skip);
|
||||
static bool GSC_SFEX3(GSRendererHW& r, int& skip);
|
||||
static bool GSC_DTGames(GSRendererHW& r, int& skip);
|
||||
static bool GSC_Tekken5(GSRendererHW& r, int& skip);
|
||||
static bool GSC_BurnoutGames(GSRendererHW& r, int& skip);
|
||||
static bool GSC_BlackAndBurnoutSky(GSRendererHW& r, int& skip);
|
||||
|
||||
@@ -178,15 +178,10 @@ GSTexture* GSRendererHW::GetOutput(int i, float& scale, int& y_offset)
|
||||
GL_CACHE("Frame y offset %d pixels, unit %d", y_offset, i);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_OGL_DEBUG
|
||||
if (GSConfig.DumpGSData)
|
||||
if (GSConfig.SaveFrame && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
if (GSConfig.SaveFrame && s_n >= GSConfig.SaveN)
|
||||
{
|
||||
t->Save(GetDrawDumpPath("%05d_f%lld_fr%d_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), i, static_cast<int>(TEX0.TBP0), psm_str(TEX0.PSM)));
|
||||
}
|
||||
t->Save(GetDrawDumpPath("%05d_f%05lld_fr%d_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), i, static_cast<int>(TEX0.TBP0), psm_str(TEX0.PSM)));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return t;
|
||||
@@ -210,10 +205,8 @@ GSTexture* GSRendererHW::GetFeedbackOutput(float& scale)
|
||||
GSTexture* t = rt->m_texture;
|
||||
scale = rt->m_scale;
|
||||
|
||||
#ifdef ENABLE_OGL_DEBUG
|
||||
if (GSConfig.DumpGSData && GSConfig.SaveFrame && s_n >= GSConfig.SaveN)
|
||||
t->Save(GetDrawDumpPath("%05d_f%lld_fr%d_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), 3, static_cast<int>(TEX0.TBP0), psm_str(TEX0.PSM)));
|
||||
#endif
|
||||
if (GSConfig.SaveFrame && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
t->Save(GetDrawDumpPath("%05d_f%05lld_fr%d_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), 3, static_cast<int>(TEX0.TBP0), psm_str(TEX0.PSM)));
|
||||
|
||||
return t;
|
||||
}
|
||||
@@ -554,7 +547,7 @@ void GSRendererHW::ConvertSpriteTextureShuffle(u32& process_rg, u32& process_ba,
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((floor(m_vt.m_max.p.y) <= rt->m_valid.w) && ((floor(m_vt.m_max.p.x) > (m_cached_ctx.FRAME.FBW * 64)) || (rt->m_TEX0.TBW != m_cached_ctx.FRAME.FBW)))
|
||||
if (((m_r.width() + 8) & ~(GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].pgs.x - 1)) != GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].pgs.x && (floor(m_vt.m_max.p.y) <= rt->m_valid.w) && ((floor(m_vt.m_max.p.x) > (m_cached_ctx.FRAME.FBW * 64)) || (rt->m_TEX0.TBW < m_cached_ctx.FRAME.FBW)))
|
||||
{
|
||||
half_bottom_vert = false;
|
||||
half_bottom_uv = false;
|
||||
@@ -952,7 +945,7 @@ GSVector2i GSRendererHW::GetValidSize(const GSTextureCache::Source* tex)
|
||||
// Make sure sizes are within max limit of 2048,
|
||||
// this shouldn't happen but if it does it needs to be addressed,
|
||||
// clamp the size so at least it doesn't cause a crash.
|
||||
constexpr int valid_max_size = 2048;
|
||||
constexpr int valid_max_size = 2047;
|
||||
if ((width > valid_max_size) || (height > valid_max_size))
|
||||
{
|
||||
Console.Warning("Warning: GetValidSize out of bounds, X:%d Y:%d", width, height);
|
||||
@@ -1999,7 +1992,7 @@ void GSRendererHW::RoundSpriteOffset()
|
||||
|
||||
void GSRendererHW::Draw()
|
||||
{
|
||||
if (GSConfig.DumpGSData && (s_n >= GSConfig.SaveN))
|
||||
if (GSConfig.SaveInfo && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
std::string s;
|
||||
|
||||
@@ -3308,15 +3301,15 @@ void GSRendererHW::Draw()
|
||||
src->m_texture = src->m_from_target->m_texture;
|
||||
}
|
||||
|
||||
if (GSConfig.DumpGSData)
|
||||
if (GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
const u64 frame = g_perfmon.GetFrame();
|
||||
|
||||
std::string s;
|
||||
|
||||
if (GSConfig.SaveTexture && s_n >= GSConfig.SaveN && src)
|
||||
if (GSConfig.SaveTexture && src)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_itex_%05x_%s_%d%d_%02x_%02x_%02x_%02x.dds",
|
||||
s = GetDrawDumpPath("%05d_f%05lld_itex_%05x_%s_%d%d_%02x_%02x_%02x_%02x.dds",
|
||||
s_n, frame, static_cast<int>(m_cached_ctx.TEX0.TBP0), psm_str(m_cached_ctx.TEX0.PSM),
|
||||
static_cast<int>(m_cached_ctx.CLAMP.WMS), static_cast<int>(m_cached_ctx.CLAMP.WMT),
|
||||
static_cast<int>(m_cached_ctx.CLAMP.MINU), static_cast<int>(m_cached_ctx.CLAMP.MAXU),
|
||||
@@ -3326,23 +3319,23 @@ void GSRendererHW::Draw()
|
||||
|
||||
if (src->m_palette)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_itpx_%05x_%s.dds", s_n, frame, m_cached_ctx.TEX0.CBP, psm_str(m_cached_ctx.TEX0.CPSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_itpx_%05x_%s.dds", s_n, frame, m_cached_ctx.TEX0.CBP, psm_str(m_cached_ctx.TEX0.CPSM));
|
||||
|
||||
src->m_palette->Save(s);
|
||||
}
|
||||
}
|
||||
|
||||
if (rt && GSConfig.SaveRT && s_n >= GSConfig.SaveN)
|
||||
if (rt && GSConfig.SaveRT)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt0_%05x_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), psm_str(m_cached_ctx.FRAME.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rt0_%05x_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), psm_str(m_cached_ctx.FRAME.PSM));
|
||||
|
||||
if (rt->m_texture)
|
||||
rt->m_texture->Save(s);
|
||||
}
|
||||
|
||||
if (ds && GSConfig.SaveDepth && s_n >= GSConfig.SaveN)
|
||||
if (ds && GSConfig.SaveDepth)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rz0_%05x_%s.bmp", s_n, frame, m_cached_ctx.ZBUF.Block(), psm_str(m_cached_ctx.ZBUF.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rz0_%05x_%s.bmp", s_n, frame, m_cached_ctx.ZBUF.Block(), psm_str(m_cached_ctx.ZBUF.PSM));
|
||||
|
||||
if (ds->m_texture)
|
||||
ds->m_texture->Save(s);
|
||||
@@ -3457,10 +3450,7 @@ void GSRendererHW::Draw()
|
||||
GSTextureCache::RenderTarget, m_cached_ctx.ZBUF.Block(), m_cached_ctx.ZBUF.PSM, zm);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
|
||||
if (GSConfig.DumpGSData)
|
||||
if (GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
const bool writeback_HDR_texture = g_gs_device->GetHDRTexture() != nullptr;
|
||||
if (writeback_HDR_texture)
|
||||
@@ -3474,24 +3464,19 @@ void GSRendererHW::Draw()
|
||||
|
||||
std::string s;
|
||||
|
||||
if (rt && GSConfig.SaveRT && s_n >= GSConfig.SaveN)
|
||||
if (rt && GSConfig.SaveRT)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt1_%05x_(%05x)_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), rt->m_TEX0.TBP0, psm_str(m_cached_ctx.FRAME.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rt1_%05x_%s.bmp", s_n, frame, m_cached_ctx.FRAME.Block(), psm_str(m_cached_ctx.FRAME.PSM));
|
||||
|
||||
rt->m_texture->Save(s);
|
||||
}
|
||||
|
||||
if (ds && GSConfig.SaveDepth && s_n >= GSConfig.SaveN)
|
||||
if (ds && GSConfig.SaveDepth)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rz1_%05x_(%05x)_%s.bmp", s_n, frame, m_cached_ctx.ZBUF.Block(), ds->m_TEX0.TBP0, psm_str(m_cached_ctx.ZBUF.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rz1_%05x_%s.bmp", s_n, frame, m_cached_ctx.ZBUF.Block(), psm_str(m_cached_ctx.ZBUF.PSM));
|
||||
|
||||
ds->m_texture->Save(s);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveL > 0 && (s_n - GSConfig.SaveN) > GSConfig.SaveL)
|
||||
{
|
||||
GSConfig.DumpGSData = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (rt)
|
||||
|
||||
@@ -179,12 +179,9 @@ GSTexture* GSRendererSW::GetOutput(int i, float& scale, int& y_offset)
|
||||
|
||||
m_texture[index]->Update(out_r, m_output, pitch);
|
||||
|
||||
if (GSConfig.DumpGSData)
|
||||
if (GSConfig.SaveFrame && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
if (GSConfig.SaveFrame && s_n >= GSConfig.SaveN)
|
||||
{
|
||||
m_texture[index]->Save(GetDrawDumpPath("%05d_f%lld_fr%d_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), i, (int)curFramebuffer.Block(), psm_str(curFramebuffer.PSM)));
|
||||
}
|
||||
m_texture[index]->Save(GetDrawDumpPath("%05d_f%05lld_fr%d_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), i, (int)curFramebuffer.Block(), psm_str(curFramebuffer.PSM)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,22 +309,19 @@ void GSRendererSW::Draw()
|
||||
{
|
||||
const GSDrawingContext* context = m_context;
|
||||
|
||||
if (GSConfig.DumpGSData)
|
||||
if (GSConfig.SaveInfo && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
std::string s;
|
||||
|
||||
if (s_n >= GSConfig.SaveN)
|
||||
{
|
||||
// Dump Register state
|
||||
s = GetDrawDumpPath("%05d_context.txt", s_n);
|
||||
// Dump Register state
|
||||
s = GetDrawDumpPath("%05d_context.txt", s_n);
|
||||
|
||||
m_draw_env->Dump(s);
|
||||
m_context->Dump(s);
|
||||
m_draw_env->Dump(s);
|
||||
m_context->Dump(s);
|
||||
|
||||
// Dump vertices
|
||||
s = GetDrawDumpPath("%05d_vertex.txt", s_n);
|
||||
DumpVertices(s);
|
||||
}
|
||||
// Dump vertices
|
||||
s = GetDrawDumpPath("%05d_vertex.txt", s_n);
|
||||
DumpVertices(s);
|
||||
}
|
||||
|
||||
auto data = m_vertex_heap.make_shared<SharedData>().cast<GSRasterizerData>();
|
||||
@@ -431,9 +425,7 @@ void GSRendererSW::Draw()
|
||||
|
||||
sd->UsePages(fb_pages, m_context->offset.fb.psm(), zb_pages, m_context->offset.zb.psm());
|
||||
|
||||
//
|
||||
|
||||
if (GSConfig.DumpGSData)
|
||||
if (GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
Sync(2);
|
||||
|
||||
@@ -444,36 +436,36 @@ void GSRendererSW::Draw()
|
||||
// It will breaks the few games that really uses 16 bits RT
|
||||
bool texture_shuffle = ((context->FRAME.PSM & 0x2) && ((context->TEX0.PSM & 3) == 2) && (m_vt.m_primclass == GS_SPRITE_CLASS));
|
||||
|
||||
if (GSConfig.SaveTexture && s_n >= GSConfig.SaveN && PRIM->TME)
|
||||
if (GSConfig.SaveTexture && PRIM->TME)
|
||||
{
|
||||
if (texture_shuffle)
|
||||
{
|
||||
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
||||
s = GetDrawDumpPath("%05d_f%lld_itexraw_%05x_32bits.bmp", s_n, frame, (int)m_context->TEX0.TBP0);
|
||||
s = GetDrawDumpPath("%05d_f%05lld_itexraw_%05x_32bits.bmp", s_n, frame, (int)m_context->TEX0.TBP0);
|
||||
m_mem.SaveBMP(s, m_context->TEX0.TBP0, m_context->TEX0.TBW, 0, 1 << m_context->TEX0.TW, 1 << m_context->TEX0.TH);
|
||||
}
|
||||
|
||||
s = GetDrawDumpPath("%05d_f%lld_itexraw_%05x_%s.bmp", s_n, frame, (int)m_context->TEX0.TBP0, psm_str(m_context->TEX0.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_itexraw_%05x_%s.bmp", s_n, frame, (int)m_context->TEX0.TBP0, psm_str(m_context->TEX0.PSM));
|
||||
m_mem.SaveBMP(s, m_context->TEX0.TBP0, m_context->TEX0.TBW, m_context->TEX0.PSM, 1 << m_context->TEX0.TW, 1 << m_context->TEX0.TH);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveRT && s_n >= GSConfig.SaveN)
|
||||
if (GSConfig.SaveRT)
|
||||
{
|
||||
|
||||
if (texture_shuffle)
|
||||
{
|
||||
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt0_%05x_32bits.bmp", s_n, frame, m_context->FRAME.Block());
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rt0_%05x_32bits.bmp", s_n, frame, m_context->FRAME.Block());
|
||||
m_mem.SaveBMP(s, m_context->FRAME.Block(), m_context->FRAME.FBW, 0, r.z, r.w);
|
||||
}
|
||||
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt0_%05x_%s.bmp", s_n, frame, m_context->FRAME.Block(), psm_str(m_context->FRAME.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rt0_%05x_%s.bmp", s_n, frame, m_context->FRAME.Block(), psm_str(m_context->FRAME.PSM));
|
||||
m_mem.SaveBMP(s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, r.z, r.w);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveDepth && s_n >= GSConfig.SaveN)
|
||||
if (GSConfig.SaveDepth)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rz0_%05x_%s.bmp", s_n, frame, m_context->ZBUF.Block(), psm_str(m_context->ZBUF.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rz0_%05x_%s.bmp", s_n, frame, m_context->ZBUF.Block(), psm_str(m_context->ZBUF.PSM));
|
||||
|
||||
m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, r.z, r.w);
|
||||
}
|
||||
@@ -482,30 +474,25 @@ void GSRendererSW::Draw()
|
||||
|
||||
Sync(3);
|
||||
|
||||
if (GSConfig.SaveRT && s_n >= GSConfig.SaveN)
|
||||
if (GSConfig.SaveRT)
|
||||
{
|
||||
if (texture_shuffle)
|
||||
{
|
||||
// Dump the RT in 32 bits format. It helps to debug texture shuffle effect
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt1_%05x_32bits.bmp", s_n, frame, m_context->FRAME.Block());
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rt1_%05x_32bits.bmp", s_n, frame, m_context->FRAME.Block());
|
||||
m_mem.SaveBMP(s, m_context->FRAME.Block(), m_context->FRAME.FBW, 0, r.z, r.w);
|
||||
}
|
||||
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt1_%05x_%s.bmp", s_n, frame, m_context->FRAME.Block(), psm_str(m_context->FRAME.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rt1_%05x_%s.bmp", s_n, frame, m_context->FRAME.Block(), psm_str(m_context->FRAME.PSM));
|
||||
m_mem.SaveBMP(s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, r.z, r.w);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveDepth && s_n >= GSConfig.SaveN)
|
||||
if (GSConfig.SaveDepth)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rz1_%05x_%s.bmp", s_n, frame, m_context->ZBUF.Block(), psm_str(m_context->ZBUF.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rz1_%05x_%s.bmp", s_n, frame, m_context->ZBUF.Block(), psm_str(m_context->ZBUF.PSM));
|
||||
|
||||
m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, r.z, r.w);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveL > 0 && (s_n - GSConfig.SaveN) > GSConfig.SaveL)
|
||||
{
|
||||
GSConfig.DumpGSData = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -585,14 +572,14 @@ void GSRendererSW::Sync(int reason)
|
||||
|
||||
if (GSConfig.SaveRT)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_rt1_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), m_context->FRAME.Block(), psm_str(m_context->FRAME.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_rt1_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), m_context->FRAME.Block(), psm_str(m_context->FRAME.PSM));
|
||||
|
||||
m_mem.SaveBMP(s, m_context->FRAME.Block(), m_context->FRAME.FBW, m_context->FRAME.PSM, PCRTCDisplays.GetFramebufferRect(-1).width(), 512);
|
||||
}
|
||||
|
||||
if (GSConfig.SaveDepth)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_zb1_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), m_context->ZBUF.Block(), psm_str(m_context->ZBUF.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_zb1_%05x_%s.bmp", s_n, g_perfmon.GetFrame(), m_context->ZBUF.Block(), psm_str(m_context->ZBUF.PSM));
|
||||
|
||||
m_mem.SaveBMP(s, m_context->ZBUF.Block(), m_context->FRAME.FBW, m_context->ZBUF.PSM, PCRTCDisplays.GetFramebufferRect(-1).width(), 512);
|
||||
}
|
||||
@@ -1546,30 +1533,25 @@ void GSRendererSW::SharedData::UpdateSource()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO
|
||||
|
||||
if (GSConfig.DumpGSData)
|
||||
if (GSConfig.SaveTexture && GSConfig.ShouldDump(s_n, g_perfmon.GetFrame()))
|
||||
{
|
||||
const u64 frame = g_perfmon.GetFrame();
|
||||
|
||||
std::string s;
|
||||
|
||||
if (GSConfig.SaveTexture && g_gs_renderer->s_n >= GSConfig.SaveN)
|
||||
for (size_t i = 0; m_tex[i].t; i++)
|
||||
{
|
||||
for (size_t i = 0; m_tex[i].t; i++)
|
||||
{
|
||||
const GIFRegTEX0& TEX0 = g_gs_renderer->GetTex0Layer(i);
|
||||
const GIFRegTEX0& TEX0 = g_gs_renderer->GetTex0Layer(i);
|
||||
|
||||
s = GetDrawDumpPath("%05d_f%lld_itex%d_%05x_%s.bmp", g_gs_renderer->s_n, frame, i, TEX0.TBP0, psm_str(TEX0.PSM));
|
||||
s = GetDrawDumpPath("%05d_f%05lld_itex%d_%05x_%s.bmp", g_gs_renderer->s_n, frame, i, TEX0.TBP0, psm_str(TEX0.PSM));
|
||||
|
||||
m_tex[i].t->Save(s);
|
||||
}
|
||||
m_tex[i].t->Save(s);
|
||||
}
|
||||
|
||||
if (global.clut)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%lld_itexp_%05x_%s.bmp", g_gs_renderer->s_n, frame, (int)g_gs_renderer->m_context->TEX0.CBP, psm_str(g_gs_renderer->m_context->TEX0.CPSM));
|
||||
GSPng::Save(IsDevBuild ? GSPng::RGB_A_PNG : GSPng::RGB_PNG, s, reinterpret_cast<const u8*>(global.clut), 256, 1, sizeof(u32) * 256, GSConfig.PNGCompressionLevel, false);
|
||||
}
|
||||
if (global.clut)
|
||||
{
|
||||
s = GetDrawDumpPath("%05d_f%05lld_itexp_%05x_%s.bmp", g_gs_renderer->s_n, frame, (int)g_gs_renderer->m_context->TEX0.CBP, psm_str(g_gs_renderer->m_context->TEX0.CPSM));
|
||||
GSPng::Save((IsDevBuild || GSConfig.SaveAlpha) ? GSPng::RGB_A_PNG : GSPng::RGB_PNG, s, reinterpret_cast<const u8*>(global.clut), 256, 1, sizeof(u32) * 256, GSConfig.PNGCompressionLevel, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ bool GSTextureCacheSW::Texture::Save(const std::string& fn) const
|
||||
const u32 w = 1 << m_TEX0.TW;
|
||||
const u32 h = 1 << m_TEX0.TH;
|
||||
|
||||
constexpr GSPng::Format format = IsDevBuild ? GSPng::RGB_A_PNG : GSPng::RGB_PNG;
|
||||
const GSPng::Format format = (IsDevBuild || GSConfig.SaveAlpha) ? GSPng::RGB_A_PNG : GSPng::RGB_PNG;
|
||||
const GSLocalMemory::psm_t& psm = GSLocalMemory::m_psm[m_TEX0.PSM];
|
||||
const u8* RESTRICT src = (u8*)m_buff;
|
||||
const u32 src_pitch = 1u << (m_tw + (psm.pal == 0 ? 2 : 0));
|
||||
|
||||
@@ -247,6 +247,14 @@ u32 SDLInputSource::ParseRGBForPlayerId(const std::string_view str, u32 player_i
|
||||
return color;
|
||||
}
|
||||
|
||||
void SDLInputSource::ResetRGBForAllPlayers(SettingsInterface& si)
|
||||
{
|
||||
for (u32 player_id = 0; player_id < MAX_LED_COLORS; player_id++)
|
||||
{
|
||||
si.DeleteValue("SDLExtra", fmt::format("Player{}LED", player_id).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void SDLInputSource::SetHints()
|
||||
{
|
||||
if (const std::string upath = Path::Combine(EmuFolders::DataRoot, CONTROLLER_DB_FILENAME); FileSystem::FileExists(upath.c_str()))
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
|
||||
static u32 GetRGBForPlayerId(SettingsInterface& si, u32 player_id);
|
||||
static u32 ParseRGBForPlayerId(const std::string_view str, u32 player_id);
|
||||
static void ResetRGBForAllPlayers(SettingsInterface& si);
|
||||
|
||||
private:
|
||||
struct ControllerData
|
||||
|
||||
@@ -840,6 +840,10 @@ bool Pcsx2Config::GSOptions::OptionsAreEqual(const GSOptions& right) const
|
||||
OpEqu(PNGCompressionLevel) &&
|
||||
OpEqu(SaveN) &&
|
||||
OpEqu(SaveL) &&
|
||||
OpEqu(SaveB) &&
|
||||
OpEqu(SaveNF) &&
|
||||
OpEqu(SaveLF) &&
|
||||
OpEqu(SaveBF) &&
|
||||
|
||||
OpEqu(ExclusiveFullscreenControl) &&
|
||||
OpEqu(ScreenshotSize) &&
|
||||
@@ -966,6 +970,8 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
|
||||
SettingsWrapBitBoolEx(SaveFrame, "savef");
|
||||
SettingsWrapBitBoolEx(SaveTexture, "savet");
|
||||
SettingsWrapBitBoolEx(SaveDepth, "savez");
|
||||
SettingsWrapBitBoolEx(SaveAlpha, "savea");
|
||||
SettingsWrapBitBoolEx(SaveInfo, "savei");
|
||||
SettingsWrapBitBool(DumpReplaceableTextures);
|
||||
SettingsWrapBitBool(DumpReplaceableMipmaps);
|
||||
SettingsWrapBitBool(DumpTexturesWithFMVActive);
|
||||
@@ -1026,6 +1032,10 @@ void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
|
||||
SettingsWrapBitfieldEx(PNGCompressionLevel, "png_compression_level");
|
||||
SettingsWrapBitfieldEx(SaveN, "saven");
|
||||
SettingsWrapBitfieldEx(SaveL, "savel");
|
||||
SettingsWrapBitfieldEx(SaveB, "saveb");
|
||||
SettingsWrapBitfieldEx(SaveNF, "savenf");
|
||||
SettingsWrapBitfieldEx(SaveLF, "savelf");
|
||||
SettingsWrapBitfieldEx(SaveBF, "savebf");
|
||||
|
||||
SettingsWrapEntryEx(CaptureContainer, "CaptureContainer");
|
||||
SettingsWrapEntryEx(VideoCaptureCodec, "VideoCaptureCodec");
|
||||
@@ -1110,6 +1120,13 @@ bool Pcsx2Config::GSOptions::UseHardwareRenderer() const
|
||||
return (Renderer != GSRendererType::Null && Renderer != GSRendererType::SW);
|
||||
}
|
||||
|
||||
bool Pcsx2Config::GSOptions::ShouldDump(int draw, int frame) const
|
||||
{
|
||||
return DumpGSData &&
|
||||
(SaveN <= draw) && ((SaveL < 0) || (draw < SaveN + SaveL)) && (draw % SaveB == 0) &&
|
||||
(SaveNF <= frame) && ((SaveLF < 0) || (frame < SaveNF + SaveLF)) && (frame % SaveBF == 0);
|
||||
}
|
||||
|
||||
static constexpr const std::array s_spu2_sync_mode_names = {
|
||||
"Disabled",
|
||||
"TimeStretch",
|
||||
@@ -2036,6 +2053,7 @@ void Pcsx2Config::CopyRuntimeConfig(Pcsx2Config& cfg)
|
||||
CurrentIRX = std::move(cfg.CurrentIRX);
|
||||
CurrentGameArgs = std::move(cfg.CurrentGameArgs);
|
||||
CurrentAspectRatio = cfg.CurrentAspectRatio;
|
||||
IsPortableMode = cfg.IsPortableMode;
|
||||
|
||||
for (u32 i = 0; i < sizeof(Mcd) / sizeof(Mcd[0]); i++)
|
||||
{
|
||||
@@ -2122,8 +2140,15 @@ bool EmuFolders::SetResourcesDirectory()
|
||||
|
||||
bool EmuFolders::ShouldUsePortableMode()
|
||||
{
|
||||
// Check whether portable.ini exists in the program directory.
|
||||
return FileSystem::FileExists(Path::Combine(AppRoot, "portable.ini").c_str()) || FileSystem::FileExists(Path::Combine(AppRoot, "portable.txt").c_str());
|
||||
// Check whether portable.ini/txt exists in the program directory or the `-portable` launch arguments have been passed.
|
||||
if (FileSystem::FileExists(Path::Combine(AppRoot, "portable.ini").c_str()) ||
|
||||
FileSystem::FileExists(Path::Combine(AppRoot, "portable.txt").c_str()) ||
|
||||
EmuConfig.IsPortableMode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string EmuFolders::GetPortableModePath()
|
||||
@@ -2178,7 +2203,22 @@ bool EmuFolders::SetDataDirectory(Error* error)
|
||||
|
||||
// couldn't determine the data directory, or using portable mode? fallback to portable.
|
||||
if (DataRoot.empty())
|
||||
{
|
||||
#if defined(__linux__)
|
||||
// special check if we're on appimage
|
||||
// always make sure that DataRoot
|
||||
// is adjacent next to the appimage
|
||||
if (getenv("APPIMAGE"))
|
||||
{
|
||||
std::string_view appimage_path = Path::GetDirectory(getenv("APPIMAGE"));
|
||||
DataRoot = Path::RealPath(Path::Combine(appimage_path, "PCSX2"));
|
||||
}
|
||||
else
|
||||
DataRoot = Path::Combine(AppRoot, GetPortableModePath());
|
||||
#else
|
||||
DataRoot = Path::Combine(AppRoot, GetPortableModePath());
|
||||
#endif
|
||||
}
|
||||
|
||||
// inis is always below the data root
|
||||
Settings = Path::Combine(DataRoot, "inis");
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "MTVU.h"
|
||||
#include "VMManager.h"
|
||||
|
||||
static const float UPDATE_INTERVAL = 0.5f;
|
||||
static const float UPDATE_INTERVAL = 0.25f;
|
||||
|
||||
static float s_fps = 0.0f;
|
||||
static float s_internal_fps = 0.0f;
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "SIO/Pad/PadNotConnected.h"
|
||||
#include "SIO/Sio.h"
|
||||
|
||||
#include "Input/SDLInputSource.h"
|
||||
|
||||
#include "IconsFontAwesome5.h"
|
||||
|
||||
#include "VMManager.h"
|
||||
@@ -167,6 +169,7 @@ void Pad::SetDefaultControllerConfig(SettingsInterface& si)
|
||||
si.SetBoolValue("Pad", "MultitapPort2", false);
|
||||
si.SetFloatValue("Pad", "PointerXScale", 8.0f);
|
||||
si.SetFloatValue("Pad", "PointerYScale", 8.0f);
|
||||
SDLInputSource::ResetRGBForAllPlayers(si);
|
||||
|
||||
// PCSX2 Controller Settings - Default pad types and parameters.
|
||||
for (u32 i = 0; i < Pad::NUM_CONTROLLER_PORTS; i++)
|
||||
|
||||
@@ -1851,7 +1851,7 @@ bool VMManager::DoSaveState(const char* filename, s32 slot_for_message, bool zip
|
||||
Console.WriteLn(fmt::format("Creating save state backup {}...", backup_filename));
|
||||
if (!FileSystem::RenamePath(filename, backup_filename.c_str()))
|
||||
{
|
||||
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||
Host::AddIconOSDMessage(osd_key, ICON_FA_EXCLAMATION_TRIANGLE,
|
||||
fmt::format(
|
||||
TRANSLATE_FS("VMManager", "Failed to back up old save state {}."), Path::GetFileName(filename)),
|
||||
Host::OSD_ERROR_DURATION);
|
||||
@@ -2234,7 +2234,7 @@ bool VMManager::ChangeDisc(CDVD_SourceType source, std::string path)
|
||||
|
||||
CDVDsys_ChangeSource(source);
|
||||
if (!path.empty())
|
||||
CDVDsys_SetFile(source, std::move(path));
|
||||
CDVDsys_SetFile(source, path);
|
||||
|
||||
Error error;
|
||||
const bool result = DoCDVDopen(&error);
|
||||
|
||||
@@ -39,6 +39,13 @@ __fi void makeMergeMask(u32& x)
|
||||
x = ((x & 0x40) >> 6) | ((x & 0x10) >> 3) | (x & 4) | ((x & 1) << 3);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
__fi void makeMergeMaskAllColumns(u32& x)
|
||||
{
|
||||
x = ((x & 0x40404040) >> 6) | ((x & 0x10101010) >> 3) | (x & 0x04040404) | ((x & 0x01010101) << 3);
|
||||
}
|
||||
#endif
|
||||
|
||||
__fi void VifUnpackSSE_Dynarec::SetMasks(int cS) const
|
||||
{
|
||||
const int idx = v.idx;
|
||||
@@ -260,11 +267,8 @@ void VifUnpackSSE_Dynarec::CompileRoutine()
|
||||
#ifdef _WIN32
|
||||
// See SetMasks()
|
||||
const u32 m0 = vB.mask;
|
||||
const u32 m3 = ((m0 & 0xaaaaaaaa) >> 1) & ~m0;
|
||||
const u32 m2 = (m0 & 0x55555555) & (~m0 >> 1);
|
||||
// see doMaskWrite()
|
||||
const u32 m4 = (m0 & ~((m3 << 1) | m2)) & 0x55555555;
|
||||
const u32 m5 = ~(m2 | m3 | m4) & 0x0f0f0f0f;
|
||||
u32 m3 = ((m0 & 0xaaaaaaaa) >> 1) & ~m0;
|
||||
u32 m2 = (m0 & 0x55555555) & (~m0 >> 1);
|
||||
|
||||
int regsUsed = 2;
|
||||
// Allocate column registers
|
||||
@@ -287,26 +291,36 @@ void VifUnpackSSE_Dynarec::CompileRoutine()
|
||||
// Allocate row register
|
||||
if ((doMask && m2) || doMode)
|
||||
{
|
||||
rowReg = xRegisterSSE(regsUsed);
|
||||
if (regsUsed - 6 >= 0)
|
||||
nonVolatileRegs[regsUsed - 6] = rowReg;
|
||||
rowReg = xRegisterSSE(regsUsed++);
|
||||
regsUsed++;
|
||||
}
|
||||
|
||||
// see doMaskWrite()
|
||||
u32 m4 = (m0 & ~((m3 << 1) | m2)) & 0x55555555;
|
||||
makeMergeMaskAllColumns(m2);
|
||||
makeMergeMaskAllColumns(m3);
|
||||
makeMergeMaskAllColumns(m4);
|
||||
const u32 m5 = ~(m2 | m3 | m4) & 0x0f0f0f0f;
|
||||
|
||||
// Allocate temp register
|
||||
if (doMode && (doMode != 3) &&
|
||||
doMask && m5 != 0x0f0f0f0f)
|
||||
{
|
||||
tmpReg = xRegisterSSE(regsUsed);
|
||||
if (regsUsed - 6 >= 0)
|
||||
nonVolatileRegs[regsUsed - 6] = tmpReg;
|
||||
tmpReg = xRegisterSSE(regsUsed++);
|
||||
regsUsed++;
|
||||
}
|
||||
|
||||
// Allocate zero register
|
||||
if (needXmmZero)
|
||||
{
|
||||
zeroReg = xRegisterSSE(regsUsed);
|
||||
if (regsUsed - 6 >= 0)
|
||||
nonVolatileRegs[regsUsed - 6] = zeroReg;
|
||||
zeroReg = xRegisterSSE(regsUsed++);
|
||||
regsUsed++;
|
||||
}
|
||||
|
||||
regsUsed -= 6;
|
||||
|
||||
@@ -594,6 +594,9 @@ static void recResetRaw()
|
||||
|
||||
g_branch = 0;
|
||||
g_resetEeScalingStats = true;
|
||||
|
||||
memset(manual_page, 0, sizeof(manual_page));
|
||||
memset(manual_counter, 0, sizeof(manual_counter));
|
||||
}
|
||||
|
||||
void recShutdown()
|
||||
|
||||
Reference in New Issue
Block a user