Compare commits

...

35 Commits

Author SHA1 Message Date
chaoticgd
dc9e531cb1 Qt: Fix various settings window layout issues 2025-08-21 19:04:57 -04:00
chaoticgd
2bd151e6f2 Qt: Improve logic for calculating settings widget margins 2025-08-21 19:04:57 -04:00
chaoticgd
ae084643c4 Qt: Refactor the remaining settings widgets 2025-08-21 19:04:57 -04:00
chaoticgd
bd1b91b862 Qt: Refactor graphics settings widget 2025-08-21 19:04:57 -04:00
chaoticgd
f221c85e17 Qt: Refactor debug settings widget 2025-08-21 19:04:57 -04:00
dependabot[bot]
e2fe93e403 [ci skip] Bump the ci-deps group across 1 directory with 2 updates (#13150)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 18:54:16 -04:00
JordanTheToaster
f98e23f061 GameDB: Various fixes 2025-08-21 18:51:54 -04:00
Gd7
18f6518d41 GameDB: Final Fantasy X FMV Fix.
Added preloadFrameData to the gamedb for every version of Final Fantasy X as well as removing the obsolete SoftwareRendererFMVHack setting.
2025-08-21 19:38:19 +02:00
JordanTheToaster
74598b3055 GameDB: DQV Mount Evil camera fixes 2025-08-20 23:56:12 +02:00
TJnotJT
6159cd4114 GS/SW: Fix bbox computation in SW draw().
The bbox was missing right/bottom pixels if they were exactly on a pixel center (exact integer). Removed the extra check for 0 width/height bbox for lines/points since they are no longer needed (the bbox will always be at least 1 pixel now). Appears to only affect the SW rasterizer when the bbox right/bottom end point is a multiple of 16 (SW rasterizer allocates scanlines to threads in blocks of 16).
2025-08-20 23:55:49 +02:00
TJnotJT
3c70d7f575 GS/HW: Handle texture shuffle sprite not 16-pixel-multiple wide. 2025-08-20 21:53:55 +02:00
JordanTheToaster
bd70f1ca4a GameDB: Summoner missing shadows fix 2025-08-19 19:42:13 +02:00
PCSX2 Bot
0e67507d3a [ci skip] PAD: Update to latest controller database. 2025-08-18 19:08:52 +02:00
KamFretoZ
beab573758 GameDB: Pac-Man Rally Fixes 2025-08-18 13:50:15 +02:00
TheLastRar
e46890fd76 FSUI: Use ImGui::Shortcut for most input handling 2025-08-16 03:29:21 +02:00
TheLastRar
3888638f8c FSUI: Don't move IMGUI cursor unnecessarily in DrawSaveStateSelector() 2025-08-16 03:29:21 +02:00
Flávio Sousa
44778c374f Achievements: Move notification position setting to "Notifications" section 2025-08-16 03:27:48 +02:00
Flávio Sousa
207d4df5e7 Achievements: Add in-game leaderboard overlays toggle 2025-08-16 03:27:48 +02:00
KamFretoZ
d454a7dafc Qt/MainWindow: Fix unused variable warning 2025-08-16 03:24:28 +02:00
KamFretoZ
53b4ddc4cb FSUI: Swap Game List and Start Game icon 2025-08-16 03:24:28 +02:00
KamFretoZ
23c8780bff FSUI: Add confirmation dialog to Reset Controller Settings 2025-08-16 03:24:28 +02:00
TheLastRar
958ab4048c FSUI: Fix navigation of leaderboards 2025-08-16 03:23:25 +02:00
TJnotJT
657d20d36e GS: Small fix/addition to info dumping. 2025-08-16 03:22:27 +02:00
TJnotJT
fde045241f GS: Allow full dirty rect on zero age targets.
Allows EE->GS transfers to invalidate targets updated in the current draw to be invalidated if they are fully overwritten by the transfer.
2025-08-16 03:17:51 +02:00
TheTechnician27
b3be566426 usb-msd: separate message for empty image path 2025-08-15 18:25:50 -04:00
lightningterror
1eebb550a8 GS/HW: Adjust updating rt and ds to improve resizing.
Add condition that checks if it's a memclear and min vertex
alpha is higher than 0 (rt), min vertex z is higher than 0 (z).
2025-08-13 02:08:26 +02:00
Mrlinkwii
fbe5f88417 UI : Correct game-specific folders option label 2025-08-12 22:06:59 +02:00
PCSX2 Bot
d9609b9f51 [ci skip] PAD: Update to latest controller database. 2025-08-11 22:43:42 +02:00
Silent
815d7b2967 rapidyaml: c4 namespace is an implementation detail, use ryml instead 2025-08-09 18:34:16 -04:00
Silent
98ce7c81c8 MemoryCardFolder: Prevent rapidyaml from including trailing \0's in the index file names
Works around a possible rapidyaml bug tracked here:
https://github.com/biojppm/rapidyaml/issues/531

Also includes code to "repair" damaged memory card index on loading
by trimming the redundant \0's
2025-08-09 18:34:16 -04:00
lightningterror
e4d8f3d901 GS/TC: Resize target instead of deleting it.
Valids and drawn since last read doesn't match, keep the target but resize it.
2025-08-08 23:00:01 +02:00
JordanTheToaster
ca5dfdd25c GameDB: Army Men Major Malfunction fixes 2025-08-07 15:46:03 +02:00
Eamonn Rea
11634c6567 Qt: Add tooltips for GameListWidget buttons
Adds tooltips for Game List, Game Grid, and Show Titles
2025-08-07 15:45:32 +02:00
Eamonn Rea
f6a313f1a5 Qt: Use default scrollbar policy 2025-08-07 15:44:13 +02:00
Eamonn Rea
1a46898cde Qt: Add shortcut for Search Bar 2025-08-05 23:13:30 +02:00
108 changed files with 6789 additions and 6464 deletions

View File

@@ -11,7 +11,7 @@ jobs:
name: "Update Base Translation"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Update Base Translation
run: ./.github/workflows/scripts/common/update_base_translation.sh

View File

@@ -9,7 +9,7 @@ jobs:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Get Latest DB and Prepare DB File
run: |

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install Packages
run: |

View File

@@ -51,7 +51,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
set-safe-directory: ${{ env.GITHUB_WORKSPACE }}
# 10 here, since the odds of having 10 untagged commits in a row should be slim to none

View File

@@ -59,7 +59,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

View File

@@ -48,7 +48,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
# actions/checkout elides tags, fetch them primarily for releases
- name: Fetch Tags

View File

@@ -35,7 +35,7 @@ jobs:
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
# Docs - https://github.com/mathieudutour/github-tag-action
- name: Bump Version and Push Tag
@@ -163,12 +163,12 @@ jobs:
name: "Upload Artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Prepare Artifact Folder
run: mkdir ./ci-artifacts/
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
name: Download all Artifacts
with:
path: ./ci-artifacts/

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: windows-2025
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Verify VS Project Files
run: .github\workflows\scripts\windows\validate-vs-filters.ps1

View File

@@ -56,7 +56,7 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Configure MSBuild Clang Version
if: inputs.configuration != 'CMake'

View File

@@ -1701,6 +1701,8 @@ SCAJ-20074:
SCAJ-20075:
name: "Dragon Quest V - Bride of the Sky"
region: "NTSC-Unk"
roundModes:
eeDivRoundMode: 3 # Fixes camera issues at the top of mount evil.
SCAJ-20076:
name: "Armored Core - Nexus [Disc 1]"
region: "NTSC-Unk"
@@ -2985,6 +2987,7 @@ SCED-50642:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SCED-50660:
name: "Dropship - United Peace Force"
region: "PAL-A"
@@ -4857,6 +4860,7 @@ SCES-50490:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SCES-50491:
name: "Final Fantasy X"
region: "PAL-F"
@@ -4871,12 +4875,13 @@ SCES-50491:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SCES-50492:
name: "Final Fantasy X"
region: "PAL-G"
compat: 5
gameFixes:
- SoftwareRendererFMVHack # Fixes interlacing.
compat: 5
roundModes:
eeRoundMode: 2 # Fixes cutscene animations while slightly dislocating a few select meshes. Setting round mode to Chop/Zero or Nearest fixes the issues with meshes at the cost of breaking important cutscenes.
clampModes:
@@ -4886,6 +4891,7 @@ SCES-50492:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SCES-50493:
name: "Final Fantasy X"
region: "PAL-I"
@@ -4900,6 +4906,7 @@ SCES-50493:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SCES-50494:
name: "Final Fantasy X"
region: "PAL-S"
@@ -4914,6 +4921,7 @@ SCES-50494:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SCES-50499:
name: "Ecco the Dolphin - Defender of the Future"
region: "PAL-M5"
@@ -13860,7 +13868,7 @@ SLED-53731:
name: "Battlefield 2 - Modern Combat [Demo]"
region: "PAL-E"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -24108,7 +24116,7 @@ SLES-53729:
name: "Battlefield 2 - Modern Combat"
region: "PAL-M4"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -24118,7 +24126,7 @@ SLES-53730:
name: "Battlefield 2 - Modern Combat"
region: "PAL-M3"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -24870,6 +24878,12 @@ SLES-53996:
name: "Army Men - Major Malfunction"
region: "PAL-E"
compat: 5
gsHWFixes:
recommendedBlendingLevel: 4 # Fixes missing text glow.
halfPixelOffset: 5 # Fixes misaligned bloom.
nativeScaling: 1 # Fixes misaligned bloom.
textureInsideRT: 1 # Fixes bottom half rendering and corrupted shadows.
PCRTCOverscan: 1 # Adjusts image upwards to center it correctly.
SLES-53998:
name: "OutRun 2006 - Coast 2 Coast"
region: "PAL-M5"
@@ -26718,7 +26732,8 @@ SLES-54584:
name: "Pac-Man Rally"
region: "PAL-M5"
gsHWFixes:
halfPixelOffset: 2 # Fixes depth line.
textureInsideRT: 1 # Fixes Half blackscreen on the splitscreen couch co-op mode.
halfPixelOffset: 5 # Fixes depth line.
clampModes:
vuClampMode: 3 # Fixes bad geometry.
SLES-54586:
@@ -30063,13 +30078,19 @@ SLES-55676:
SLES-82001:
name: "Summoner"
region: "PAL-E"
clampModes:
eeClampMode: 2 # Fixes missing shadows and indicators.
SLES-82003:
name: "Summoner"
region: "PAL-F"
clampModes:
eeClampMode: 2 # Fixes missing shadows and indicators.
SLES-82005:
name: "Summoner"
region: "PAL-G"
compat: 5
clampModes:
eeClampMode: 2 # Fixes missing shadows and indicators.
SLES-82009:
name: "Metal Gear Solid 2 - Substance"
region: "PAL-M5"
@@ -31414,6 +31435,7 @@ SLKA-25214:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLKA-25215:
name: "Shining Wind"
region: "NTSC-K"
@@ -32862,7 +32884,7 @@ SLPM-55034:
name-en: "Battlefield 2 - Modern Combat [EA:SY! 1980]"
region: "NTSC-J"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -40685,6 +40707,7 @@ SLPM-65115:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLPM-65116:
name: "リリーのアトリエ プラス ザールブルグの錬金術士3"
name-sort: "りりーのあとりえ ぷらす ざーるぶるぐのれんきんじゅつし3"
@@ -43203,6 +43226,8 @@ SLPM-65555:
name-en: "Dragon Quest V - Tenkuu no Hanayome"
region: "NTSC-J"
compat: 5
roundModes:
eeDivRoundMode: 3 # Fixes camera issues at the top of mount evil.
SLPM-65556:
name: "信長の野望・天下創世"
name-sort: "のぶながのやぼう てんかそうせい"
@@ -46580,6 +46605,7 @@ SLPM-66124:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLPM-66125:
name: "ファイナルファンタジーⅩ-2 [Ultimate Hits]"
name-sort: "ふぁいなるふぁんたじー10-2 [Ultimate Hits]"
@@ -47086,7 +47112,7 @@ SLPM-66206:
name-en: "Battlefield 2 - Modern Combat"
region: "NTSC-J"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -48862,6 +48888,8 @@ SLPM-66480:
name-en: "Dragon Quest V - Tenkuu no Hanayome [Ultimate Hits]"
region: "NTSC-J"
compat: 5
roundModes:
eeDivRoundMode: 3 # Fixes camera issues at the top of mount evil.
SLPM-66481:
name: "ドラゴンクエストⅧ 空と海と大地と呪われし姫君 [Ultimate Hits]"
name-sort: "どらごんくえすと8 そらとうみとだいちとのろわれしひめぎみ [Ultimate Hits]"
@@ -49897,7 +49925,7 @@ SLPM-66651:
name-en: "Battlefield 2 - Modern Combat [EA Best Hits]"
region: "NTSC-J"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -50099,6 +50127,7 @@ SLPM-66677:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLPM-66678:
name: "ファイナルファンタジーⅩ-2 インターナショナル+ラストミッション [Ultimate Hits]"
name-sort: "ふぁいなるふぁんたじー10-2 いんたーなしょなる+らすとみっしょん [Ultimate Hits]"
@@ -52161,6 +52190,7 @@ SLPM-67513:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLPM-67514:
name: "Kessen"
region: "NTSC-K"
@@ -56199,6 +56229,7 @@ SLPS-25050:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLPS-25051:
name: "Missing Blue [通常版]"
name-sort: "みっしんぐ ぶるー [つうじょうばん]"
@@ -56427,6 +56458,7 @@ SLPS-25088:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLPS-25089:
name: "SALT LAKE 2002"
name-sort: "そるとれいく 2002"
@@ -61852,6 +61884,7 @@ SLPS-72501:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLPS-72502:
name: "テイルズ オブ デスティニー2 [MEGA HITS!]"
name-sort: "ているず おぶ ですてぃにー2 [MEGA HITS!]"
@@ -63041,6 +63074,8 @@ SLUS-20074:
name: "Summoner"
region: "NTSC-U"
compat: 5
clampModes:
eeClampMode: 2 # Fixes missing shadows and indicators.
SLUS-20075:
name: "Disney's Jungle Book - Rhythm & Groove"
region: "NTSC-U"
@@ -64077,6 +64112,7 @@ SLUS-20312:
recommendedBlendingLevel: 4 # Fixes missing effect on the magus sisters.
roundSprite: 2 # Fixes font artifacts.
autoFlush: 1 # Fixes blur effect on attacks.
preloadFrameData: 1 # Fixes an issue that causes FMVs to flicker black when subtitles appear on screen.
SLUS-20313:
name: "Wave Rally"
region: "NTSC-U"
@@ -68071,7 +68107,7 @@ SLUS-21026:
region: "NTSC-U"
compat: 5
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -70052,7 +70088,7 @@ SLUS-21328:
clampModes:
vuClampMode: 3 # Fixes bad geometry.
gsHWFixes:
halfPixelOffset: 2 # Fixes depth line.
halfPixelOffset: 5 # Fixes depth line.
patches:
default:
content: |-
@@ -74152,7 +74188,7 @@ SLUS-29117:
name: "Battlefield 2 - Modern Combat [Public Beta Vol.1.0]"
region: "NTSC-U"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -74308,7 +74344,7 @@ SLUS-29152:
name: "Battlefield 2 - Modern Combat [Regular Demo]"
region: "NTSC-U"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.
@@ -74425,7 +74461,7 @@ SLUS-29172:
name: "Battlefield 2 - Modern Combat [Demo]"
region: "NTSC-U"
gsHWFixes:
minimumBlendingLevel: 4 # Fixes ground texture rendering.
recommendedBlendingLevel: 4 # Fixes ground texture rendering.
autoFlush: 1 # Post-processing.
halfPixelOffset: 2 # Offset post-processing.
texturePreloading: 1 # Improves performance.

View File

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@@ -10,6 +10,7 @@
03000000d0160000060d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000d0160000070d000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000d0160000600a000000000000,4Play Adapter,a:b1,b:b3,back:b4,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b6,leftstick:b14,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b15,righttrigger:b9,rightx:a3,righty:a4,start:b5,x:b0,y:b2,platform:Windows,
03000000c82d00001930000000000000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a3,righty:a4,start:b11,platform:Windows,
03000000c82d00000031000000000000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000531000000000000,8BitDo Adapter 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000951000000000000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a2,rightx:a3,righty:a5,start:b11,platform:Windows,
@@ -50,6 +51,7 @@
03000000c82d00000360000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000361000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000660000000000000,8BitDo Pro 2,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000960000000000000,8BitDo Pro 3,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,paddle1:b17,paddle2:b16,paddle3:b2,paddle4:b5,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000131000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000231000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000331000000000000,8BitDo Receiver,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b4,y:b3,platform:Windows,
@@ -843,6 +845,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
# Mac OS X
030000008f0e00000300000009010000,2 In 1 Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Mac OS X,
03000000c82d00001930000000020000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Mac OS X,
03000000c82d00001930000001000000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Mac OS X,
03000000c82d00000031000001000000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00000531000000020000,8BitDo Adapter 2,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000c82d00000951000000010000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Mac OS X,
@@ -1148,6 +1152,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000120c0000101e000000010000,Zeroplus P4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
# Linux
03000000c82d00001930000011010000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Linux,
05000000c82d00001930000001000000,8BitDo 64,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,righttrigger:b9,rightx:a2,righty:a3,start:b11,platform:Linux,
03000000c82d00000031000011010000,8BitDo Adapter,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b2,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:b9,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
03000000c82d00000631000000010000,8BitDo Adapter 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
03000000c82d00000951000000010000,8BitDo Dogbone,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftx:a0,lefty:a1,rightx:a2,righty:a3,start:b11,platform:Linux,
@@ -1625,7 +1631,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
0300132d9b2800006500000001010000,Raphnet GameCube Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
030000009b2800003200000001010000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
030000009b2800006000000001010000,Raphnet GC and N64 Adapter,a:b0,b:b7,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,rightx:a3,righty:a4,start:b3,x:b1,y:b8,platform:Linux,
030000009b2800003c00000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
030000009b2800006100000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
030000009b2800006300000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
030000009b2800006400000001010000,Raphnet N64 Adapter,+rightx:b9,+righty:b7,-rightx:b8,-righty:b6,a:b0,b:b1,dpdown:b11,dpleft:b12,dpright:b13,dpup:b10,leftshoulder:b4,lefttrigger:b2,leftx:a0,lefty:a1,rightshoulder:b5,start:b3,platform:Linux,
030000009b2800008000000020020000,Raphnet Wii Classic Adapter,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Linux,
030000009b2800008000000001010000,Raphnet Wii Classic Adapter V3,a:b1,b:b4,back:b2,dpdown:b13,dpleft:b14,dpright:b15,dpup:b12,leftshoulder:b6,rightshoulder:b7,start:b3,x:b0,y:b5,platform:Linux,
@@ -1824,8 +1832,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
060000005e040000120b00000b050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
060000005e040000120b00000d050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
060000005e040000120b00000f050000,Xbox Series Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
060000005e040000120b000011050000,Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000130b000022050000,Xbox Series X Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
060000005e040000120b000011050000,Xbox Series X Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
050000005e040000200b000013050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
050000005e040000200b000017050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,
050000005e040000200b000023050000,Xbox Wireless Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,

View File

@@ -83,15 +83,15 @@ target_sources(pcsx2-qt PRIVATE
Settings/ControllerSettingsWindow.h
Settings/ControllerSettingsWindow.ui
Settings/ControllerSettingWidgetBinder.h
Settings/DebugAnalysisSettingsTab.ui
Settings/DebugAnalysisSettingsWidget.cpp
Settings/DebugAnalysisSettingsWidget.h
Settings/DebugAnalysisSettingsWidget.ui
Settings/DebugUserInterfaceSettingsWidget.cpp
Settings/DebugUserInterfaceSettingsWidget.h
Settings/DebugUserInterfaceSettingsWidget.ui
Settings/DebugGSSettingsTab.ui
Settings/DebugLoggingSettingsTab.ui
Settings/DebugUserInterfaceSettingsTab.ui
Settings/DebugSettingsWidget.cpp
Settings/DebugSettingsWidget.h
Settings/DebugSettingsWidget.ui
Settings/EmulationSettingsWidget.cpp
Settings/EmulationSettingsWidget.h
Settings/EmulationSettingsWidget.ui
@@ -114,9 +114,19 @@ target_sources(pcsx2-qt PRIVATE
Settings/GameSummaryWidget.cpp
Settings/GameSummaryWidget.h
Settings/GameSummaryWidget.ui
Settings/GraphicsAdvancedSettingsTab.ui
Settings/GraphicsDisplaySettingsTab.ui
Settings/GraphicsHardwareFixesSettingsTab.ui
Settings/GraphicsHardwareRenderingSettingsTab.ui
Settings/GraphicsMediaCaptureSettingsTab.ui
Settings/GraphicsOnScreenDisplaySettingsTab.ui
Settings/GraphicsPostProcessingSettingsTab.ui
Settings/GraphicsSettingsHeader.ui
Settings/GraphicsSettingsWidget.cpp
Settings/GraphicsSettingsWidget.h
Settings/GraphicsSettingsWidget.ui
Settings/GraphicsSoftwareRenderingSettingsTab.ui
Settings/GraphicsTextureReplacementSettingsTab.ui
Settings/GraphicsUpscalingFixesSettingsTab.ui
Settings/HotkeySettingsWidget.cpp
Settings/HotkeySettingsWidget.h
Settings/InputBindingDialog.cpp
@@ -149,6 +159,8 @@ target_sources(pcsx2-qt PRIVATE
Settings/HddCreateQt.cpp
Settings/HddCreateQt.h
Settings/PatchDetailsWidget.ui
Settings/SettingsWidget.cpp
Settings/SettingsWidget.h
Settings/SettingsWindow.cpp
Settings/SettingsWindow.h
Settings/SettingsWindow.ui

View File

@@ -26,6 +26,7 @@
#include <QtWidgets/QMenu>
#include <QtWidgets/QScrollBar>
#include <QtWidgets/QStyledItemDelegate>
#include <QShortcut>
static const char* SUPPORTED_FORMATS_STRING = QT_TRANSLATE_NOOP(GameListWidget,
".bin/.iso (ISO Disc Images)\n"
@@ -217,6 +218,10 @@ void GameListWidget::initialize()
m_sort_model->setFilterName(text);
});
connect(new QShortcut(QKeySequence::Find, this), &QShortcut::activated, [this]() {
m_ui.searchText->setFocus();
});
m_table_view = new QTableView(m_ui.stack);
m_table_view->setModel(m_sort_model);
m_table_view->setSortingEnabled(true);
@@ -230,7 +235,6 @@ void GameListWidget::initialize()
m_table_view->horizontalHeader()->setHighlightSections(false);
m_table_view->horizontalHeader()->setContextMenuPolicy(Qt::CustomContextMenu);
m_table_view->verticalHeader()->hide();
m_table_view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
m_table_view->setVerticalScrollMode(QAbstractItemView::ScrollMode::ScrollPerPixel);
m_table_view->setItemDelegateForColumn(0, new GameListIconStyleDelegate(this));
m_table_view->setItemDelegateForColumn(8, new GameListIconStyleDelegate(this));

View File

@@ -53,12 +53,14 @@
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Game List</string>
</property>
<property name="text">
<string>Game List</string>
</property>
<property name="icon">
<iconset theme="list-check">
<normaloff>.</normaloff>.</iconset>
<iconset theme="list-check"/>
</property>
<property name="checkable">
<bool>true</bool>
@@ -76,12 +78,14 @@
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Game Grid</string>
</property>
<property name="text">
<string>Game Grid</string>
</property>
<property name="icon">
<iconset theme="function-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="function-line"/>
</property>
<property name="checkable">
<bool>true</bool>
@@ -99,12 +103,14 @@
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Show Titles</string>
</property>
<property name="text">
<string>Show Titles</string>
</property>
<property name="icon">
<iconset theme="price-tag-3-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="price-tag-3-line"/>
</property>
<property name="checkable">
<bool>true</bool>
@@ -135,7 +141,7 @@
<number>200</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
@@ -144,7 +150,7 @@
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -166,8 +172,7 @@
<string>All Types</string>
</property>
<property name="icon">
<iconset theme="filter-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="filter-line"/>
</property>
</item>
</widget>
@@ -179,8 +184,7 @@
<string>All Regions</string>
</property>
<property name="icon">
<iconset theme="global-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="global-line"/>
</property>
</item>
</widget>

View File

@@ -518,7 +518,7 @@ void MainWindow::createRendererSwitchMenu()
action->setCheckable(true);
action->setChecked(current_renderer == renderer);
connect(action,
&QAction::triggered, [this, action, renderer] {
&QAction::triggered, [renderer] {
Host::SetBaseIntSettingValue("EmuCore/GS", "Renderer", static_cast<int>(renderer));
Host::CommitBaseSettingChanges();
g_emu_thread->applySettings();

View File

@@ -19,13 +19,12 @@
const char* AUDIO_FILE_FILTER = QT_TRANSLATE_NOOP("MainWindow", "Audio Files (*.wav)");
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enable, "Achievements", "Enabled", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hardcoreMode, "Achievements", "ChallengeMode", false);
@@ -36,6 +35,7 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.unlockSound, "Achievements", "UnlockSound", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.lbSound, "Achievements", "LBSubmitSound", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.overlays, "Achievements", "Overlays", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.leaderboardOverlays, "Achievements", "LBOverlays", true);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.overlayPosition, "Achievements", "OverlayPosition", static_cast<int>(AchievementOverlayPosition::BottomRight));
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.notificationPosition, "Achievements", "NotificationPosition", static_cast<int>(OsdOverlayPos::TopLeft));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.encoreMode, "Achievements", "EncoreMode", false);
@@ -48,18 +48,19 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.unlockSoundPath, m_ui.unlockSoundBrowse, m_ui.unlockSoundOpen, m_ui.unlockSoundReset, "Achievements", "UnlockSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_UNLOCK_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
SettingWidgetBinder::BindWidgetToFileSetting(sif, m_ui.lbSoundPath, m_ui.lbSoundBrowse, m_ui.lbSoundOpen, m_ui.lbSoundReset, "Achievements", "LBSubmitSoundName", Path::Combine(EmuFolders::Resources, EmuConfig.Achievements.DEFAULT_LBSUBMIT_SOUND_NAME), AUDIO_FILE_FILTER, true, false);
dialog->registerWidgetHelp(m_ui.enable, tr("Enable Achievements"), tr("Unchecked"), tr("When enabled and logged in, PCSX2 will scan for achievements on startup."));
dialog->registerWidgetHelp(m_ui.hardcoreMode, tr("Enable Hardcore Mode"), tr("Unchecked"), tr("\"Challenge\" mode for achievements, including leaderboard tracking. Disables save state, cheats, and slowdown functions."));
dialog->registerWidgetHelp(m_ui.achievementNotifications, tr("Show Achievement Notifications"), tr("Checked"), tr("Displays popup messages on events such as achievement unlocks and game completion."));
dialog->registerWidgetHelp(m_ui.leaderboardNotifications, tr("Show Leaderboard Notifications"), tr("Checked"), tr("Displays popup messages when starting, submitting, or failing a leaderboard challenge."));
dialog->registerWidgetHelp(m_ui.soundEffects, tr("Enable Sound Effects"), tr("Checked"), tr("Plays sound effects for events such as achievement unlocks and leaderboard submissions."));
dialog->registerWidgetHelp(m_ui.soundEffectsBox, tr("Custom Sound Effect"), tr("Any"), tr("Customize the sound effect that are played whenever you received a notification, earned an achievement or submitted an entry to the leaderboard."));
dialog->registerWidgetHelp(m_ui.overlays, tr("Enable In-Game Overlays"), tr("Checked"), tr("Shows icons in the lower-right corner of the screen when a challenge/primed achievement is active."));
dialog->registerWidgetHelp(m_ui.overlayPosition, tr("Overlay Position"), tr("Bottom Right"), tr("Determines where achievement overlays are positioned on the screen."));
dialog->registerWidgetHelp(m_ui.notificationPosition, tr("Notification Position"), tr("Top Left"), tr("Determines where achievement notification popups are positioned on the screen."));
dialog->registerWidgetHelp(m_ui.encoreMode, tr("Enable Encore Mode"), tr("Unchecked"), tr("When enabled, each session will behave as if no achievements have been unlocked."));
dialog->registerWidgetHelp(m_ui.spectatorMode, tr("Enable Spectator Mode"), tr("Unchecked"), tr("When enabled, PCSX2 will assume all achievements are locked and not send any unlock notifications to the server."));
dialog->registerWidgetHelp(m_ui.unofficialAchievements, tr("Test Unofficial Achievements"), tr("Unchecked"), tr("When enabled, PCSX2 will list achievements from unofficial sets. Please note that these achievements are not tracked by RetroAchievements, so they unlock every time."));
dialog()->registerWidgetHelp(m_ui.enable, tr("Enable Achievements"), tr("Unchecked"), tr("When enabled and logged in, PCSX2 will scan for achievements on startup."));
dialog()->registerWidgetHelp(m_ui.hardcoreMode, tr("Enable Hardcore Mode"), tr("Unchecked"), tr("\"Challenge\" mode for achievements, including leaderboard tracking. Disables save state, cheats, and slowdown functions."));
dialog()->registerWidgetHelp(m_ui.achievementNotifications, tr("Show Achievement Notifications"), tr("Checked"), tr("Displays popup messages on events such as achievement unlocks and game completion."));
dialog()->registerWidgetHelp(m_ui.leaderboardNotifications, tr("Show Leaderboard Notifications"), tr("Checked"), tr("Displays popup messages when starting, submitting, or failing a leaderboard challenge."));
dialog()->registerWidgetHelp(m_ui.soundEffects, tr("Enable Sound Effects"), tr("Checked"), tr("Plays sound effects for events such as achievement unlocks and leaderboard submissions."));
dialog()->registerWidgetHelp(m_ui.soundEffectsBox, tr("Custom Sound Effect"), tr("Any"), tr("Customize the sound effect that are played whenever you received a notification, earned an achievement or submitted an entry to the leaderboard."));
dialog()->registerWidgetHelp(m_ui.overlays, tr("Enable In-Game Overlays"), tr("Checked"), tr("Shows icons in the screen when a challenge/primed achievement is active."));
dialog()->registerWidgetHelp(m_ui.leaderboardOverlays, tr("Enable In-Game Leaderboard Overlays"), tr("Checked"), tr("Shows icons in the screen when leaderboard tracking is active."));
dialog()->registerWidgetHelp(m_ui.overlayPosition, tr("Overlay Position"), tr("Bottom Right"), tr("Determines where achievement/leaderboard overlays are positioned on the screen."));
dialog()->registerWidgetHelp(m_ui.notificationPosition, tr("Notification Position"), tr("Top Left"), tr("Determines where achievement/leaderboard notification popups are positioned on the screen."));
dialog()->registerWidgetHelp(m_ui.encoreMode, tr("Enable Encore Mode"), tr("Unchecked"), tr("When enabled, each session will behave as if no achievements have been unlocked."));
dialog()->registerWidgetHelp(m_ui.spectatorMode, tr("Enable Spectator Mode"), tr("Unchecked"), tr("When enabled, PCSX2 will assume all achievements are locked and not send any unlock notifications to the server."));
dialog()->registerWidgetHelp(m_ui.unofficialAchievements, tr("Test Unofficial Achievements"), tr("Unchecked"), tr("When enabled, PCSX2 will list achievements from unofficial sets. Please note that these achievements are not tracked by RetroAchievements, so they unlock every time."));
connect(m_ui.enable, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
connect(m_ui.hardcoreMode, &QCheckBox::checkStateChanged, this, &AchievementSettingsWidget::updateEnableState);
@@ -74,7 +75,7 @@ AchievementSettingsWidget::AchievementSettingsWidget(SettingsWindow* dialog, QWi
connect(m_ui.achievementNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged);
connect(m_ui.leaderboardNotificationsDuration, &QSlider::valueChanged, this, &AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged);
if (!m_dialog->isPerGameSettings())
if (!dialog()->isPerGameSettings())
{
connect(m_ui.loginButton, &QPushButton::clicked, this, &AchievementSettingsWidget::onLoginLogoutPressed);
connect(m_ui.viewProfile, &QPushButton::clicked, this, &AchievementSettingsWidget::onViewProfilePressed);
@@ -109,13 +110,13 @@ AchievementSettingsWidget::~AchievementSettingsWidget() = default;
void AchievementSettingsWidget::updateEnableState()
{
const bool enabled = m_dialog->getEffectiveBoolValue("Achievements", "Enabled", false);
const bool notifications = enabled && m_dialog->getEffectiveBoolValue("Achievements", "Notifications", true);
const bool lb_notifications = enabled && m_dialog->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true);
const bool sound = m_dialog->getEffectiveBoolValue("Achievements", "SoundEffects", true);
const bool info = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "InfoSound", true);
const bool unlock = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "UnlockSound", true);
const bool lbsound = enabled && sound && m_dialog->getEffectiveBoolValue("Achievements", "LBSubmitSound", true);
const bool enabled = dialog()->getEffectiveBoolValue("Achievements", "Enabled", false);
const bool notifications = enabled && dialog()->getEffectiveBoolValue("Achievements", "Notifications", true);
const bool lb_notifications = enabled && dialog()->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true);
const bool sound = dialog()->getEffectiveBoolValue("Achievements", "SoundEffects", true);
const bool info = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "InfoSound", true);
const bool unlock = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "UnlockSound", true);
const bool lbsound = enabled && sound && dialog()->getEffectiveBoolValue("Achievements", "LBSubmitSound", true);
m_ui.hardcoreMode->setEnabled(enabled);
m_ui.achievementNotifications->setEnabled(enabled);
m_ui.leaderboardNotifications->setEnabled(enabled);
@@ -124,7 +125,7 @@ void AchievementSettingsWidget::updateEnableState()
m_ui.leaderboardNotificationsDuration->setEnabled(lb_notifications);
m_ui.leaderboardNotificationsDurationLabel->setEnabled(lb_notifications);
if (!m_dialog->isPerGameSettings())
if (!dialog()->isPerGameSettings())
{
m_ui.notificationSoundPath->setEnabled(info);
m_ui.notificationSoundBrowse->setEnabled(info);
@@ -145,16 +146,18 @@ void AchievementSettingsWidget::updateEnableState()
m_ui.soundEffects->setEnabled(enabled);
m_ui.overlays->setEnabled(enabled);
const bool overlays_enabled = enabled && m_dialog->getEffectiveBoolValue("Achievements", "Overlays", true);
const bool notifications_enabled = enabled && (m_dialog->getEffectiveBoolValue("Achievements", "Notifications", true) ||
m_dialog->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true));
m_ui.leaderboardOverlays->setEnabled(enabled);
const bool overlays_enabled = enabled && (dialog()->getEffectiveBoolValue("Achievements", "Overlays", true) ||
dialog()->getEffectiveBoolValue("Achievements", "LBOverlays", true));
const bool notifications_enabled = enabled && (dialog()->getEffectiveBoolValue("Achievements", "Notifications", true) ||
dialog()->getEffectiveBoolValue("Achievements", "LeaderboardNotifications", true));
m_ui.overlaySettingsBox->setEnabled(overlays_enabled || notifications_enabled);
m_ui.overlayPosition->setEnabled(overlays_enabled);
m_ui.overlayPositionLabel->setEnabled(overlays_enabled);
m_ui.notificationPosition->setEnabled(notifications_enabled);
m_ui.notificationPositionLabel->setEnabled(notifications_enabled);
m_ui.encoreMode->setEnabled(enabled);
m_ui.spectatorMode->setEnabled(enabled);
m_ui.unofficialAchievements->setEnabled(enabled);
@@ -165,8 +168,8 @@ void AchievementSettingsWidget::onHardcoreModeStateChanged()
if (!QtHost::IsVMValid())
return;
const bool enabled = m_dialog->getEffectiveBoolValue("Achievements", "Enabled", false);
const bool challenge = m_dialog->getEffectiveBoolValue("Achievements", "ChallengeMode", false);
const bool enabled = dialog()->getEffectiveBoolValue("Achievements", "Enabled", false);
const bool challenge = dialog()->getEffectiveBoolValue("Achievements", "ChallengeMode", false);
if (!enabled || !challenge)
return;
@@ -188,14 +191,14 @@ void AchievementSettingsWidget::onHardcoreModeStateChanged()
void AchievementSettingsWidget::onAchievementsNotificationDurationSliderChanged()
{
const float duration = m_dialog->getEffectiveFloatValue("Achievements", "NotificationsDuration",
const float duration = dialog()->getEffectiveFloatValue("Achievements", "NotificationsDuration",
Pcsx2Config::AchievementsOptions::DEFAULT_NOTIFICATION_DURATION);
m_ui.achievementNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
}
void AchievementSettingsWidget::onLeaderboardsNotificationDurationSliderChanged()
{
const float duration = m_dialog->getEffectiveFloatValue("Achievements", "LeaderboardsDuration",
const float duration = dialog()->getEffectiveFloatValue("Achievements", "LeaderboardsDuration",
Pcsx2Config::AchievementsOptions::DEFAULT_LEADERBOARD_DURATION);
m_ui.leaderboardNotificationsDurationLabel->setText(tr("%n seconds", nullptr, static_cast<int>(duration)));
}
@@ -211,8 +214,8 @@ void AchievementSettingsWidget::updateLoginState()
StringUtil::FromChars<u64>(Host::GetBaseStringSettingValue("Achievements", "LoginTimestamp", "0")).value_or(0);
const QDateTime login_timestamp(QDateTime::fromSecsSinceEpoch(static_cast<qint64>(login_unix_timestamp)));
m_ui.loginStatus->setText(tr("Username: %1\nLogin token generated on %2.")
.arg(QString::fromStdString(username))
.arg(login_timestamp.toString(Qt::TextDate)));
.arg(QString::fromStdString(username))
.arg(login_timestamp.toString(Qt::TextDate)));
m_ui.loginButton->setText(tr("Logout"));
}
else

View File

@@ -2,17 +2,17 @@
// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include <QtWidgets/QWidget>
#include "ui_AchievementSettingsWidget.h"
class SettingsWindow;
#include "SettingsWidget.h"
class AchievementSettingsWidget : public QWidget
class AchievementSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
explicit AchievementSettingsWidget(SettingsWindow* dialog, QWidget* parent);
explicit AchievementSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~AchievementSettingsWidget();
private Q_SLOTS:
@@ -28,6 +28,4 @@ private:
void updateLoginState();
Ui::AchievementSettingsWidget m_ui;
SettingsWindow* m_dialog;
};

View File

@@ -6,508 +6,497 @@
<rect>
<x>0</x>
<y>0</y>
<width>680</width>
<height>480</height>
<width>700</width>
<height>1000</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<widget class="QGroupBox" name="settingsBox">
<property name="title">
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="0">
<widget class="QCheckBox" name="unofficialAchievements">
<property name="text">
<string>Test Unofficial Achievements</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="hardcoreMode">
<property name="text">
<string>Enable Hardcore Mode</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="enable">
<property name="text">
<string>Enable Achievements</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="spectatorMode">
<property name="text">
<string>Enable Spectator Mode</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="encoreMode">
<property name="text">
<string>Enable Encore Mode</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="notificationBox">
<property name="title">
<string>Notifications</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,1">
<item row="0" column="1">
<layout class="QHBoxLayout" name="achievementNotificationsDurationSliderContainer" stretch="1,0">
<item>
<widget class="QSlider" name="achievementNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="achievementNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="achievementNotifications">
<property name="text">
<string>Show Achievement Notifications</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="leaderboardNotificationsDurationSliderContainer" stretch="1,0">
<item>
<widget class="QSlider" name="leaderboardNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="leaderboardNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="leaderboardNotifications">
<property name="text">
<string>Show Leaderboard Notifications</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="soundEffects">
<property name="text">
<string>Enable Sound Effects</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="notificationPositionLabel">
<property name="text">
<string>Notification Position:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="notificationPosition">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Top Left (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Top Center</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Center Left</string>
</property>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
</item>
<item>
<property name="text">
<string>Center Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Center</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="overlaySettingsBox">
<property name="title">
<string>Overlay Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_overlay">
<item row="1" column="1">
<widget class="QComboBox" name="overlayPosition">
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Center</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Center Left</string>
</property>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
</item>
<item>
<property name="text">
<string>Center Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Center</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right (Default)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="overlayPositionLabel">
<property name="text">
<string>Overlay Position:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="overlays">
<property name="text">
<string>Enable In-Game Overlays</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="leaderboardOverlays">
<property name="text">
<string>Enable In-Game Leaderboard Overlays</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="soundEffectsBox">
<property name="title">
<string>Sound Effects</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="5" column="0">
<widget class="QLineEdit" name="lbSoundPath"/>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="notificationSoundPath"/>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="unlockSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="notificationSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="unlockSound">
<property name="text">
<string>Achievement Unlock Sound</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="notificationSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="unlockSoundPath"/>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="lbSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="unlockSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="notificationSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="notificationSound">
<property name="text">
<string>Notification Sound</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="lbSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="unlockSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QPushButton" name="lbSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="lbSound">
<property name="text">
<string>Leaderboard Submit Sound</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="loginBox">
<property name="title">
<string>Account</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<item>
<widget class="QLabel" name="loginStatus">
<property name="text">
<string>Username:
Login token generated at:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="achievementButtons">
<item>
<widget class="QPushButton" name="viewProfile">
<property name="text">
<string>View Profile...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="loginButton">
<property name="text">
<string>Login...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gameInfoBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>75</height>
</size>
</property>
<property name="title">
<string>Game Info</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="gameInfo">
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="rcheevosDisclaimer">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at &lt;a href=&quot;https://retroachievements.org/&quot;&gt;retroachievements.org&lt;/a&gt;.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;To view the achievement list in-game, press the hotkey for &lt;span style=&quot; font-weight:600;&quot;&gt;Open Pause Menu&lt;/span&gt; and select &lt;span style=&quot; font-weight:600;&quot;&gt;Achievements&lt;/span&gt; from the menu.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>8</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaAchievements">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>661</width>
<height>700</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="settingsBox">
<property name="title">
<string>Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="0">
<widget class="QCheckBox" name="unofficialAchievements">
<property name="text">
<string>Test Unofficial Achievements</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="hardcoreMode">
<property name="text">
<string>Enable Hardcore Mode</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="enable">
<property name="text">
<string>Enable Achievements</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="spectatorMode">
<property name="text">
<string>Enable Spectator Mode</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="encoreMode">
<property name="text">
<string>Enable Encore Mode</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="notificationBox">
<property name="title">
<string>Notifications</string>
</property>
<layout class="QGridLayout" name="gridLayout_2" columnstretch="1,0">
<item row="0" column="1">
<layout class="QHBoxLayout" name="achievementNotificationsDurationSliderContainer" stretch="1,0">
<item>
<widget class="QSlider" name="achievementNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="achievementNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="achievementNotifications">
<property name="text">
<string>Show Achievement Notifications</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="leaderboardNotificationsDurationSliderContainer" stretch="1,0">
<item>
<widget class="QSlider" name="leaderboardNotificationsDuration">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>5</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBelow</enum>
</property>
<property name="tickInterval">
<number>1</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="leaderboardNotificationsDurationLabel">
<property name="text">
<string>5 seconds</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="leaderboardNotifications">
<property name="text">
<string>Show Leaderboard Notifications</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="soundEffects">
<property name="text">
<string>Enable Sound Effects</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="overlaySettingsBox">
<property name="title">
<string>Overlay Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_overlay">
<item row="1" column="1">
<widget class="QComboBox" name="overlayPosition">
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Center</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Center Left</string>
</property>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
</item>
<item>
<property name="text">
<string>Center Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Center</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right (Default)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="notificationPositionLabel">
<property name="text">
<string>Notification Position:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="notificationPosition">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Top Left (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Top Center</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Center Left</string>
</property>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
</item>
<item>
<property name="text">
<string>Center Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Center</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="overlayPositionLabel">
<property name="text">
<string>Overlay Position:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="overlays">
<property name="text">
<string>Enable In-Game Overlays</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="soundEffectsBox">
<property name="title">
<string>Sound Effects</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="5" column="0">
<widget class="QLineEdit" name="lbSoundPath"/>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="notificationSoundPath"/>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="unlockSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="notificationSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="unlockSound">
<property name="text">
<string>Achievement Unlock Sound</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="notificationSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="unlockSoundPath"/>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="lbSoundBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QPushButton" name="unlockSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="notificationSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="notificationSound">
<property name="text">
<string>Notification Sound</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QPushButton" name="lbSoundOpen">
<property name="text">
<string>Preview</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="unlockSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QPushButton" name="lbSoundReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="lbSound">
<property name="text">
<string>Leaderboard Submit Sound</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="loginBox">
<property name="title">
<string>Account</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<item>
<widget class="QLabel" name="loginStatus">
<property name="text">
<string>Username:
Login token generated at:</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="achievementButtons">
<item>
<widget class="QPushButton" name="viewProfile">
<property name="text">
<string>View Profile...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="loginButton">
<property name="text">
<string>Login...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gameInfoBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>75</height>
</size>
</property>
<property name="title">
<string>Game Info</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="gameInfo">
<property name="alignment">
<set>Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="rcheevosDisclaimer">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;PCSX2 uses RetroAchievements as an achievement database and for tracking progress. To use achievements, please sign up for an account at &lt;a href=&quot;https://retroachievements.org/&quot;&gt;retroachievements.org&lt;/a&gt;.&lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;To view the achievement list in-game, press the hotkey for &lt;span style=&quot; font-weight:600;&quot;&gt;Open Pause Menu&lt;/span&gt; and select &lt;span style=&quot; font-weight:600;&quot;&gt;Achievements&lt;/span&gt; from the menu.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::TextFormat::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>8</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>

View File

@@ -2,7 +2,6 @@
// SPDX-License-Identifier: GPL-3.0+
#include <QtWidgets/QMessageBox>
#include <algorithm>
#include "AdvancedSettingsWidget.h"
#include "QtHost.h"
@@ -10,13 +9,12 @@
#include "SettingWidgetBinder.h"
#include "SettingsWindow.h"
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.eeRecompiler, "EmuCore/CPU/Recompiler", "EnableEE", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.eeCache, "EmuCore/CPU/Recompiler", "EnableEECache", false);
@@ -35,7 +33,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeDivRoundingMode, "EmuCore/CPU", "FPUDiv.Roundmode", static_cast<int>(FPRoundMode::Nearest));
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vu0RoundingMode, "EmuCore/CPU", "VU0.Roundmode", static_cast<int>(FPRoundMode::ChopZero));
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vu1RoundingMode, "EmuCore/CPU", "VU1.Roundmode", static_cast<int>(FPRoundMode::ChopZero));
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
m_ui.eeClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.eeClampMode->itemText(getGlobalClampingModeIndex(-1))));
m_ui.vu0ClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.vu0ClampMode->itemText(getGlobalClampingModeIndex(0))));
@@ -53,7 +51,7 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.gameFixes, "EmuCore", "EnableGameFixes", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.patches, "EmuCore", "EnablePatches", true);
dialog->registerWidgetHelp(m_ui.savestateSelector, tr("Use Save State Selector"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.savestateSelector, tr("Use Save State Selector"), tr("Checked"),
tr("Show a save state selector UI when switching slots instead of showing a notification bubble."));
SettingWidgetBinder::BindWidgetToIntSetting(
@@ -72,82 +70,86 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget*
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pineEnable, "EmuCore", "EnablePINE", false);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.pineSlot, "EmuCore", "PINESlot", 28011);
dialog->registerWidgetHelp(m_ui.eeRoundingMode, tr("Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Floating Point Unit (EE FPU). "
"Because the various FPUs in the PS2 are non-compliant with international standards, some games may need different modes to do math correctly. The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division are rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog()->registerWidgetHelp(m_ui.eeRoundingMode, tr("Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Floating Point Unit (EE FPU). "
"Because the various FPUs in the PS2 are non-compliant with international standards, some games may need different modes to do math correctly. The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog()->registerWidgetHelp(m_ui.eeDivRoundingMode, tr("Division Rounding Mode"), tr("Nearest (Default)"), tr("Determines how the results of floating-point division are rounded. Some games need specific settings; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.eeClampMode, tr("Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range. "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog()->registerWidgetHelp(m_ui.eeClampMode, tr("Clamping Mode"), tr("Normal (Default)"),
tr("Changes how PCSX2 handles keeping floats in a standard x86 range. "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.eeRecompiler, tr("Enable Recompiler"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.eeRecompiler, tr("Enable Recompiler"), tr("Checked"),
tr("Performs just-in-time binary translation of 64-bit MIPS-IV machine code to x86."));
//: Wait loop: When the game makes the CPU do nothing (loop/spin) while it waits for something to happen (usually an interrupt).
dialog->registerWidgetHelp(m_ui.eeWaitLoopDetection, tr("Wait Loop Detection"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.eeWaitLoopDetection, tr("Wait Loop Detection"), tr("Checked"),
tr("Moderate speedup for some games, with no known side effects."));
dialog->registerWidgetHelp(m_ui.eeCache, tr("Enable Cache (Slow)"), tr("Unchecked"), tr("Interpreter only, provided for diagnostic."));
dialog()->registerWidgetHelp(m_ui.eeCache, tr("Enable Cache (Slow)"), tr("Unchecked"), tr("Interpreter only, provided for diagnostic."));
//: INTC = Name of a PS2 register, leave as-is. "spin" = to make a cpu (or gpu) actively do nothing while you wait for something. Like spinning in a circle, you're moving but not actually going anywhere.
dialog->registerWidgetHelp(m_ui.eeINTCSpinDetection, tr("INTC Spin Detection"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.eeINTCSpinDetection, tr("INTC Spin Detection"), tr("Checked"),
tr("Huge speedup for some games, with almost no compatibility side effects."));
dialog->registerWidgetHelp(m_ui.eeFastmem, tr("Enable Fast Memory Access"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.eeFastmem, tr("Enable Fast Memory Access"), tr("Checked"),
//: "Backpatching" = To edit previously generated code to change what it does (in this case, we generate direct memory accesses, then backpatch them to jump to a fancier handler function when we realize they need the fancier handler function)
tr("Uses backpatching to avoid register flushing on every memory access."));
dialog->registerWidgetHelp(m_ui.pauseOnTLBMiss, tr("Pause On TLB Miss"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.pauseOnTLBMiss, tr("Pause On TLB Miss"), tr("Unchecked"),
tr("Pauses the virtual machine when a TLB miss occurs, instead of ignoring it and continuing. Note that the VM will pause after the "
"end of the block, not on the instruction which caused the exception. Refer to the console to see the address where the invalid "
"access occurred."));
dialog->registerWidgetHelp(m_ui.extraMemory, tr("Enable 128MB RAM (Dev Console)"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.extraMemory, tr("Enable 128MB RAM (Dev Console)"), tr("Unchecked"),
tr("Exposes an additional 96MB of memory to the virtual machine."));
dialog->registerWidgetHelp(m_ui.vu0RoundingMode, tr("VU0 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 0 (EE VU0). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
dialog()->registerWidgetHelp(m_ui.vu0RoundingMode, tr("VU0 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 0 (EE VU0). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
dialog->registerWidgetHelp(m_ui.vu1RoundingMode, tr("VU1 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 1 (EE VU1). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
dialog()->registerWidgetHelp(m_ui.vu1RoundingMode, tr("VU1 Rounding Mode"), tr("Chop/Zero (Default)"), tr("Changes how PCSX2 handles rounding while emulating the Emotion Engine's Vector Unit 1 (EE VU1). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem will cause stability issues and/or crashes.</b>"));
dialog->registerWidgetHelp(m_ui.vu0ClampMode, tr("VU0 Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 0 (EE VU0). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.vu1ClampMode, tr("VU1 Clamping Mode"), tr("Normal (Default)"), tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 1 (EE VU1). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog()->registerWidgetHelp(m_ui.vu0ClampMode, tr("VU0 Clamping Mode"), tr("Normal (Default)"),
tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 0 (EE VU0). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog()->registerWidgetHelp(m_ui.vu1ClampMode, tr("VU1 Clamping Mode"), tr("Normal (Default)"),
tr("Changes how PCSX2 handles keeping floats in a standard x86 range in the Emotion Engine's Vector Unit 1 (EE VU1). "
"The default value handles the vast majority of games; <b>modifying this setting when a game is not having a visible problem can cause instability.</b>"));
dialog->registerWidgetHelp(m_ui.instantVU1, tr("Enable Instant VU1"), tr("Checked"), tr("Runs VU1 instantly. Provides a modest speed improvement in most games. "
dialog()->registerWidgetHelp(m_ui.instantVU1, tr("Enable Instant VU1"), tr("Checked"),
tr("Runs VU1 instantly. Provides a modest speed improvement in most games. "
"Safe for most games, but a few games may exhibit graphical errors."));
//: VU0 = Vector Unit 0. One of the PS2's processors.
dialog->registerWidgetHelp(m_ui.vu0Recompiler, tr("Enable VU0 Recompiler (Micro Mode)"), tr("Checked"), tr("Enables VU0 Recompiler."));
dialog()->registerWidgetHelp(m_ui.vu0Recompiler, tr("Enable VU0 Recompiler (Micro Mode)"), tr("Checked"), tr("Enables VU0 Recompiler."));
//: VU1 = Vector Unit 1. One of the PS2's processors.
dialog->registerWidgetHelp(m_ui.vu1Recompiler, tr("Enable VU1 Recompiler"), tr("Checked"), tr("Enables VU1 Recompiler."));
dialog()->registerWidgetHelp(m_ui.vu1Recompiler, tr("Enable VU1 Recompiler"), tr("Checked"), tr("Enables VU1 Recompiler."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
//: mVU = PCSX2's recompiler for VU (Vector Unit) code (full name: microVU)
m_ui.vuFlagHack, tr("mVU Flag Hack"), tr("Checked"), tr("Good speedup and high compatibility, may cause graphical errors."));
dialog->registerWidgetHelp(m_ui.iopRecompiler, tr("Enable Recompiler"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.iopRecompiler, tr("Enable Recompiler"), tr("Checked"),
tr("Performs just-in-time binary translation of 32-bit MIPS-I machine code to x86."));
dialog->registerWidgetHelp(m_ui.gameFixes, tr("Enable Game Fixes"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.gameFixes, tr("Enable Game Fixes"), tr("Checked"),
tr("Automatically loads and applies fixes to known problematic games on game start."));
dialog->registerWidgetHelp(m_ui.patches, tr("Enable Compatibility Patches"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.patches, tr("Enable Compatibility Patches"), tr("Checked"),
tr("Automatically loads and applies compatibility patches to known problematic games."));
dialog->registerWidgetHelp(m_ui.savestateCompressionMethod, tr("Savestate Compression Method"), tr("Zstandard"),
dialog()->registerWidgetHelp(m_ui.savestateCompressionMethod, tr("Savestate Compression Method"), tr("Zstandard"),
tr("Determines the algorithm to be used when compressing savestates."));
dialog->registerWidgetHelp(m_ui.savestateCompressionLevel, tr("Savestate Compression Level"), tr("Medium"),
dialog()->registerWidgetHelp(m_ui.savestateCompressionLevel, tr("Savestate Compression Level"), tr("Medium"),
tr("Determines the level to be used when compressing savestates."));
dialog->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"),
tr("Automatically saves the emulator state when powering down or exiting. You can then "
"resume directly from where you left off next time."));
dialog->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"),
//: Do not translate the ".backup" extension.
tr("Creates a backup copy of a save state if it already exists when the save is created. The backup copy has a .backup suffix."));
}
@@ -174,15 +176,15 @@ int AdvancedSettingsWidget::getGlobalClampingModeIndex(int vunum) const
int AdvancedSettingsWidget::getClampingModeIndex(int vunum) const
{
// This is so messy... maybe we should just make the mode an int in the settings too...
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
std::optional<bool> default_false = m_dialog->isPerGameSettings() ? std::nullopt : std::optional<bool>(false);
std::optional<bool> default_true = m_dialog->isPerGameSettings() ? std::nullopt : std::optional<bool>(true);
const bool base = dialog()->isPerGameSettings() ? 1 : 0;
std::optional<bool> default_false = dialog()->isPerGameSettings() ? std::nullopt : std::optional<bool>(false);
std::optional<bool> default_true = dialog()->isPerGameSettings() ? std::nullopt : std::optional<bool>(true);
std::optional<bool> third = m_dialog->getBoolValue(
std::optional<bool> third = dialog()->getBoolValue(
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0SignOverflow" : "vu1SignOverflow") : "fpuFullMode"), default_false);
std::optional<bool> second = m_dialog->getBoolValue("EmuCore/CPU/Recompiler",
std::optional<bool> second = dialog()->getBoolValue("EmuCore/CPU/Recompiler",
(vunum >= 0 ? ((vunum == 0) ? "vu0ExtraOverflow" : "vu1ExtraOverflow") : "fpuExtraOverflow"), default_false);
std::optional<bool> first = m_dialog->getBoolValue(
std::optional<bool> first = dialog()->getBoolValue(
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0Overflow" : "vu1Overflow") : "fpuOverflow"), default_true);
if (third.has_value() && third.value())
@@ -201,25 +203,25 @@ void AdvancedSettingsWidget::setClampingMode(int vunum, int index)
{
std::optional<bool> first, second, third;
if (!m_dialog->isPerGameSettings() || index > 0)
if (!dialog()->isPerGameSettings() || index > 0)
{
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
const bool base = dialog()->isPerGameSettings() ? 1 : 0;
third = (index >= (base + 3));
second = (index >= (base + 2));
first = (index >= (base + 1));
}
m_dialog->setBoolSettingValue(
dialog()->setBoolSettingValue(
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0SignOverflow" : "vu1SignOverflow") : "fpuFullMode"), third);
m_dialog->setBoolSettingValue(
dialog()->setBoolSettingValue(
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0ExtraOverflow" : "vu1ExtraOverflow") : "fpuExtraOverflow"), second);
m_dialog->setBoolSettingValue(
dialog()->setBoolSettingValue(
"EmuCore/CPU/Recompiler", (vunum >= 0 ? ((vunum == 0) ? "vu0Overflow" : "vu1Overflow") : "fpuOverflow"), first);
}
void AdvancedSettingsWidget::onSavestateCompressionTypeChanged()
{
const bool uncompressed = (m_dialog->getEffectiveIntValue("EmuCore", "SavestateCompressionType", static_cast<int>(SavestateCompressionMethod::Zstandard)) ==
static_cast<int>(SavestateCompressionMethod::Uncompressed));
const bool uncompressed = (dialog()->getEffectiveIntValue("EmuCore", "SavestateCompressionType", static_cast<int>(SavestateCompressionMethod::Zstandard)) ==
static_cast<int>(SavestateCompressionMethod::Uncompressed));
m_ui.savestateCompressionLevel->setDisabled(uncompressed);
}

View File

@@ -3,13 +3,11 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_AdvancedSettingsWidget.h"
class SettingsWindow;
#include "SettingsWidget.h"
class AdvancedSettingsWidget : public QWidget
class AdvancedSettingsWidget : public SettingsWidget
{
Q_OBJECT

File diff suppressed because it is too large Load Diff

View File

@@ -18,13 +18,12 @@
#include <algorithm>
#include <bit>
AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
for (u32 i = 0; i < static_cast<u32>(AudioBackend::Count); i++)
m_ui.audioBackend->addItem(QString::fromUtf8(AudioStream::GetBackendDisplayName(static_cast<AudioBackend>(i))));
@@ -72,11 +71,11 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
updateLatencyLabel();
// for per-game, just use the normal path, since it needs to re-read/apply
if (!dialog->isPerGameSettings())
if (!dialog()->isPerGameSettings())
{
m_ui.volume->setValue(m_dialog->getEffectiveIntValue("SPU2/Output", "OutputVolume", 100));
m_ui.fastForwardVolume->setValue(m_dialog->getEffectiveIntValue("SPU2/Output", "FastForwardVolume", 100));
m_ui.muted->setChecked(m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputMuted", false));
m_ui.volume->setValue(dialog()->getEffectiveIntValue("SPU2/Output", "OutputVolume", 100));
m_ui.fastForwardVolume->setValue(dialog()->getEffectiveIntValue("SPU2/Output", "FastForwardVolume", 100));
m_ui.muted->setChecked(dialog()->getEffectiveBoolValue("SPU2/Output", "OutputMuted", false));
connect(m_ui.volume, &QSlider::valueChanged, this, &AudioSettingsWidget::onOutputVolumeChanged);
connect(m_ui.fastForwardVolume, &QSlider::valueChanged, this, &AudioSettingsWidget::onFastForwardVolumeChanged);
connect(m_ui.muted, &QCheckBox::checkStateChanged, this, &AudioSettingsWidget::onOutputMutedChanged);
@@ -91,39 +90,39 @@ AudioSettingsWidget::AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent
connect(m_ui.resetVolume, &QToolButton::clicked, this, [this]() { resetVolume(false); });
connect(m_ui.resetFastForwardVolume, &QToolButton::clicked, this, [this]() { resetVolume(true); });
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.audioBackend, tr("Audio Backend"), QStringLiteral("Cubeb"),
tr("The audio backend determines how frames produced by the emulator are submitted to the host. Cubeb provides the "
"lowest latency, if you encounter issues, try the SDL backend. The null backend disables all host audio "
"output."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.bufferMS, tr("Buffer Size"), tr("%1 ms").arg(AudioStreamParameters::DEFAULT_BUFFER_MS),
tr("Determines the buffer size which the time stretcher will try to keep filled. It effectively selects the "
"average latency, as audio will be stretched/shrunk to keep the buffer size within check."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.outputLatencyMS, tr("Output Latency"), tr("%1 ms").arg(AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS),
tr("Determines the latency from the buffer to the host audio output. This can be set lower than the target latency "
"to reduce audio delay."));
dialog->registerWidgetHelp(m_ui.volume, tr("Output Volume"), "100%",
dialog()->registerWidgetHelp(m_ui.volume, tr("Output Volume"), "100%",
tr("Controls the volume of the audio played on the host."));
dialog->registerWidgetHelp(m_ui.fastForwardVolume, tr("Fast Forward Volume"), "100%",
dialog()->registerWidgetHelp(m_ui.fastForwardVolume, tr("Fast Forward Volume"), "100%",
tr("Controls the volume of the audio played on the host when fast forwarding."));
dialog->registerWidgetHelp(m_ui.muted, tr("Mute All Sound"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.muted, tr("Mute All Sound"), tr("Unchecked"),
tr("Prevents the emulator from producing any audible sound."));
dialog->registerWidgetHelp(m_ui.expansionMode, tr("Expansion Mode"), tr("Disabled (Stereo)"),
dialog()->registerWidgetHelp(m_ui.expansionMode, tr("Expansion Mode"), tr("Disabled (Stereo)"),
tr("Determines how audio is expanded from stereo to surround for supported games. This "
"includes games that support Dolby Pro Logic/Pro Logic II."));
dialog->registerWidgetHelp(m_ui.expansionSettings, tr("Expansion Settings"), tr("N/A"),
dialog()->registerWidgetHelp(m_ui.expansionSettings, tr("Expansion Settings"), tr("N/A"),
tr("These settings fine-tune the behavior of the FreeSurround-based channel expander."));
dialog->registerWidgetHelp(m_ui.syncMode, tr("Synchronization"), tr("TimeStretch (Recommended)"),
dialog()->registerWidgetHelp(m_ui.syncMode, tr("Synchronization"), tr("TimeStretch (Recommended)"),
tr("When running outside of 100% speed, adjusts the tempo on audio instead of dropping frames. Produces much nicer fast-forward/slowdown audio."));
dialog->registerWidgetHelp(m_ui.stretchSettings, tr("Stretch Settings"), tr("N/A"),
dialog()->registerWidgetHelp(m_ui.stretchSettings, tr("Stretch Settings"), tr("N/A"),
tr("These settings fine-tune the behavior of the SoundTouch audio time stretcher when running outside of 100% speed."));
dialog->registerWidgetHelp(m_ui.resetVolume, tr("Reset Volume"), tr("N/A"),
m_dialog->isPerGameSettings() ? tr("Resets output volume back to the global/inherited setting.") :
dialog()->registerWidgetHelp(m_ui.resetVolume, tr("Reset Volume"), tr("N/A"),
dialog()->isPerGameSettings() ? tr("Resets output volume back to the global/inherited setting.") :
tr("Resets output volume back to the default."));
dialog->registerWidgetHelp(m_ui.resetFastForwardVolume, tr("Reset Fast Forward Volume"), tr("N/A"),
m_dialog->isPerGameSettings() ? tr("Resets fast forward volume back to the global/inherited setting.") :
dialog()->registerWidgetHelp(m_ui.resetFastForwardVolume, tr("Reset Fast Forward Volume"), tr("N/A"),
dialog()->isPerGameSettings() ? tr("Resets fast forward volume back to the global/inherited setting.") :
tr("Resets fast forward volume back to the default."));
}
@@ -132,10 +131,10 @@ AudioSettingsWidget::~AudioSettingsWidget() = default;
AudioExpansionMode AudioSettingsWidget::getEffectiveExpansionMode() const
{
return AudioStream::ParseExpansionMode(
m_dialog->getEffectiveStringValue("SPU2/Output", "ExpansionMode",
dialog()->getEffectiveStringValue("SPU2/Output", "ExpansionMode",
AudioStream::GetExpansionModeName(AudioStreamParameters::DEFAULT_EXPANSION_MODE))
.c_str())
.value_or(AudioStreamParameters::DEFAULT_EXPANSION_MODE);
.value_or(AudioStreamParameters::DEFAULT_EXPANSION_MODE);
}
u32 AudioSettingsWidget::getEffectiveExpansionBlockSize() const
@@ -144,7 +143,7 @@ u32 AudioSettingsWidget::getEffectiveExpansionBlockSize() const
if (expansion_mode == AudioExpansionMode::Disabled)
return 0;
const u32 config_block_size = m_dialog->getEffectiveIntValue("SPU2/Output", "ExpandBlockSize",
const u32 config_block_size = dialog()->getEffectiveIntValue("SPU2/Output", "ExpandBlockSize",
AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE);
return std::has_single_bit(config_block_size) ? config_block_size : std::bit_ceil(config_block_size);
}
@@ -160,20 +159,20 @@ void AudioSettingsWidget::onSyncModeChanged()
{
const Pcsx2Config::SPU2Options::SPU2SyncMode sync_mode =
Pcsx2Config::SPU2Options::ParseSyncMode(
m_dialog->getEffectiveStringValue("SPU2/Output", "SyncMode",
Pcsx2Config::SPU2Options::GetSyncModeName(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE)
).c_str()
).value_or(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE);
dialog()->getEffectiveStringValue("SPU2/Output", "SyncMode",
Pcsx2Config::SPU2Options::GetSyncModeName(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE))
.c_str())
.value_or(Pcsx2Config::SPU2Options::DEFAULT_SYNC_MODE);
m_ui.stretchSettings->setEnabled(sync_mode == Pcsx2Config::SPU2Options::SPU2SyncMode::TimeStretch);
}
AudioBackend AudioSettingsWidget::getEffectiveBackend() const
{
return AudioStream::ParseBackendName(
m_dialog->getEffectiveStringValue("SPU2/Output", "Backend",
AudioStream::GetBackendName(Pcsx2Config::SPU2Options::DEFAULT_BACKEND)
).c_str()
).value_or(Pcsx2Config::SPU2Options::DEFAULT_BACKEND);
dialog()->getEffectiveStringValue("SPU2/Output", "Backend",
AudioStream::GetBackendName(Pcsx2Config::SPU2Options::DEFAULT_BACKEND))
.c_str())
.value_or(Pcsx2Config::SPU2Options::DEFAULT_BACKEND);
}
void AudioSettingsWidget::updateDriverNames()
@@ -194,7 +193,7 @@ void AudioSettingsWidget::updateDriverNames()
for (const std::pair<std::string, std::string>& it : names)
m_ui.driver->addItem(QString::fromStdString(it.second), QString::fromStdString(it.first));
SettingWidgetBinder::BindWidgetToStringSetting(m_dialog->getSettingsInterface(), m_ui.driver, "SPU2/Output", "DriverName",
SettingWidgetBinder::BindWidgetToStringSetting(dialog()->getSettingsInterface(), m_ui.driver, "SPU2/Output", "DriverName",
std::move(names.front().first));
connect(m_ui.driver, &QComboBox::currentIndexChanged, this, &AudioSettingsWidget::updateDeviceNames);
}
@@ -205,8 +204,8 @@ void AudioSettingsWidget::updateDriverNames()
void AudioSettingsWidget::updateDeviceNames()
{
const AudioBackend backend = getEffectiveBackend();
const std::string driver_name = m_dialog->getEffectiveStringValue("SPU2/Output", "DriverName", "");
const std::string current_device = m_dialog->getEffectiveStringValue("SPU2/Output", "DeviceName", "");
const std::string driver_name = dialog()->getEffectiveStringValue("SPU2/Output", "DriverName", "");
const std::string current_device = dialog()->getEffectiveStringValue("SPU2/Output", "DeviceName", "");
const std::vector<AudioStream::DeviceInfo> devices = AudioStream::GetOutputDevices(backend, driver_name.c_str());
m_ui.outputDevice->disconnect();
@@ -239,7 +238,7 @@ void AudioSettingsWidget::updateDeviceNames()
QString::fromStdString(current_device));
}
SettingWidgetBinder::BindWidgetToStringSetting(m_dialog->getSettingsInterface(), m_ui.outputDevice, "SPU2/Output",
SettingWidgetBinder::BindWidgetToStringSetting(dialog()->getSettingsInterface(), m_ui.outputDevice, "SPU2/Output",
"DeviceName", std::move(devices.front().name));
}
@@ -249,9 +248,9 @@ void AudioSettingsWidget::updateDeviceNames()
void AudioSettingsWidget::updateLatencyLabel()
{
const u32 expand_buffer_ms = AudioStream::GetMSForBufferSize(SPU2::SAMPLE_RATE, getEffectiveExpansionBlockSize());
const u32 config_buffer_ms = m_dialog->getEffectiveIntValue("SPU2/Output", "BufferMS", AudioStreamParameters::DEFAULT_BUFFER_MS);
const u32 config_output_latency_ms = m_dialog->getEffectiveIntValue("SPU2/Output", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
const bool minimal_output = m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
const u32 config_buffer_ms = dialog()->getEffectiveIntValue("SPU2/Output", "BufferMS", AudioStreamParameters::DEFAULT_BUFFER_MS);
const u32 config_output_latency_ms = dialog()->getEffectiveIntValue("SPU2/Output", "OutputLatencyMS", AudioStreamParameters::DEFAULT_OUTPUT_LATENCY_MS);
const bool minimal_output = dialog()->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
//: Preserve the %1 variable, adapt the latter ms (and/or any possible spaces in between) to your language's ruleset.
m_ui.outputLatencyLabel->setText(minimal_output ? tr("N/A") : tr("%1 ms").arg(config_output_latency_ms));
@@ -263,17 +262,17 @@ void AudioSettingsWidget::updateLatencyLabel()
if (expand_buffer_ms > 0)
{
m_ui.bufferingLabel->setText(tr("Maximum Latency: %1 ms (%2 ms buffer + %3 ms expand + %4 ms output)")
.arg(config_buffer_ms + expand_buffer_ms + output_latency_ms)
.arg(config_buffer_ms)
.arg(expand_buffer_ms)
.arg(output_latency_ms));
.arg(config_buffer_ms + expand_buffer_ms + output_latency_ms)
.arg(config_buffer_ms)
.arg(expand_buffer_ms)
.arg(output_latency_ms));
}
else
{
m_ui.bufferingLabel->setText(tr("Maximum Latency: %1 ms (%2 ms buffer + %3 ms output)")
.arg(config_buffer_ms + output_latency_ms)
.arg(config_buffer_ms)
.arg(output_latency_ms));
.arg(config_buffer_ms + output_latency_ms)
.arg(config_buffer_ms)
.arg(output_latency_ms));
}
}
else
@@ -281,8 +280,8 @@ void AudioSettingsWidget::updateLatencyLabel()
if (expand_buffer_ms > 0)
{
m_ui.bufferingLabel->setText(tr("Maximum Latency: %1 ms (%2 ms expand, minimum output latency unknown)")
.arg(expand_buffer_ms + config_buffer_ms)
.arg(expand_buffer_ms));
.arg(expand_buffer_ms + config_buffer_ms)
.arg(expand_buffer_ms));
}
else
{
@@ -299,7 +298,7 @@ void AudioSettingsWidget::updateVolumeLabel()
void AudioSettingsWidget::onMinimalOutputLatencyChanged()
{
const bool minimal = m_dialog->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
const bool minimal = dialog()->getEffectiveBoolValue("SPU2/Output", "OutputLatencyMinimal", false);
m_ui.outputLatencyMS->setEnabled(!minimal);
updateLatencyLabel();
}
@@ -307,7 +306,7 @@ void AudioSettingsWidget::onMinimalOutputLatencyChanged()
void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
{
// only called for base settings
pxAssert(!m_dialog->isPerGameSettings());
pxAssert(!dialog()->isPerGameSettings());
Host::SetBaseIntSettingValue("SPU2/Output", "OutputVolume", new_value);
Host::CommitBaseSettingChanges();
g_emu_thread->applySettings();
@@ -318,7 +317,7 @@ void AudioSettingsWidget::onOutputVolumeChanged(int new_value)
void AudioSettingsWidget::onFastForwardVolumeChanged(int new_value)
{
// only called for base settings
pxAssert(!m_dialog->isPerGameSettings());
pxAssert(!dialog()->isPerGameSettings());
Host::SetBaseIntSettingValue("SPU2/Output", "FastForwardVolume", new_value);
Host::CommitBaseSettingChanges();
g_emu_thread->applySettings();
@@ -329,7 +328,7 @@ void AudioSettingsWidget::onFastForwardVolumeChanged(int new_value)
void AudioSettingsWidget::onOutputMutedChanged(int new_state)
{
// only called for base settings
pxAssert(!m_dialog->isPerGameSettings());
pxAssert(!dialog()->isPerGameSettings());
const bool muted = (new_state != 0);
Host::SetBaseBoolSettingValue("SPU2/Output", "OutputMuted", muted);
@@ -344,7 +343,7 @@ void AudioSettingsWidget::onExpansionSettingsClicked()
dlgui.setupUi(&dlg);
QtUtils::SetScalableIcon(dlgui.icon, QIcon::fromTheme(QStringLiteral("volume-up-line")), QSize(32, 32));
SettingsInterface* sif = m_dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
SettingWidgetBinder::BindWidgetToIntSetting(sif, dlgui.blockSize, "SPU2/Output", "ExpandBlockSize",
AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE, 0);
QtUtils::BindLabelToSlider(dlgui.blockSize, dlgui.blockSizeLabel);
@@ -378,42 +377,42 @@ void AudioSettingsWidget::onExpansionSettingsClicked()
connect(dlgui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, &dlg, &QDialog::accept);
connect(dlgui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, [this, &dlg]() {
m_dialog->setIntSettingValue("SPU2/Output", "ExpandBlockSize",
m_dialog->isPerGameSettings() ?
dialog()->setIntSettingValue("SPU2/Output", "ExpandBlockSize",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_BLOCK_SIZE));
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandCircularWrap",
m_dialog->isPerGameSettings() ?
dialog()->setFloatSettingValue("SPU2/Output", "ExpandCircularWrap",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_CIRCULAR_WRAP));
m_dialog->setFloatSettingValue(
dialog()->setFloatSettingValue(
"SPU2/Output", "ExpandShift",
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_SHIFT));
m_dialog->setFloatSettingValue(
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_SHIFT));
dialog()->setFloatSettingValue(
"SPU2/Output", "ExpandDepth",
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_DEPTH));
m_dialog->setFloatSettingValue(
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_DEPTH));
dialog()->setFloatSettingValue(
"SPU2/Output", "ExpandFocus",
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FOCUS));
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandCenterImage",
m_dialog->isPerGameSettings() ?
dialog()->isPerGameSettings() ? std::nullopt : std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FOCUS));
dialog()->setFloatSettingValue("SPU2/Output", "ExpandCenterImage",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_CENTER_IMAGE));
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandFrontSeparation",
m_dialog->isPerGameSettings() ?
dialog()->setFloatSettingValue("SPU2/Output", "ExpandFrontSeparation",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_FRONT_SEPARATION));
m_dialog->setFloatSettingValue("SPU2/Output", "ExpandRearSeparation",
m_dialog->isPerGameSettings() ?
dialog()->setFloatSettingValue("SPU2/Output", "ExpandRearSeparation",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<float>(AudioStreamParameters::DEFAULT_EXPAND_REAR_SEPARATION));
m_dialog->setIntSettingValue("SPU2/Output", "ExpandLowCutoff",
m_dialog->isPerGameSettings() ?
dialog()->setIntSettingValue("SPU2/Output", "ExpandLowCutoff",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_LOW_CUTOFF));
m_dialog->setIntSettingValue("SPU2/Output", "ExpandHighCutoff",
m_dialog->isPerGameSettings() ?
dialog()->setIntSettingValue("SPU2/Output", "ExpandHighCutoff",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<int>(AudioStreamParameters::DEFAULT_EXPAND_HIGH_CUTOFF));
@@ -433,7 +432,7 @@ void AudioSettingsWidget::onStretchSettingsClicked()
dlgui.setupUi(&dlg);
QtUtils::SetScalableIcon(dlgui.icon, QIcon::fromTheme(QStringLiteral("volume-up-line")), QSize(32, 32));
SettingsInterface* sif = m_dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
SettingWidgetBinder::BindWidgetToIntSetting(sif, dlgui.sequenceLength, "SPU2/Output", "StretchSequenceLengthMS",
AudioStreamParameters::DEFAULT_STRETCH_SEQUENCE_LENGTH, 0);
QtUtils::BindLabelToSlider(dlgui.sequenceLength, dlgui.sequenceLengthLabel);
@@ -450,24 +449,24 @@ void AudioSettingsWidget::onStretchSettingsClicked()
connect(dlgui.buttonBox->button(QDialogButtonBox::Close), &QPushButton::clicked, &dlg, &QDialog::accept);
connect(dlgui.buttonBox->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, this, [this, &dlg]() {
m_dialog->setIntSettingValue("SPU2/Output", "StretchSequenceLengthMS",
m_dialog->isPerGameSettings() ?
dialog()->setIntSettingValue("SPU2/Output", "StretchSequenceLengthMS",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_SEQUENCE_LENGTH));
m_dialog->setIntSettingValue("SPU2/Output", "StretchSeekWindowMS",
m_dialog->isPerGameSettings() ?
dialog()->setIntSettingValue("SPU2/Output", "StretchSeekWindowMS",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_SEEKWINDOW));
m_dialog->setIntSettingValue("SPU2/Output", "StretchOverlapMS",
m_dialog->isPerGameSettings() ?
dialog()->setIntSettingValue("SPU2/Output", "StretchOverlapMS",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<int>(AudioStreamParameters::DEFAULT_STRETCH_OVERLAP));
m_dialog->setBoolSettingValue("SPU2/Output", "StretchUseQuickSeek",
m_dialog->isPerGameSettings() ?
dialog()->setBoolSettingValue("SPU2/Output", "StretchUseQuickSeek",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<bool>(AudioStreamParameters::DEFAULT_STRETCH_USE_QUICKSEEK));
m_dialog->setBoolSettingValue("SPU2/Output", "StretchUseAAFilter",
m_dialog->isPerGameSettings() ?
dialog()->setBoolSettingValue("SPU2/Output", "StretchUseAAFilter",
dialog()->isPerGameSettings() ?
std::nullopt :
std::optional<bool>(AudioStreamParameters::DEFAULT_STRETCH_USE_AA_FILTER));
@@ -485,11 +484,11 @@ void AudioSettingsWidget::resetVolume(bool fast_forward)
QSlider* const slider = fast_forward ? m_ui.fastForwardVolume : m_ui.volume;
QLabel* const label = fast_forward ? m_ui.fastForwardVolumeLabel : m_ui.volumeLabel;
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
m_dialog->removeSettingValue("SPU2/Output", key);
dialog()->removeSettingValue("SPU2/Output", key);
const int value = m_dialog->getEffectiveIntValue("SPU2/Output", key, 100);
const int value = dialog()->getEffectiveIntValue("SPU2/Output", key, 100);
QSignalBlocker sb(slider);
slider->setValue(value);
label->setText(QStringLiteral("%1%2").arg(value).arg(tr("%")));

View File

@@ -5,21 +5,17 @@
#include "ui_AudioSettingsWidget.h"
#include "common/Pcsx2Defs.h"
#include <QtWidgets/QWidget>
#include "SettingsWidget.h"
enum class AudioBackend : u8;
enum class AudioExpansionMode : u8;
class SettingsWindow;
class AudioSettingsWidget : public QWidget
class AudioSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
AudioSettingsWidget(SettingsWindow* dialog, QWidget* parent);
AudioSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~AudioSettingsWidget();
private Q_SLOTS:
@@ -45,6 +41,5 @@ private:
void resetVolume(bool fast_forward);
Ui::AudioSettingsWidget m_ui;
SettingsWindow* m_dialog;
u32 m_output_device_latency = 0;
};

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>523</width>
<height>504</height>
<width>700</width>
<height>500</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -79,7 +79,7 @@
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBothSides</enum>
<enum>QSlider::TicksBothSides</enum>
</property>
<property name="tickInterval">
<number>20</number>
@@ -125,7 +125,7 @@
<string>Maximum latency: 0 frames (0.00ms)</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
@@ -147,10 +147,10 @@
<number>200</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBothSides</enum>
<enum>QSlider::TicksBothSides</enum>
</property>
<property name="tickInterval">
<number>20</number>
@@ -234,10 +234,10 @@
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBothSides</enum>
<enum>QSlider::TicksBothSides</enum>
</property>
<property name="tickInterval">
<number>10</number>
@@ -256,7 +256,7 @@
<string>100%</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
@@ -283,10 +283,10 @@
<number>100</number>
</property>
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TickPosition::TicksBothSides</enum>
<enum>QSlider::TicksBothSides</enum>
</property>
<property name="tickInterval">
<number>10</number>
@@ -305,7 +305,7 @@
<string>100%</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
@@ -341,12 +341,12 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -14,25 +14,23 @@
#include <QtGui/QIcon>
#include <QtWidgets/QFileDialog>
#include <algorithm>
BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
BIOSSettingsWidget::BIOSSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastBoot, "EmuCore", "EnableFastBoot", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastBootFastForward, "EmuCore", "EnableFastBootFastForward", false);
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.searchDirectory, m_ui.browseSearchDirectory, m_ui.openSearchDirectory,
m_ui.resetSearchDirectory, "Folders", "Bios", Path::Combine(EmuFolders::DataRoot, "bios"));
dialog->registerWidgetHelp(m_ui.fastBoot, tr("Fast Boot"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.fastBoot, tr("Fast Boot"), tr("Checked"),
tr("Patches the BIOS to skip the console's boot animation."));
dialog->registerWidgetHelp(m_ui.fastBootFastForward, tr("Fast Forward Boot"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.fastBootFastForward, tr("Fast Forward Boot"), tr("Unchecked"),
tr("Removes emulation speed throttle until the game starts to reduce startup time."));
refreshList();
@@ -140,6 +138,6 @@ void BIOSSettingsWidget::listItemChanged(const QTreeWidgetItem* current, const Q
void BIOSSettingsWidget::fastBootChanged()
{
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore", "EnableFastBoot", true);
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore", "EnableFastBoot", true);
m_ui.fastBootFastForward->setEnabled(enabled);
}

View File

@@ -3,25 +3,16 @@
#pragma once
#include <QtCore/QDir>
#include <QtCore/QPair>
#include <QtCore/QString>
#include <QtCore/QThread>
#include <QtCore/QVector>
#include <QtWidgets/QWidget>
#include <string>
#include "ui_BIOSSettingsWidget.h"
class SettingsWindow;
class QThread;
#include "SettingsWidget.h"
class BIOSSettingsWidget : public QWidget
class BIOSSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
BIOSSettingsWidget(SettingsWindow* dialog, QWidget* parent);
BIOSSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~BIOSSettingsWidget();
static void populateList(QTreeWidget* list, const std::string& directory);
@@ -35,5 +26,4 @@ private Q_SLOTS:
private:
Ui::BIOSSettingsWidget m_ui;
SettingsWindow* m_dialog;
};

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>618</width>
<height>408</height>
<width>700</width>
<height>500</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
@@ -161,7 +161,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -44,13 +44,12 @@ static const char* s_dns_name[] = {
using PacketReader::IP::IP_Address;
DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog{dialog}
DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
//////////////////////////////////////////////////////////////////////////
// Eth Enabled
@@ -75,7 +74,7 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
connect(m_ui.ethInterceptDHCP, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onEthDHCPInterceptChanged);
//IP settings
const IPValidator* ipValidator = new IPValidator(this, m_dialog->isPerGameSettings());
const IPValidator* ipValidator = new IPValidator(this, dialog()->isPerGameSettings());
// clang-format off
m_ui.ethPS2Addr ->setValidator(ipValidator);
@@ -84,13 +83,13 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
m_ui.ethDNS1Addr ->setValidator(ipValidator);
m_ui.ethDNS2Addr ->setValidator(ipValidator);
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
m_ui.ethPS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "PS2IP", "").value().c_str()));
m_ui.ethNetMask ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Mask", "").value().c_str()));
m_ui.ethGatewayAddr->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Gateway", "").value().c_str()));
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS1", "").value().c_str()));
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS2", "").value().c_str()));
m_ui.ethPS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "PS2IP", "").value().c_str()));
m_ui.ethNetMask ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Mask", "").value().c_str()));
m_ui.ethGatewayAddr->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Gateway", "").value().c_str()));
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS1", "").value().c_str()));
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS2", "").value().c_str()));
m_ui.ethPS2Addr ->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Eth", "PS2IP", "0.0.0.0").c_str()));
m_ui.ethNetMask ->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Eth", "Mask", "0.0.0.0").c_str()));
@@ -100,11 +99,11 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
}
else
{
m_ui.ethPS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "PS2IP", "0.0.0.0").value().c_str()));
m_ui.ethNetMask ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Mask", "0.0.0.0").value().c_str()));
m_ui.ethGatewayAddr->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "Gateway", "0.0.0.0").value().c_str()));
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS1", "0.0.0.0").value().c_str()));
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Eth", "DNS2", "0.0.0.0").value().c_str()));
m_ui.ethPS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "PS2IP", "0.0.0.0").value().c_str()));
m_ui.ethNetMask ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Mask", "0.0.0.0").value().c_str()));
m_ui.ethGatewayAddr->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "Gateway", "0.0.0.0").value().c_str()));
m_ui.ethDNS1Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS1", "0.0.0.0").value().c_str()));
m_ui.ethDNS2Addr ->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Eth", "DNS2", "0.0.0.0").value().c_str()));
}
connect(m_ui.ethPS2Addr, &QLineEdit::editingFinished, this, [&]() { onEthIPChanged(m_ui.ethPS2Addr, "DEV9/Eth", "PS2IP" ); });
@@ -171,13 +170,13 @@ DEV9SettingsWidget::DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent)
connect(m_ui.hddEnabled, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onHddEnabledChanged);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hddEnabled, "DEV9/Hdd", "HddEnable", false);
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
m_ui.hddFile->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Hdd", "HddFile", "").value().c_str()));
m_ui.hddFile->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Hdd", "HddFile", "").value().c_str()));
m_ui.hddFile->setPlaceholderText(QString::fromUtf8(Host::GetBaseStringSettingValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw")));
}
else
m_ui.hddFile->setText(QString::fromUtf8(m_dialog->getStringValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw").value().c_str()));
m_ui.hddFile->setText(QString::fromUtf8(dialog()->getStringValue("DEV9/Hdd", "HddFile", "DEV9hdd.raw").value().c_str()));
connect(m_ui.hddLBA48, &QCheckBox::checkStateChanged, this, &DEV9SettingsWidget::onHddLBA48Changed);
@@ -221,7 +220,7 @@ void DEV9SettingsWidget::onEthDeviceTypeChanged(int index)
{
std::vector<AdapterEntry> list = m_adapter_list[static_cast<u32>(m_api_list[index])];
const std::string value = m_dialog->getEffectiveStringValue("DEV9/Eth", "EthDevice", "");
const std::string value = dialog()->getEffectiveStringValue("DEV9/Eth", "EthDevice", "");
for (size_t i = 0; i < list.size(); i++)
{
m_ui.ethDev->addItem(QString::fromUtf8(list[i].name));
@@ -232,7 +231,7 @@ void DEV9SettingsWidget::onEthDeviceTypeChanged(int index)
selectedApi = m_api_list[index];
}
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
if (index == 0)
{
@@ -277,13 +276,13 @@ void DEV9SettingsWidget::onEthDeviceChanged(int index)
{
const AdapterEntry& adapter = m_adapter_list[static_cast<u32>(m_api_list[m_ui.ethDevType->currentIndex()])][index];
m_dialog->setStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(adapter.type)]);
m_dialog->setStringSettingValue("DEV9/Eth", "EthDevice", adapter.guid.c_str());
dialog()->setStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(adapter.type)]);
dialog()->setStringSettingValue("DEV9/Eth", "EthDevice", adapter.guid.c_str());
}
else if (m_dialog->isPerGameSettings() && m_ui.ethDevType->currentIndex() == 0 && index == 0)
else if (dialog()->isPerGameSettings() && m_ui.ethDevType->currentIndex() == 0 && index == 0)
{
m_dialog->setStringSettingValue("DEV9/Eth", "EthApi", std::nullopt);
m_dialog->setStringSettingValue("DEV9/Eth", "EthDevice", std::nullopt);
dialog()->setStringSettingValue("DEV9/Eth", "EthApi", std::nullopt);
dialog()->setStringSettingValue("DEV9/Eth", "EthDevice", std::nullopt);
}
}
@@ -323,8 +322,8 @@ void DEV9SettingsWidget::onEthIPChanged(QLineEdit* sender, const char* section,
//Alow clearing a per-game ip setting
if (sender->text().isEmpty())
{
if (m_dialog->getStringValue(section, key, std::nullopt).has_value())
m_dialog->setStringSettingValue(section, key, std::nullopt);
if (dialog()->getStringValue(section, key, std::nullopt).has_value())
dialog()->setStringSettingValue(section, key, std::nullopt);
return;
}
@@ -337,9 +336,9 @@ void DEV9SettingsWidget::onEthIPChanged(QLineEdit* sender, const char* section,
sender->setText(QString::fromUtf8(neatStr.c_str()));
std::string oldval = m_dialog->getStringValue(section, key, "0.0.0.0").value();
std::string oldval = dialog()->getStringValue(section, key, "0.0.0.0").value();
if (neatStr != oldval)
m_dialog->setStringSettingValue(section, key, neatStr.c_str());
dialog()->setStringSettingValue(section, key, neatStr.c_str());
}
void DEV9SettingsWidget::onEthAutoChanged(QCheckBox* sender, Qt::CheckState state, QLineEdit* input, const char* section, const char* key)
@@ -357,7 +356,7 @@ void DEV9SettingsWidget::onEthDNSModeChanged(QComboBox* sender, int index, QLine
{
if (sender->isEnabled())
{
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
if (index == 0)
{
@@ -522,7 +521,7 @@ void DEV9SettingsWidget::onEthHostImport()
void DEV9SettingsWidget::onEthHostPerGame()
{
const std::optional<int> hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
const std::optional<int> hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
if (!hostLengthOpt.has_value())
{
QMessageBox::StandardButton ret = QMessageBox::question(this, tr("Per Game Host list"),
@@ -532,12 +531,12 @@ void DEV9SettingsWidget::onEthHostPerGame()
switch (ret)
{
case QMessageBox::StandardButton::No:
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
break;
case QMessageBox::StandardButton::Yes:
{
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", 0);
std::vector<HostEntryUi> hosts = ListBaseHostsConfig();
for (size_t i = 0; i < hosts.size(); i++)
AddNewHostConfig(hosts[i]);
@@ -563,7 +562,7 @@ void DEV9SettingsWidget::onEthHostPerGame()
for (int i = hostLength - 1; i >= 0; i--)
DeleteHostConfig(i);
}
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", nullptr, std::nullopt);
dialog()->setIntSettingValue("DEV9/Eth/Hosts", nullptr, std::nullopt);
}
RefreshHostList();
@@ -576,16 +575,16 @@ void DEV9SettingsWidget::onEthHostEdit(QStandardItem* item)
switch (item->column())
{
case 0: //Name
m_dialog->setStringSettingValue(section.c_str(), "Desc", item->text().toUtf8().constData());
dialog()->setStringSettingValue(section.c_str(), "Desc", item->text().toUtf8().constData());
break;
case 1: //URL
m_dialog->setStringSettingValue(section.c_str(), "Url", item->text().toUtf8().constData());
dialog()->setStringSettingValue(section.c_str(), "Url", item->text().toUtf8().constData());
break;
case 2: //IP
m_dialog->setStringSettingValue(section.c_str(), "Address", item->text().toUtf8().constData());
dialog()->setStringSettingValue(section.c_str(), "Address", item->text().toUtf8().constData());
break;
case 3: //Enabled
m_dialog->setBoolSettingValue(section.c_str(), "Enabled", item->checkState() == Qt::CheckState::Checked);
dialog()->setBoolSettingValue(section.c_str(), "Enabled", item->checkState() == Qt::CheckState::Checked);
break;
default:
break;
@@ -634,9 +633,9 @@ void DEV9SettingsWidget::onHddFileEdit()
// Also save the hddPath setting
std::string hddPath(m_ui.hddFile->text().toStdString());
if (hddPath.empty())
m_dialog->setStringSettingValue("DEV9/Hdd", "HddFile", std::nullopt);
dialog()->setStringSettingValue("DEV9/Hdd", "HddFile", std::nullopt);
else
m_dialog->setStringSettingValue("DEV9/Hdd", "HddFile", hddPath.c_str());
dialog()->setStringSettingValue("DEV9/Hdd", "HddFile", hddPath.c_str());
UpdateHddSizeUIValues();
}
@@ -716,7 +715,7 @@ void DEV9SettingsWidget::UpdateHddSizeUIEnabled()
std::string hddPath(m_ui.hddFile->text().toStdString());
bool enableSizeUI;
if (m_dialog->isPerGameSettings() && hddPath.empty())
if (dialog()->isPerGameSettings() && hddPath.empty())
enableSizeUI = false;
else
enableSizeUI = m_ui.hddFile->isEnabled();
@@ -733,7 +732,7 @@ void DEV9SettingsWidget::UpdateHddSizeUIValues()
{
std::string hddPath(m_ui.hddFile->text().toStdString());
if (m_dialog->isPerGameSettings() && hddPath.empty())
if (dialog()->isPerGameSettings() && hddPath.empty())
hddPath = m_ui.hddFile->placeholderText().toStdString();
if (!Path::IsAbsolute(hddPath))
@@ -770,7 +769,7 @@ void DEV9SettingsWidget::showEvent(QShowEvent* event)
{
//The API combobox dosn't set the EthApi field, that is performed by the device combobox (in addition to saving the device)
//This means that this setting can get out of sync with true value, so revert to that if the ui is closed and opened
const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
const std::string value = dialog()->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
//SignalBlocker to prevent saving a value already in the config file
QSignalBlocker sb(m_ui.ethDev);
@@ -864,7 +863,7 @@ void DEV9SettingsWidget::LoadAdapters()
m_api_valuelist.push_back(nullptr);
//We replace the blank entry with one for global settings
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
const std::string valueAPI = Host::GetBaseStringSettingValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]);
for (int i = 0; Pcsx2Config::DEV9Options::NetApiNames[i] != nullptr; i++)
@@ -892,7 +891,7 @@ void DEV9SettingsWidget::LoadAdapters()
m_adapter_list[static_cast<u32>(Pcsx2Config::DEV9Options::NetApi::Unset)][0].name = baseAdapter;
}
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
m_ui.ethDevType->addItem(tr("Use Global Setting [%1]").arg(QString::fromUtf8(Pcsx2Config::DEV9Options::NetApiNames[static_cast<u32>(m_global_api)])));
else
m_ui.ethDevType->addItem(qApp->translate("DEV9SettingsWidget", m_api_namelist[0]));
@@ -900,7 +899,7 @@ void DEV9SettingsWidget::LoadAdapters()
for (int i = 1; m_api_namelist[i] != nullptr; i++)
m_ui.ethDevType->addItem(qApp->translate("DEV9SettingsWidget", m_api_namelist[i]));
const std::string value = m_dialog->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
const std::string value = dialog()->getStringValue("DEV9/Eth", "EthApi", Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(Pcsx2Config::DEV9Options::NetApi::Unset)]).value();
for (int i = 0; m_api_namelist[i] != nullptr; i++)
{
@@ -924,7 +923,7 @@ void DEV9SettingsWidget::RefreshHostList()
std::vector<HostEntryUi> hosts;
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
m_ui.ethHostPerGame->setVisible(true);
@@ -988,7 +987,7 @@ void DEV9SettingsWidget::RefreshHostList()
int DEV9SettingsWidget::CountHostsConfig()
{
return m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", 0).value();
return dialog()->getIntValue("DEV9/Eth/Hosts", "Count", 0).value();
}
std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
@@ -996,14 +995,14 @@ std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
std::vector<HostEntryUi> hosts;
std::optional<int> hostLengthOpt;
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", std::nullopt);
if (!hostLengthOpt.has_value())
return std::nullopt;
}
else
hostLengthOpt = m_dialog->getIntValue("DEV9/Eth/Hosts", "Count", 0);
hostLengthOpt = dialog()->getIntValue("DEV9/Eth/Hosts", "Count", 0);
const int hostLength = hostLengthOpt.value();
for (int i = 0; i < hostLength; i++)
@@ -1011,10 +1010,10 @@ std::optional<std::vector<HostEntryUi>> DEV9SettingsWidget::ListHostsConfig()
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(i);
HostEntryUi entry;
entry.Url = m_dialog->getStringValue(section.c_str(), "Url", "").value();
entry.Desc = m_dialog->getStringValue(section.c_str(), "Desc", "").value();
entry.Address = m_dialog->getStringValue(section.c_str(), "Address", "").value();
entry.Enabled = m_dialog->getBoolValue(section.c_str(), "Enabled", false).value();
entry.Url = dialog()->getStringValue(section.c_str(), "Url", "").value();
entry.Desc = dialog()->getStringValue(section.c_str(), "Desc", "").value();
entry.Address = dialog()->getStringValue(section.c_str(), "Address", "").value();
entry.Enabled = dialog()->getBoolValue(section.c_str(), "Enabled", false).value();
hosts.push_back(entry);
}
@@ -1046,12 +1045,12 @@ void DEV9SettingsWidget::AddNewHostConfig(const HostEntryUi& host)
const int hostLength = CountHostsConfig();
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(hostLength);
// clang-format off
m_dialog->setStringSettingValue(section.c_str(), "Url", host.Url.c_str());
m_dialog->setStringSettingValue(section.c_str(), "Desc", host.Desc.c_str());
m_dialog->setStringSettingValue(section.c_str(), "Address", host.Address.c_str());
m_dialog->setBoolSettingValue (section.c_str(), "Enabled", host.Enabled);
dialog()->setStringSettingValue(section.c_str(), "Url", host.Url.c_str());
dialog()->setStringSettingValue(section.c_str(), "Desc", host.Desc.c_str());
dialog()->setStringSettingValue(section.c_str(), "Address", host.Address.c_str());
dialog()->setBoolSettingValue (section.c_str(), "Enabled", host.Enabled);
// clang-format on
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength + 1);
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength + 1);
RefreshHostList();
}
@@ -1066,10 +1065,10 @@ void DEV9SettingsWidget::DeleteHostConfig(int index)
std::string sectionAhead = "DEV9/Eth/Hosts/Host" + std::to_string(i + 1);
// clang-format off
m_dialog->setStringSettingValue(section.c_str(), "Url", m_dialog->getStringValue(sectionAhead.c_str(), "Url", "").value().c_str());
m_dialog->setStringSettingValue(section.c_str(), "Desc", m_dialog->getStringValue(sectionAhead.c_str(), "Desc", "").value().c_str());
m_dialog->setStringSettingValue(section.c_str(), "Address", m_dialog->getStringValue(sectionAhead.c_str(), "Address", "0.0.0.0").value().c_str());
m_dialog->setBoolSettingValue (section.c_str(), "Enabled", m_dialog->getBoolValue (sectionAhead.c_str(), "Enabled", false).value());
dialog()->setStringSettingValue(section.c_str(), "Url", dialog()->getStringValue(sectionAhead.c_str(), "Url", "").value().c_str());
dialog()->setStringSettingValue(section.c_str(), "Desc", dialog()->getStringValue(sectionAhead.c_str(), "Desc", "").value().c_str());
dialog()->setStringSettingValue(section.c_str(), "Address", dialog()->getStringValue(sectionAhead.c_str(), "Address", "0.0.0.0").value().c_str());
dialog()->setBoolSettingValue (section.c_str(), "Enabled", dialog()->getBoolValue (sectionAhead.c_str(), "Enabled", false).value());
// clang-format on
}
@@ -1077,9 +1076,9 @@ void DEV9SettingsWidget::DeleteHostConfig(int index)
std::string section = "DEV9/Eth/Hosts/Host" + std::to_string(hostLength - 1);
//Specifying a value of nullopt will delete the key
//if the key is a nullptr, the whole section is deleted
m_dialog->setStringSettingValue(section.c_str(), nullptr, std::nullopt);
dialog()->setStringSettingValue(section.c_str(), nullptr, std::nullopt);
m_dialog->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength - 1);
dialog()->setIntSettingValue("DEV9/Eth/Hosts", "Count", hostLength - 1);
RefreshHostList();
}

View File

@@ -3,18 +3,17 @@
#pragma once
#include <QtWidgets/QWidget>
#include <QtGui/QStandardItemModel>
#include "ui_DEV9SettingsWidget.h"
#include "SettingsWidget.h"
#include "DEV9UiCommon.h"
#include "DEV9DnsHostDialog.h"
#include "DEV9/net.h"
class SettingsWindow;
#include <QtGui/QStandardItemModel>
class DEV9SettingsWidget : public QWidget
class DEV9SettingsWidget : public SettingsWidget
{
Q_OBJECT
@@ -43,7 +42,7 @@ private Q_SLOTS:
void onHddCreateClicked();
public:
DEV9SettingsWidget(SettingsWindow* dialog, QWidget* parent);
DEV9SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~DEV9SettingsWidget();
protected:
@@ -63,8 +62,6 @@ private:
void UpdateHddSizeUIEnabled();
void UpdateHddSizeUIValues();
SettingsWindow* m_dialog;
Ui::DEV9SettingsWidget m_ui;
bool m_firstShow{true};

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>482</height>
<width>700</width>
<height>700</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -218,7 +218,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>
@@ -387,7 +387,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>68</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DebugAnalysisSettingsTab</class>
<widget class="QWidget" name="DebugAnalysisSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="analysisLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>These settings control what and when analysis passes should be performed on the program running in the virtual machine so that the resultant information can be shown in the debugger.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="analysisGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Analysis</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QFormLayout" name="analysisForm">
<item row="0" column="0">
<widget class="QLabel" name="analysisConditionLabel">
<property name="text">
<string>Automatically Analyze Program:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="analysisCondition">
<item>
<property name="text">
<string>Always</string>
</property>
</item>
<item>
<property name="text">
<string>If Debugger Is Open</string>
</property>
</item>
<item>
<property name="text">
<string>Never</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="generateSymbolsForIRXExportTables">
<property name="text">
<string>Generate Symbols For IRX Exports</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="analysisSettings" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -413,7 +413,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DebugGSSettingsTab</class>
<widget class="QWidget" name="DebugGSSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Draw Dumping</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="dumpGSData">
<property name="text">
<string>Dump GS Draws</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="saveRT">
<property name="text">
<string>Save RT</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="saveFrame">
<property name="text">
<string>Save Frame</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="saveTexture">
<property name="text">
<string>Save Texture</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="saveDepth">
<property name="text">
<string>Save Depth</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="saveAlpha">
<property name="text">
<string>Save Alpha</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="saveInfo">
<property name="text">
<string>Save Info</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_1">
<property name="text">
<string>Save Draw Start:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="saveDrawStart">
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Save Draw Count:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="saveDrawCount">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Save Frame Start:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="saveFrameStart">
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Save Frame Count:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="saveFrameCount">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Hardware Dump Directory:</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Software Dump Directory:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,0">
<item>
<widget class="QLineEdit" name="hwDumpDirectory"/>
</item>
<item>
<widget class="QPushButton" name="hwDumpBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="hwDumpOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0">
<item>
<widget class="QLineEdit" name="swDumpDirectory"/>
</item>
<item>
<widget class="QPushButton" name="swDumpBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="swDumpOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,321 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DebugLoggingSettingsTab</class>
<widget class="QWidget" name="DebugLoggingSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="chkEnable">
<property name="text">
<string>Enable</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="traceLogHorizontalLayout">
<item>
<widget class="QGroupBox" name="grpEELogging">
<property name="title">
<string>EE</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QGridLayout" name="grpEELoggingGrid">
<item row="4" column="1">
<widget class="QCheckBox" name="chkEEDMACTRL">
<property name="text">
<string>DMA Control</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="chkEEMFIFO">
<property name="text">
<string>SPR / MFIFO</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="chkEEVIF">
<property name="text">
<string>VIF</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chkEECOP1">
<property name="text">
<string>COP1 (FPU)</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="chkEEMSKPATH3">
<property name="text">
<string>MSKPATH3</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="chkEECache">
<property name="text">
<string>Cache</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QCheckBox" name="chkEEGIF">
<property name="text">
<string>GIF</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="chkEER5900">
<property name="text">
<string>R5900</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="chkEECOP0">
<property name="text">
<string>COP0</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="chkEEMMIO">
<property name="text">
<string>HW Regs (MMIO)</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="chkEECounters">
<property name="text">
<string>Counters</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QCheckBox" name="chkEESIF">
<property name="text">
<string>SIF</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="chkEECOP2">
<property name="text">
<string>COP2 (VU0 Macro)</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="chkEEVIFCodes">
<property name="text">
<string>VIFCodes</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkEEMemory">
<property name="text">
<string>Memory</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkEEUNKNWNMMIO">
<property name="text">
<string>Unknown MMIO</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="chkEEIPU">
<property name="text">
<string>IPU</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="chkEEBIOS">
<property name="text">
<string>BIOS</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="chkEEDMARegs">
<property name="text">
<string>DMA Registers</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QCheckBox" name="chkEEGIFTags">
<property name="text">
<string>GIFTags</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="eeLoggingSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="grpIOPLogging">
<property name="title">
<string>IOP</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QGridLayout" name="grpIOPLoggingGrid">
<item row="4" column="0">
<widget class="QCheckBox" name="chkIOPCounters">
<property name="text">
<string>Counters</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkIOPUNKNWNMMIO">
<property name="text">
<string>Unknown MMIO</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="chkIOPMMIO">
<property name="text">
<string>HW Regs (MMIO)</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="chkIOPCDVD">
<property name="text">
<string>CDVD</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chkIOPR3000A">
<property name="text">
<string>R3000A</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="chkIOPMemcards">
<property name="text">
<string>Memcards</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="chkIOPDMARegs">
<property name="text">
<string>DMA Registers</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="chkIOPPad">
<property name="text">
<string>Pad</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="chkIOPBIOS">
<property name="text">
<string>BIOS</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="chkIOPMDEC">
<property name="text">
<string>MDEC</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkIOPDMACTRL">
<property name="text">
<string>DMA Control</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="chkIOPCOP2">
<property name="text">
<string>COP2 (GPU)</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="iopLoggingSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -3,161 +3,202 @@
#include "DebugSettingsWidget.h"
#include "DebugUserInterfaceSettingsWidget.h"
#include "DebugAnalysisSettingsWidget.h"
#include "QtUtils.h"
#include "SettingWidgetBinder.h"
#include "SettingsWindow.h"
#include "Debugger/DebuggerWindow.h"
#include "Settings/DebugAnalysisSettingsWidget.h"
#include "Settings/SettingsWindow.h"
#include "pcsx2/Host.h"
#include <QtWidgets/QMessageBox>
DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
{
SettingsInterface* sif = dialog->getSettingsInterface();
static const char* s_drop_indicators[] = {
QT_TRANSLATE_NOOP("DebugSettingsWidget", "Classic"),
QT_TRANSLATE_NOOP("DebugSettingsWidget", "Segmented"),
QT_TRANSLATE_NOOP("DebugSettingsWidget", "Minimalistic"),
nullptr,
};
m_ui.setupUi(this);
DebugSettingsWidget::DebugSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog()->getSettingsInterface();
m_user_interface_tab = setupTab(m_user_interface, tr("User Interface"));
setupTab(m_analysis, tr("Analysis"));
setupTab(m_gs, tr("GS"));
m_logging_tab = setupTab(m_logging, tr("Logging"));
//////////////////////////////////////////////////////////////////////////
// User Interface Settings
//////////////////////////////////////////////////////////////////////////
if (!dialog->isPerGameSettings())
if (!dialog()->isPerGameSettings())
{
m_user_interface_settings = new DebugUserInterfaceSettingsWidget(dialog);
m_ui.userInterfaceTabWidget->setLayout(new QVBoxLayout());
m_ui.userInterfaceTabWidget->layout()->addWidget(m_user_interface_settings);
SettingWidgetBinder::BindWidgetToIntSetting(
sif, m_user_interface.refreshInterval, "Debugger/UserInterface", "RefreshInterval", 1000);
connect(m_user_interface.refreshInterval, &QSpinBox::valueChanged, this, []() {
if (g_debugger_window)
g_debugger_window->updateFromSettings();
});
dialog()->registerWidgetHelp(
m_user_interface.refreshInterval, tr("Refresh Interval"), tr("1000ms"),
tr("The amount of time to wait between subsequent attempts to update the user interface to reflect the state "
"of the virtual machine."));
SettingWidgetBinder::BindWidgetToBoolSetting(
sif, m_user_interface.showOnStartup, "Debugger/UserInterface", "ShowOnStartup", false);
dialog()->registerWidgetHelp(
m_user_interface.showOnStartup, tr("Show On Startup"), tr("Unchecked"),
tr("Open the debugger window automatically when PCSX2 starts."));
SettingWidgetBinder::BindWidgetToBoolSetting(
sif, m_user_interface.saveWindowGeometry, "Debugger/UserInterface", "SaveWindowGeometry", true);
dialog()->registerWidgetHelp(
m_user_interface.saveWindowGeometry, tr("Save Window Geometry"), tr("Checked"),
tr("Save the position and size of the debugger window when it is closed so that it can be restored later."));
SettingWidgetBinder::BindWidgetToEnumSetting(
sif,
m_user_interface.dropIndicator,
"Debugger/UserInterface",
"DropIndicatorStyle",
s_drop_indicators,
s_drop_indicators,
s_drop_indicators[0],
"DebugUserInterfaceSettingsWidget");
dialog()->registerWidgetHelp(
m_user_interface.dropIndicator, tr("Drop Indicator Style"), tr("Classic"),
tr("Choose how the drop indicators that appear when you drag dock windows in the debugger are styled. "
"You will have to restart the debugger for this option to take effect."));
}
else
{
m_ui.debugTabs->removeTab(m_ui.debugTabs->indexOf(m_ui.userInterfaceTabWidget));
setTabVisible(m_user_interface_tab, false);
}
//////////////////////////////////////////////////////////////////////////
// Analysis Settings
//////////////////////////////////////////////////////////////////////////
SettingWidgetBinder::BindWidgetToEnumSetting(
sif, m_ui.analysisCondition, "Debugger/Analysis", "RunCondition",
sif, m_analysis.analysisCondition, "Debugger/Analysis", "RunCondition",
Pcsx2Config::DebugAnalysisOptions::RunConditionNames, DebugAnalysisCondition::IF_DEBUGGER_IS_OPEN);
SettingWidgetBinder::BindWidgetToBoolSetting(
sif, m_ui.generateSymbolsForIRXExportTables, "Debugger/Analysis", "GenerateSymbolsForIRXExports", true);
sif, m_analysis.generateSymbolsForIRXExportTables, "Debugger/Analysis", "GenerateSymbolsForIRXExports", true);
dialog->registerWidgetHelp(m_ui.analysisCondition, tr("Analyze Program"), tr("If Debugger Is Open"),
dialog()->registerWidgetHelp(m_analysis.analysisCondition, tr("Analyze Program"), tr("If Debugger Is Open"),
tr("Choose when the analysis passes should be run: Always (to save time when opening the debugger), If "
"Debugger Is Open (to save memory if you never open the debugger), or Never."));
dialog->registerWidgetHelp(m_ui.generateSymbolsForIRXExportTables, tr("Generate Symbols for IRX Export Tables"), tr("Checked"),
dialog()->registerWidgetHelp(m_analysis.generateSymbolsForIRXExportTables, tr("Generate Symbols for IRX Export Tables"), tr("Checked"),
tr("Hook IRX module loading/unloading and generate symbols for exported functions on the fly."));
m_analysis_settings = new DebugAnalysisSettingsWidget(dialog);
m_analysis_settings = new DebugAnalysisSettingsWidget(dialog());
m_ui.analysisSettings->setLayout(new QVBoxLayout());
m_ui.analysisSettings->layout()->setContentsMargins(0, 0, 0, 0);
m_ui.analysisSettings->layout()->addWidget(m_analysis_settings);
m_analysis.analysisSettings->setLayout(new QVBoxLayout());
m_analysis.analysisSettings->layout()->setContentsMargins(0, 0, 0, 0);
m_analysis.analysisSettings->layout()->addWidget(m_analysis_settings);
//////////////////////////////////////////////////////////////////////////
// GS Settings
//////////////////////////////////////////////////////////////////////////
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.dumpGSData, "EmuCore/GS", "DumpGSData", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveRT, "EmuCore/GS", "SaveRT", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveFrame, "EmuCore/GS", "SaveFrame", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveTexture, "EmuCore/GS", "SaveTexture", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveDepth, "EmuCore/GS", "SaveDepth", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveAlpha, "EmuCore/GS", "SaveAlpha", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveInfo, "EmuCore/GS", "SaveInfo", false);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveDrawStart, "EmuCore/GS", "SaveDrawStart", 0);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveDrawCount, "EmuCore/GS", "SaveDrawCount", 5000);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveFrameStart, "EmuCore/GS", "SaveFrameStart", 0);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.saveFrameCount, "EmuCore/GS", "SaveFrameCount", 999999);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.dumpGSData, "EmuCore/GS", "DumpGSData", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveRT, "EmuCore/GS", "SaveRT", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveFrame, "EmuCore/GS", "SaveFrame", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveTexture, "EmuCore/GS", "SaveTexture", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveDepth, "EmuCore/GS", "SaveDepth", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveAlpha, "EmuCore/GS", "SaveAlpha", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_gs.saveInfo, "EmuCore/GS", "SaveInfo", false);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveDrawStart, "EmuCore/GS", "SaveDrawStart", 0);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveDrawCount, "EmuCore/GS", "SaveDrawCount", 5000);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveFrameStart, "EmuCore/GS", "SaveFrameStart", 0);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_gs.saveFrameCount, "EmuCore/GS", "SaveFrameCount", 999999);
SettingWidgetBinder::BindWidgetToFolderSetting(
sif, m_ui.hwDumpDirectory, m_ui.hwDumpBrowse, m_ui.hwDumpOpen, nullptr, "EmuCore/GS", "HWDumpDirectory", std::string(), false);
sif, m_gs.hwDumpDirectory, m_gs.hwDumpBrowse, m_gs.hwDumpOpen, nullptr, "EmuCore/GS", "HWDumpDirectory", std::string(), false);
SettingWidgetBinder::BindWidgetToFolderSetting(
sif, m_ui.swDumpDirectory, m_ui.swDumpBrowse, m_ui.swDumpOpen, nullptr, "EmuCore/GS", "SWDumpDirectory", std::string(), false);
sif, m_gs.swDumpDirectory, m_gs.swDumpBrowse, m_gs.swDumpOpen, nullptr, "EmuCore/GS", "SWDumpDirectory", std::string(), false);
connect(m_ui.dumpGSData, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onDrawDumpingChanged);
connect(m_gs.dumpGSData, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onDrawDumpingChanged);
onDrawDumpingChanged();
#ifdef PCSX2_DEVBUILD
//////////////////////////////////////////////////////////////////////////
// Trace Logging Settings
// Logging Settings
//////////////////////////////////////////////////////////////////////////
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEnable, "EmuCore/TraceLog", "Enabled", false);
dialog()->registerWidgetHelp(m_logging.chkEnable, tr("Enable Trace Logging"), tr("Unchecked"), tr("Globally enable / disable trace logging."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEnable, "EmuCore/TraceLog", "Enabled", false);
dialog->registerWidgetHelp(m_ui.chkEnable, tr("Enable Trace Logging"), tr("Unchecked"), tr("Globally enable / disable trace logging."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEBIOS, "EmuCore/TraceLog", "EE.bios", false);
dialog()->registerWidgetHelp(m_logging.chkEEBIOS, tr("EE BIOS"), tr("Unchecked"), tr("Log SYSCALL and DECI2 activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMemory, "EmuCore/TraceLog", "EE.memory", false);
dialog()->registerWidgetHelp(m_logging.chkEEMemory, tr("EE Memory"), tr("Unchecked"), tr("Log memory access to unknown or unmapped EE memory."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEER5900, "EmuCore/TraceLog", "EE.r5900", false);
dialog()->registerWidgetHelp(m_logging.chkEER5900, tr("EE R5900"), tr("Unchecked"), tr("Log R5900 core instructions (excluding COPs). Requires modifying the PCSX2 source and enabling the interpreter."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP0, "EmuCore/TraceLog", "EE.cop0", false);
dialog()->registerWidgetHelp(m_logging.chkEECOP0, tr("EE COP0"), tr("Unchecked"), tr("Log COP0 (MMU, CPU status, etc) instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP1, "EmuCore/TraceLog", "EE.cop1", false);
dialog()->registerWidgetHelp(m_logging.chkEECOP1, tr("EE COP1"), tr("Unchecked"), tr("Log COP1 (FPU) instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECOP2, "EmuCore/TraceLog", "EE.cop2", false);
dialog()->registerWidgetHelp(m_logging.chkEECOP2, tr("EE COP2"), tr("Unchecked"), tr("Log COP2 (VU0 Macro mode) instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECache, "EmuCore/TraceLog", "EE.cache", false);
dialog()->registerWidgetHelp(m_logging.chkEECache, tr("EE Cache"), tr("Unchecked"), tr("Log EE cache activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMMIO, "EmuCore/TraceLog", "EE.knownhw", false);
dialog()->registerWidgetHelp(m_logging.chkEEMMIO, tr("EE Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEUNKNWNMMIO, "EmuCore/TraceLog", "EE.unknownhw", false);
dialog()->registerWidgetHelp(m_logging.chkEEUNKNWNMMIO, tr("EE Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEDMARegs, "EmuCore/TraceLog", "EE.dmahw", false);
dialog()->registerWidgetHelp(m_logging.chkEEDMARegs, tr("EE DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEIPU, "EmuCore/TraceLog", "EE.ipu", false);
dialog()->registerWidgetHelp(m_logging.chkEEIPU, tr("EE IPU"), tr("Unchecked"), tr("Log IPU activity; MMIO, decoding operations, DMA status, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEGIFTags, "EmuCore/TraceLog", "EE.giftag", false);
dialog()->registerWidgetHelp(m_logging.chkEEGIFTags, tr("EE GIF Tags"), tr("Unchecked"), tr("Log GIFtag parsing activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEVIFCodes, "EmuCore/TraceLog", "EE.vifcode", false);
dialog()->registerWidgetHelp(m_logging.chkEEVIFCodes, tr("EE VIF Codes"), tr("Unchecked"), tr("Log VIFcode processing; command, tag style, interrupts."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMSKPATH3, "EmuCore/TraceLog", "EE.mskpath3", false);
dialog()->registerWidgetHelp(m_logging.chkEEMSKPATH3, tr("EE MSKPATH3"), tr("Unchecked"), tr("Log Path3 Masking processing."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEMFIFO, "EmuCore/TraceLog", "EE.spr", false);
dialog()->registerWidgetHelp(m_logging.chkEEMFIFO, tr("EE MFIFO"), tr("Unchecked"), tr("Log Scratchpad MFIFO activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEDMACTRL, "EmuCore/TraceLog", "EE.dmac", false);
dialog()->registerWidgetHelp(m_logging.chkEEDMACTRL, tr("EE DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEECounters, "EmuCore/TraceLog", "EE.counters", false);
dialog()->registerWidgetHelp(m_logging.chkEECounters, tr("EE Counters"), tr("Unchecked"), tr("Log all EE counters events and some counter register activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEVIF, "EmuCore/TraceLog", "EE.vif", false);
dialog()->registerWidgetHelp(m_logging.chkEEVIF, tr("EE VIF"), tr("Unchecked"), tr("Log various VIF and VIFcode processing data."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEEGIF, "EmuCore/TraceLog", "EE.gif", false);
dialog()->registerWidgetHelp(m_logging.chkEEGIF, tr("EE GIF"), tr("Unchecked"), tr("Log various GIF and GIFtag parsing data."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEBIOS, "EmuCore/TraceLog", "EE.bios", false);
dialog->registerWidgetHelp(m_ui.chkEEBIOS, tr("EE BIOS"), tr("Unchecked"), tr("Log SYSCALL and DECI2 activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMemory, "EmuCore/TraceLog", "EE.memory", false);
dialog->registerWidgetHelp(m_ui.chkEEMemory, tr("EE Memory"), tr("Unchecked"), tr("Log memory access to unknown or unmapped EE memory."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEER5900, "EmuCore/TraceLog", "EE.r5900", false);
dialog->registerWidgetHelp(m_ui.chkEER5900, tr("EE R5900"), tr("Unchecked"), tr("Log R5900 core instructions (excluding COPs). Requires modifying the PCSX2 source and enabling the interpreter."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECOP0, "EmuCore/TraceLog", "EE.cop0", false);
dialog->registerWidgetHelp(m_ui.chkEECOP0, tr("EE COP0"), tr("Unchecked"), tr("Log COP0 (MMU, CPU status, etc) instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECOP1, "EmuCore/TraceLog", "EE.cop1", false);
dialog->registerWidgetHelp(m_ui.chkEECOP1, tr("EE COP1"), tr("Unchecked"), tr("Log COP1 (FPU) instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECOP2, "EmuCore/TraceLog", "EE.cop2", false);
dialog->registerWidgetHelp(m_ui.chkEECOP2, tr("EE COP2"), tr("Unchecked"), tr("Log COP2 (VU0 Macro mode) instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECache, "EmuCore/TraceLog", "EE.cache", false);
dialog->registerWidgetHelp(m_ui.chkEECache, tr("EE Cache"), tr("Unchecked"), tr("Log EE cache activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMMIO, "EmuCore/TraceLog", "EE.knownhw", false);
dialog->registerWidgetHelp(m_ui.chkEEMMIO, tr("EE Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEUNKNWNMMIO, "EmuCore/TraceLog", "EE.unknownhw", false);
dialog->registerWidgetHelp(m_ui.chkEEUNKNWNMMIO, tr("EE Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEDMARegs, "EmuCore/TraceLog", "EE.dmahw", false);
dialog->registerWidgetHelp(m_ui.chkEEDMARegs, tr("EE DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEIPU, "EmuCore/TraceLog", "EE.ipu", false);
dialog->registerWidgetHelp(m_ui.chkEEIPU, tr("EE IPU"), tr("Unchecked"), tr("Log IPU activity; MMIO, decoding operations, DMA status, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEGIFTags, "EmuCore/TraceLog", "EE.giftag", false);
dialog->registerWidgetHelp(m_ui.chkEEGIFTags, tr("EE GIF Tags"), tr("Unchecked"), tr("Log GIFtag parsing activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEVIFCodes, "EmuCore/TraceLog", "EE.vifcode", false);
dialog->registerWidgetHelp(m_ui.chkEEVIFCodes, tr("EE VIF Codes"), tr("Unchecked"), tr("Log VIFcode processing; command, tag style, interrupts."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMSKPATH3, "EmuCore/TraceLog", "EE.mskpath3", false);
dialog->registerWidgetHelp(m_ui.chkEEMSKPATH3, tr("EE MSKPATH3"), tr("Unchecked"), tr("Log Path3 Masking processing."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEMFIFO, "EmuCore/TraceLog", "EE.spr", false);
dialog->registerWidgetHelp(m_ui.chkEEMFIFO, tr("EE MFIFO"), tr("Unchecked"), tr("Log Scratchpad MFIFO activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEDMACTRL, "EmuCore/TraceLog", "EE.dmac", false);
dialog->registerWidgetHelp(m_ui.chkEEDMACTRL, tr("EE DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEECounters, "EmuCore/TraceLog", "EE.counters", false);
dialog->registerWidgetHelp(m_ui.chkEECounters, tr("EE Counters"), tr("Unchecked"), tr("Log all EE counters events and some counter register activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEVIF, "EmuCore/TraceLog", "EE.vif", false);
dialog->registerWidgetHelp(m_ui.chkEEVIF, tr("EE VIF"), tr("Unchecked"), tr("Log various VIF and VIFcode processing data."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEEGIF, "EmuCore/TraceLog", "EE.gif", false);
dialog->registerWidgetHelp(m_ui.chkEEGIF, tr("EE GIF"), tr("Unchecked"), tr("Log various GIF and GIFtag parsing data."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPBIOS, "EmuCore/TraceLog", "IOP.Bios", false);
dialog()->registerWidgetHelp(m_logging.chkIOPBIOS, tr("IOP BIOS"), tr("Unchecked"), tr("Log SYSCALL and IRX activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMemcards, "EmuCore/TraceLog", "IOP.memcards", false);
dialog()->registerWidgetHelp(m_logging.chkIOPMemcards, tr("IOP Memcards"), tr("Unchecked"), tr("Log memory card activity. Reads, Writes, erases, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPR3000A, "EmuCore/TraceLog", "IOP.r3000a", false);
dialog()->registerWidgetHelp(m_logging.chkIOPR3000A, tr("IOP R3000A"), tr("Unchecked"), tr("Log R3000A core instructions (excluding COPs)."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCOP2, "EmuCore/TraceLog", "IOP.cop2", false);
dialog()->registerWidgetHelp(m_logging.chkIOPCOP2, tr("IOP COP2"), tr("Unchecked"), tr("Log IOP GPU co-processor instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMMIO, "EmuCore/TraceLog", "IOP.knownhw", false);
dialog()->registerWidgetHelp(m_logging.chkIOPMMIO, tr("IOP Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPUNKNWNMMIO, "EmuCore/TraceLog", "IOP.unknownhw", false);
dialog()->registerWidgetHelp(m_logging.chkIOPUNKNWNMMIO, tr("IOP Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPDMARegs, "EmuCore/TraceLog", "IOP.dmahw", false);
dialog()->registerWidgetHelp(m_logging.chkIOPDMARegs, tr("IOP DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPPad, "EmuCore/TraceLog", "IOP.pad", false);
dialog()->registerWidgetHelp(m_logging.chkIOPPad, tr("IOP PAD"), tr("Unchecked"), tr("Log PAD activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPDMACTRL, "EmuCore/TraceLog", "IOP.dmac", false);
dialog()->registerWidgetHelp(m_logging.chkIOPDMACTRL, tr("IOP DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCounters, "EmuCore/TraceLog", "IOP.counters", false);
dialog()->registerWidgetHelp(m_logging.chkIOPCounters, tr("IOP Counters"), tr("Unchecked"), tr("Log all IOP counters events and some counter register activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPCDVD, "EmuCore/TraceLog", "IOP.cdvd", false);
dialog()->registerWidgetHelp(m_logging.chkIOPCDVD, tr("IOP CDVD"), tr("Unchecked"), tr("Log CDVD hardware activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkIOPMDEC, "EmuCore/TraceLog", "IOP.mdec", false);
dialog()->registerWidgetHelp(m_logging.chkIOPMDEC, tr("IOP MDEC"), tr("Unchecked"), tr("Log Motion (FMV) Decoder hardware unit activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPBIOS, "EmuCore/TraceLog", "IOP.Bios", false);
dialog->registerWidgetHelp(m_ui.chkIOPBIOS, tr("IOP BIOS"), tr("Unchecked"), tr("Log SYSCALL and IRX activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPMemcards, "EmuCore/TraceLog", "IOP.memcards", false);
dialog->registerWidgetHelp(m_ui.chkIOPMemcards, tr("IOP Memcards"), tr("Unchecked"), tr("Log memory card activity. Reads, Writes, erases, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPR3000A, "EmuCore/TraceLog", "IOP.r3000a", false);
dialog->registerWidgetHelp(m_ui.chkIOPR3000A, tr("IOP R3000A"), tr("Unchecked"), tr("Log R3000A core instructions (excluding COPs)."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPCOP2, "EmuCore/TraceLog", "IOP.cop2", false);
dialog->registerWidgetHelp(m_ui.chkIOPCOP2, tr("IOP COP2"), tr("Unchecked"), tr("Log IOP GPU co-processor instructions."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPMMIO, "EmuCore/TraceLog", "IOP.knownhw", false);
dialog->registerWidgetHelp(m_ui.chkIOPMMIO, tr("IOP Known MMIO"), tr("Unchecked"), tr("Log known MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPUNKNWNMMIO, "EmuCore/TraceLog", "IOP.unknownhw", false);
dialog->registerWidgetHelp(m_ui.chkIOPUNKNWNMMIO, tr("IOP Unknown MMIO"), tr("Unchecked"), tr("Log unknown or unimplemented MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPDMARegs, "EmuCore/TraceLog", "IOP.dmahw", false);
dialog->registerWidgetHelp(m_ui.chkIOPDMARegs, tr("IOP DMA Registers"), tr("Unchecked"), tr("Log DMA-related MMIO accesses."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPPad, "EmuCore/TraceLog", "IOP.pad", false);
dialog->registerWidgetHelp(m_ui.chkIOPPad, tr("IOP PAD"), tr("Unchecked"), tr("Log PAD activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPDMACTRL, "EmuCore/TraceLog", "IOP.dmac", false);
dialog->registerWidgetHelp(m_ui.chkIOPDMACTRL, tr("IOP DMA Controller"), tr("Unchecked"), tr("Log DMA transfer activity. Stalls, bus right arbitration, etc."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPCounters, "EmuCore/TraceLog", "IOP.counters", false);
dialog->registerWidgetHelp(m_ui.chkIOPCounters, tr("IOP Counters"), tr("Unchecked"), tr("Log all IOP counters events and some counter register activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPCDVD, "EmuCore/TraceLog", "IOP.cdvd", false);
dialog->registerWidgetHelp(m_ui.chkIOPCDVD, tr("IOP CDVD"), tr("Unchecked"), tr("Log CDVD hardware activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkIOPMDEC, "EmuCore/TraceLog", "IOP.mdec", false);
dialog->registerWidgetHelp(m_ui.chkIOPMDEC, tr("IOP MDEC"), tr("Unchecked"), tr("Log Motion (FMV) Decoder hardware unit activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_logging.chkEESIF, "EmuCore/TraceLog", "MISC.sif", false);
dialog()->registerWidgetHelp(m_logging.chkEESIF, tr("EE SIF"), tr("Unchecked"), tr("Log SIF (EE <-> IOP) activity."));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.chkEESIF, "EmuCore/TraceLog", "MISC.sif", false);
dialog->registerWidgetHelp(m_ui.chkEESIF, tr("EE SIF"), tr("Unchecked"), tr("Log SIF (EE <-> IOP) activity."));
connect(m_ui.chkEnable, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onLoggingEnableChanged);
connect(m_logging.chkEnable, &QCheckBox::checkStateChanged, this, &DebugSettingsWidget::onLoggingEnableChanged);
onLoggingEnableChanged();
#else
m_ui.debugTabs->removeTab(m_ui.debugTabs->indexOf(m_ui.traceLogTabWidget));
setTabVisible(m_logging_tab, false);
#endif
}
@@ -165,64 +206,64 @@ DebugSettingsWidget::~DebugSettingsWidget() = default;
void DebugSettingsWidget::onDrawDumpingChanged()
{
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore/GS", "DumpGSData", false);
m_ui.saveRT->setEnabled(enabled);
m_ui.saveFrame->setEnabled(enabled);
m_ui.saveTexture->setEnabled(enabled);
m_ui.saveDepth->setEnabled(enabled);
m_ui.saveAlpha->setEnabled(enabled);
m_ui.saveInfo->setEnabled(enabled);
m_ui.saveDrawStart->setEnabled(enabled);
m_ui.saveDrawCount->setEnabled(enabled);
m_ui.saveFrameStart->setEnabled(enabled);
m_ui.saveFrameCount->setEnabled(enabled);
m_ui.hwDumpDirectory->setEnabled(enabled);
m_ui.hwDumpBrowse->setEnabled(enabled);
m_ui.hwDumpOpen->setEnabled(enabled);
m_ui.swDumpDirectory->setEnabled(enabled);
m_ui.swDumpBrowse->setEnabled(enabled);
m_ui.swDumpOpen->setEnabled(enabled);
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore/GS", "DumpGSData", false);
m_gs.saveRT->setEnabled(enabled);
m_gs.saveFrame->setEnabled(enabled);
m_gs.saveTexture->setEnabled(enabled);
m_gs.saveDepth->setEnabled(enabled);
m_gs.saveAlpha->setEnabled(enabled);
m_gs.saveInfo->setEnabled(enabled);
m_gs.saveDrawStart->setEnabled(enabled);
m_gs.saveDrawCount->setEnabled(enabled);
m_gs.saveFrameStart->setEnabled(enabled);
m_gs.saveFrameCount->setEnabled(enabled);
m_gs.hwDumpDirectory->setEnabled(enabled);
m_gs.hwDumpBrowse->setEnabled(enabled);
m_gs.hwDumpOpen->setEnabled(enabled);
m_gs.swDumpDirectory->setEnabled(enabled);
m_gs.swDumpBrowse->setEnabled(enabled);
m_gs.swDumpOpen->setEnabled(enabled);
}
#ifdef PCSX2_DEVBUILD
void DebugSettingsWidget::onLoggingEnableChanged()
{
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore/TraceLog", "Enabled", false);
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore/TraceLog", "Enabled", false);
m_ui.chkEEBIOS->setEnabled(enabled);
m_ui.chkEEMemory->setEnabled(enabled);
m_ui.chkEER5900->setEnabled(enabled);
m_ui.chkEECOP0->setEnabled(enabled);
m_ui.chkEECOP1->setEnabled(enabled);
m_ui.chkEECOP2->setEnabled(enabled);
m_ui.chkEECache->setEnabled(enabled);
m_ui.chkEEMMIO->setEnabled(enabled);
m_ui.chkEEUNKNWNMMIO->setEnabled(enabled);
m_ui.chkEEDMARegs->setEnabled(enabled);
m_ui.chkEEIPU->setEnabled(enabled);
m_ui.chkEEGIFTags->setEnabled(enabled);
m_ui.chkEEVIFCodes->setEnabled(enabled);
m_ui.chkEEMSKPATH3->setEnabled(enabled);
m_ui.chkEEMFIFO->setEnabled(enabled);
m_ui.chkEEDMACTRL->setEnabled(enabled);
m_ui.chkEECounters->setEnabled(enabled);
m_ui.chkEEVIF->setEnabled(enabled);
m_ui.chkEEGIF->setEnabled(enabled);
m_ui.chkEESIF->setEnabled(enabled);
m_logging.chkEEBIOS->setEnabled(enabled);
m_logging.chkEEMemory->setEnabled(enabled);
m_logging.chkEER5900->setEnabled(enabled);
m_logging.chkEECOP0->setEnabled(enabled);
m_logging.chkEECOP1->setEnabled(enabled);
m_logging.chkEECOP2->setEnabled(enabled);
m_logging.chkEECache->setEnabled(enabled);
m_logging.chkEEMMIO->setEnabled(enabled);
m_logging.chkEEUNKNWNMMIO->setEnabled(enabled);
m_logging.chkEEDMARegs->setEnabled(enabled);
m_logging.chkEEIPU->setEnabled(enabled);
m_logging.chkEEGIFTags->setEnabled(enabled);
m_logging.chkEEVIFCodes->setEnabled(enabled);
m_logging.chkEEMSKPATH3->setEnabled(enabled);
m_logging.chkEEMFIFO->setEnabled(enabled);
m_logging.chkEEDMACTRL->setEnabled(enabled);
m_logging.chkEECounters->setEnabled(enabled);
m_logging.chkEEVIF->setEnabled(enabled);
m_logging.chkEEGIF->setEnabled(enabled);
m_logging.chkEESIF->setEnabled(enabled);
m_ui.chkIOPBIOS->setEnabled(enabled);
m_ui.chkIOPMemcards->setEnabled(enabled);
m_ui.chkIOPR3000A->setEnabled(enabled);
m_ui.chkIOPCOP2->setEnabled(enabled);
m_ui.chkIOPMMIO->setEnabled(enabled);
m_ui.chkIOPUNKNWNMMIO->setEnabled(enabled);
m_ui.chkIOPDMARegs->setEnabled(enabled);
m_ui.chkIOPMemcards->setEnabled(enabled);
m_ui.chkIOPPad->setEnabled(enabled);
m_ui.chkIOPDMACTRL->setEnabled(enabled);
m_ui.chkIOPCounters->setEnabled(enabled);
m_ui.chkIOPCDVD->setEnabled(enabled);
m_ui.chkIOPMDEC->setEnabled(enabled);
m_logging.chkIOPBIOS->setEnabled(enabled);
m_logging.chkIOPMemcards->setEnabled(enabled);
m_logging.chkIOPR3000A->setEnabled(enabled);
m_logging.chkIOPCOP2->setEnabled(enabled);
m_logging.chkIOPMMIO->setEnabled(enabled);
m_logging.chkIOPUNKNWNMMIO->setEnabled(enabled);
m_logging.chkIOPDMARegs->setEnabled(enabled);
m_logging.chkIOPMemcards->setEnabled(enabled);
m_logging.chkIOPPad->setEnabled(enabled);
m_logging.chkIOPDMACTRL->setEnabled(enabled);
m_logging.chkIOPCounters->setEnabled(enabled);
m_logging.chkIOPCDVD->setEnabled(enabled);
m_logging.chkIOPMDEC->setEnabled(enabled);
g_emu_thread->applySettings();
}

View File

@@ -3,20 +3,22 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_DebugAnalysisSettingsTab.h"
#include "ui_DebugGSSettingsTab.h"
#include "ui_DebugLoggingSettingsTab.h"
#include "ui_DebugUserInterfaceSettingsTab.h"
#include "ui_DebugSettingsWidget.h"
#include "SettingsWidget.h"
class SettingsWindow;
class DebugUserInterfaceSettingsWidget;
class DebugAnalysisSettingsWidget;
class DebugSettingsWidget : public QWidget
class DebugSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
DebugSettingsWidget(SettingsWindow* dialog, QWidget* parent);
DebugSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~DebugSettingsWidget();
private Q_SLOTS:
@@ -26,10 +28,14 @@ private Q_SLOTS:
#endif
private:
SettingsWindow* m_dialog;
DebugUserInterfaceSettingsWidget* m_user_interface_settings;
DebugAnalysisSettingsWidget* m_analysis_settings;
Ui::DebugSettingsWidget m_ui;
Ui::DebugUserInterfaceSettingsTab m_user_interface;
Ui::DebugAnalysisSettingsTab m_analysis;
Ui::DebugGSSettingsTab m_gs;
Ui::DebugLoggingSettingsTab m_logging;
QWidget* m_user_interface_tab = nullptr;
QWidget* m_logging_tab = nullptr;
};

View File

@@ -1,642 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DebugSettingsWidget</class>
<widget class="QWidget" name="DebugSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>647</width>
<height>501</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTabWidget" name="debugTabs">
<property name="currentIndex">
<number>0</number>
</property>
<property name="documentMode">
<bool>true</bool>
</property>
<widget class="QWidget" name="userInterfaceTabWidget">
<attribute name="title">
<string>User Interface</string>
</attribute>
</widget>
<widget class="QWidget" name="analysisTabWidget">
<attribute name="title">
<string>Analysis</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="analysisScrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="analysisScrollAreaContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>645</width>
<height>469</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="analysisLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>These settings control what and when analysis passes should be performed on the program running in the virtual machine so that the resultant information can be shown in the debugger.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="analysisGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Analysis</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QFormLayout" name="analysisForm">
<item row="0" column="0">
<widget class="QLabel" name="analysisConditionLabel">
<property name="text">
<string>Automatically Analyze Program:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="analysisCondition">
<item>
<property name="text">
<string>Always</string>
</property>
</item>
<item>
<property name="text">
<string>If Debugger Is Open</string>
</property>
</item>
<item>
<property name="text">
<string>Never</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="generateSymbolsForIRXExportTables">
<property name="text">
<string>Generate Symbols For IRX Exports</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="analysisSettings" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="gsTabWidget">
<attribute name="title">
<string>GS</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QGroupBox" name="drawDumpingGroupBox">
<property name="title">
<string>Draw Dumping</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="dumpGSData">
<property name="text">
<string>Dump GS Draws</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="saveRT">
<property name="text">
<string>Save RT</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="saveFrame">
<property name="text">
<string>Save Frame</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="saveTexture">
<property name="text">
<string>Save Texture</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="saveDepth">
<property name="text">
<string>Save Depth</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="saveAlpha">
<property name="text">
<string>Save Alpha</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="saveInfo">
<property name="text">
<string>Save Info</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_1">
<property name="text">
<string>Save Draw Start:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="saveDrawStart">
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Save Draw Count:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="saveDrawCount">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Save Frame Start:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="saveFrameStart">
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Save Frame Count:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="saveFrameCount">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>99999999</number>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Hardware Dump Directory:</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Software Dump Directory:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0,0">
<item>
<widget class="QLineEdit" name="hwDumpDirectory"/>
</item>
<item>
<widget class="QPushButton" name="hwDumpBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="hwDumpOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0">
<item>
<widget class="QLineEdit" name="swDumpDirectory"/>
</item>
<item>
<widget class="QPushButton" name="swDumpBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="swDumpOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="traceLogTabWidget">
<attribute name="title">
<string>Trace Logging</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QCheckBox" name="chkEnable">
<property name="text">
<string>Enable</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="traceLogHorizontalLayout">
<item>
<widget class="QGroupBox" name="grpEELogging">
<property name="title">
<string>EE</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QGridLayout" name="grpEELoggingGrid">
<item row="4" column="1">
<widget class="QCheckBox" name="chkEEDMACTRL">
<property name="text">
<string>DMA Control</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QCheckBox" name="chkEEMFIFO">
<property name="text">
<string>SPR / MFIFO</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="chkEEVIF">
<property name="text">
<string>VIF</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chkEECOP1">
<property name="text">
<string>COP1 (FPU)</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="chkEEMSKPATH3">
<property name="text">
<string>MSKPATH3</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="chkEECache">
<property name="text">
<string>Cache</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QCheckBox" name="chkEEGIF">
<property name="text">
<string>GIF</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="chkEER5900">
<property name="text">
<string>R5900</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="chkEECOP0">
<property name="text">
<string>COP0</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="chkEEMMIO">
<property name="text">
<string>HW Regs (MMIO)</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QCheckBox" name="chkEECounters">
<property name="text">
<string>Counters</string>
</property>
</widget>
</item>
<item row="10" column="1">
<widget class="QCheckBox" name="chkEESIF">
<property name="text">
<string>SIF</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="chkEECOP2">
<property name="text">
<string>COP2 (VU0 Macro)</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="chkEEVIFCodes">
<property name="text">
<string>VIFCodes</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkEEMemory">
<property name="text">
<string>Memory</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkEEUNKNWNMMIO">
<property name="text">
<string>Unknown MMIO</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="chkEEIPU">
<property name="text">
<string>IPU</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="chkEEBIOS">
<property name="text">
<string>BIOS</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="chkEEDMARegs">
<property name="text">
<string>DMA Registers</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QCheckBox" name="chkEEGIFTags">
<property name="text">
<string>GIFTags</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="eeLoggingSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="grpIOPLogging">
<property name="title">
<string>IOP</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QGridLayout" name="grpIOPLoggingGrid">
<item row="4" column="0">
<widget class="QCheckBox" name="chkIOPCounters">
<property name="text">
<string>Counters</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="chkIOPUNKNWNMMIO">
<property name="text">
<string>Unknown MMIO</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="chkIOPMMIO">
<property name="text">
<string>HW Regs (MMIO)</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="chkIOPCDVD">
<property name="text">
<string>CDVD</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="chkIOPR3000A">
<property name="text">
<string>R3000A</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="chkIOPMemcards">
<property name="text">
<string>Memcards</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="chkIOPDMARegs">
<property name="text">
<string>DMA Registers</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="chkIOPPad">
<property name="text">
<string>Pad</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="chkIOPBIOS">
<property name="text">
<string>BIOS</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="chkIOPMDEC">
<property name="text">
<string>MDEC</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="chkIOPDMACTRL">
<property name="text">
<string>DMA Control</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="chkIOPCOP2">
<property name="text">
<string>COP2 (GPU)</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="iopLoggingSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -1,31 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DebugUserInterfaceSettingsWidget</class>
<widget class="QWidget" name="DebugUserInterfaceSettingsWidget">
<class>DebugUserInterfaceSettingsTab</class>
<widget class="QWidget" name="DebugUserInterfaceSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>750</height>
<width>700</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="windowGroup">
<property name="sizePolicy">
@@ -117,7 +105,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -1,59 +0,0 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#include "DebugUserInterfaceSettingsWidget.h"
#include "SettingWidgetBinder.h"
#include "Debugger/DebuggerWindow.h"
static const char* s_drop_indicators[] = {
QT_TRANSLATE_NOOP("DebugUserInterfaceSettingsWidget", "Classic"),
QT_TRANSLATE_NOOP("DebugUserInterfaceSettingsWidget", "Segmented"),
QT_TRANSLATE_NOOP("DebugUserInterfaceSettingsWidget", "Minimalistic"),
nullptr,
};
DebugUserInterfaceSettingsWidget::DebugUserInterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
m_ui.setupUi(this);
SettingWidgetBinder::BindWidgetToIntSetting(
sif, m_ui.refreshInterval, "Debugger/UserInterface", "RefreshInterval", 1000);
connect(m_ui.refreshInterval, &QSpinBox::valueChanged, this, []() {
if (g_debugger_window)
g_debugger_window->updateFromSettings();
});
dialog->registerWidgetHelp(
m_ui.refreshInterval, tr("Refresh Interval"), tr("1000ms"),
tr("The amount of time to wait between subsequent attempts to update the user interface to reflect the state "
"of the virtual machine."));
SettingWidgetBinder::BindWidgetToBoolSetting(
sif, m_ui.showOnStartup, "Debugger/UserInterface", "ShowOnStartup", false);
dialog->registerWidgetHelp(
m_ui.showOnStartup, tr("Show On Startup"), tr("Unchecked"),
tr("Open the debugger window automatically when PCSX2 starts."));
SettingWidgetBinder::BindWidgetToBoolSetting(
sif, m_ui.saveWindowGeometry, "Debugger/UserInterface", "SaveWindowGeometry", true);
dialog->registerWidgetHelp(
m_ui.saveWindowGeometry, tr("Save Window Geometry"), tr("Checked"),
tr("Save the position and size of the debugger window when it is closed so that it can be restored later."));
SettingWidgetBinder::BindWidgetToEnumSetting(
sif,
m_ui.dropIndicator,
"Debugger/UserInterface",
"DropIndicatorStyle",
s_drop_indicators,
s_drop_indicators,
s_drop_indicators[0],
"DebugUserInterfaceSettingsWidget");
dialog->registerWidgetHelp(
m_ui.dropIndicator, tr("Drop Indicator Style"), tr("Classic"),
tr("Choose how the drop indicators that appear when you drag dock windows in the debugger are styled. "
"You will have to restart the debugger for this option to take effect."));
}

View File

@@ -1,19 +0,0 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include "ui_DebugUserInterfaceSettingsWidget.h"
class SettingsWindow;
class DebugUserInterfaceSettingsWidget : public QWidget
{
Q_OBJECT
public:
DebugUserInterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent = nullptr);
private:
Ui::DebugUserInterfaceSettingsWidget m_ui;
};

View File

@@ -3,7 +3,6 @@
#include <QtWidgets/QInputDialog>
#include <QtWidgets/QMessageBox>
#include <limits>
#include "pcsx2/Host.h"
@@ -18,13 +17,12 @@ static constexpr int DEFAULT_EE_CYCLE_RATE = 0;
static constexpr int DEFAULT_EE_CYCLE_SKIP = 0;
static constexpr u32 DEFAULT_FRAME_LATENCY = 2;
EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
initializeSpeedCombo(m_ui.normalSpeed, "Framerate", "NominalScalar", 1.0f);
initializeSpeedCombo(m_ui.fastForwardSpeed, "Framerate", "TurboScalar", 2.0f);
@@ -38,7 +36,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
connect(m_ui.optimalFramePacing, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::onOptimalFramePacingChanged);
connect(m_ui.vsync, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::updateUseVSyncForTimingEnabled);
connect(m_ui.syncToHostRefreshRate, &QCheckBox::checkStateChanged, this, &EmulationSettingsWidget::updateUseVSyncForTimingEnabled);
m_ui.optimalFramePacing->setTristate(dialog->isPerGameSettings());
m_ui.optimalFramePacing->setTristate(dialog()->isPerGameSettings());
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeCycleSkipping, "EmuCore/Speedhacks", "EECycleSkip", DEFAULT_EE_CYCLE_SKIP);
@@ -47,7 +45,7 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastCDVD, "EmuCore/Speedhacks", "fastCDVD", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.precacheCDVD, "EmuCore", "CdvdPrecache", false);
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
SettingWidgetBinder::BindWidgetToDateTimeSetting(sif, m_ui.rtcDateTime, "EmuCore");
m_ui.rtcDateTime->setDateRange(QDate(2000, 1, 1), QDate(2099, 12, 31));
@@ -91,78 +89,76 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsWindow* dialog, QWidget
}
const std::optional<int> cycle_rate =
m_dialog->getIntValue("EmuCore/Speedhacks", "EECycleRate", sif ? std::nullopt : std::optional<int>(DEFAULT_EE_CYCLE_RATE));
m_ui.eeCycleRate->setCurrentIndex(cycle_rate.has_value() ? (std::clamp(cycle_rate.value(), MINIMUM_EE_CYCLE_RATE, MAXIMUM_EE_CYCLE_RATE)
+ (0 - MINIMUM_EE_CYCLE_RATE) + static_cast<int>(m_dialog->isPerGameSettings()))
: 0);
connect(m_ui.eeCycleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [this](int index) {
dialog()->getIntValue("EmuCore/Speedhacks", "EECycleRate", sif ? std::nullopt : std::optional<int>(DEFAULT_EE_CYCLE_RATE));
m_ui.eeCycleRate->setCurrentIndex(cycle_rate.has_value() ? (std::clamp(cycle_rate.value(), MINIMUM_EE_CYCLE_RATE, MAXIMUM_EE_CYCLE_RATE) + (0 - MINIMUM_EE_CYCLE_RATE) + static_cast<int>(dialog()->isPerGameSettings())) : 0);
connect(m_ui.eeCycleRate, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [&](int index) {
std::optional<int> value;
if (!m_dialog->isPerGameSettings() || index > 0)
value = MINIMUM_EE_CYCLE_RATE + index - static_cast<int>(m_dialog->isPerGameSettings());
m_dialog->setIntSettingValue("EmuCore/Speedhacks", "EECycleRate", value);
if (!dialog()->isPerGameSettings() || index > 0)
value = MINIMUM_EE_CYCLE_RATE + index - static_cast<int>(dialog()->isPerGameSettings());
dialog()->setIntSettingValue("EmuCore/Speedhacks", "EECycleRate", value);
});
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hostFilesystem, "EmuCore", "HostFs", false);
dialog->registerWidgetHelp(m_ui.normalSpeed, tr("Normal Speed"), tr("100%"),
dialog()->registerWidgetHelp(m_ui.normalSpeed, tr("Normal Speed"), tr("100%"),
tr("Sets the target emulation speed. It is not guaranteed that this speed will be reached, "
"and if not, the emulator will run as fast as it can manage."));
//: The "User Preference" string will appear after the text "Recommended Value:"
dialog->registerWidgetHelp(m_ui.fastForwardSpeed, tr("Fast-Forward Speed"), tr("User Preference"),
dialog()->registerWidgetHelp(m_ui.fastForwardSpeed, tr("Fast-Forward Speed"), tr("User Preference"),
tr("Sets the fast-forward speed. This speed will be used when the fast-forward hotkey is pressed/toggled."));
//: The "User Preference" string will appear after the text "Recommended Value:"
dialog->registerWidgetHelp(m_ui.slowMotionSpeed, tr("Slow-Motion Speed"), tr("User Preference"),
dialog()->registerWidgetHelp(m_ui.slowMotionSpeed, tr("Slow-Motion Speed"), tr("User Preference"),
tr("Sets the slow-motion speed. This speed will be used when the slow-motion hotkey is pressed/toggled."));
dialog->registerWidgetHelp(m_ui.eeCycleRate, tr("EE Cycle Rate"), tr("100% (Normal Speed)"),
dialog()->registerWidgetHelp(m_ui.eeCycleRate, tr("EE Cycle Rate"), tr("100% (Normal Speed)"),
tr("Higher values may increase internal framerate in games, but will increase CPU requirements substantially. "
"Lower values will reduce the CPU load allowing lightweight games to run full speed on weaker CPUs."));
dialog->registerWidgetHelp(m_ui.eeCycleSkipping, tr("EE Cycle Skip"), tr("Disabled"),
dialog()->registerWidgetHelp(m_ui.eeCycleSkipping, tr("EE Cycle Skip"), tr("Disabled"),
tr("Makes the emulated Emotion Engine skip cycles. "
//: SOTC = Shadow of the Colossus. A game's title, should not be translated unless an official translation exists.
"Helps a small subset of games like SOTC. Most of the time it's harmful to performance."));
dialog->registerWidgetHelp(m_ui.threadPinning, tr("Enable Thread Pinning"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.threadPinning, tr("Enable Thread Pinning"), tr("Unchecked"),
tr("Sets the priority for specific threads in a specific order ignoring the system scheduler. "
//: P-Core = Performance Core, E-Core = Efficiency Core. See if Intel has official translations for these terms.
"May help CPUs with big (P) and little (E) cores (e.g., Intel 12th or newer generation CPUs or other vendors such as AMD)."));
dialog->registerWidgetHelp(m_ui.MTVU, tr("Enable Multithreaded VU1 (MTVU1)"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.MTVU, tr("Enable Multithreaded VU1 (MTVU1)"), tr("Checked"),
tr("Generally a speedup on CPUs with 4 or more cores. "
"Safe for most games, but a few are incompatible and may hang."));
dialog->registerWidgetHelp(m_ui.fastCDVD, tr("Enable Fast CDVD"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.fastCDVD, tr("Enable Fast CDVD"), tr("Unchecked"),
tr("Fast disc access, shorter loading times. Check HDLoader compatibility lists for games that are known to have issues with this."));
dialog->registerWidgetHelp(m_ui.precacheCDVD, tr("Enable CDVD Precaching"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.precacheCDVD, tr("Enable CDVD Precaching"), tr("Unchecked"),
tr("Loads the disc image into RAM before starting the virtual machine. Can reduce stutter on systems with hard drives that "
"have long wake times, but significantly increases boot times."));
dialog->registerWidgetHelp(m_ui.cheats, tr("Enable Cheats"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.cheats, tr("Enable Cheats"), tr("Unchecked"),
tr("Automatically loads and applies cheats on game start."));
dialog->registerWidgetHelp(m_ui.hostFilesystem, tr("Enable Host Filesystem"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.hostFilesystem, tr("Enable Host Filesystem"), tr("Unchecked"),
tr("Allows games and homebrew to access files / folders directly on the host computer."));
dialog->registerWidgetHelp(m_ui.optimalFramePacing, tr("Optimal Frame Pacing"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.optimalFramePacing, tr("Optimal Frame Pacing"), tr("Unchecked"),
tr("Sets the VSync queue size to 0, making every frame be completed and presented by the GS before input is polled and the next frame begins. "
"Using this setting can reduce input lag at the cost of measurably higher CPU and GPU requirements."));
dialog->registerWidgetHelp(m_ui.maxFrameLatency, tr("Maximum Frame Latency"), tr("2 Frames"),
dialog()->registerWidgetHelp(m_ui.maxFrameLatency, tr("Maximum Frame Latency"), tr("2 Frames"),
tr("Sets the maximum number of frames that can be queued up to the GS, before the CPU thread will wait for one of them to complete before continuing. "
"Higher values can assist with smoothing out irregular frame times, but increase input lag."));
dialog->registerWidgetHelp(m_ui.syncToHostRefreshRate, tr("Sync to Host Refresh Rate"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.syncToHostRefreshRate, tr("Sync to Host Refresh Rate"), tr("Unchecked"),
tr("Speeds up emulation so that the guest refresh rate matches the host. This results in the smoothest animations possible, at the cost of "
"potentially increasing the emulation speed by less than 1%. Sync to Host Refresh Rate will not take effect if "
"the console's refresh rate is too far from the host's refresh rate. Users with variable refresh rate displays "
"should disable this option."));
dialog->registerWidgetHelp(m_ui.vsync, tr("Vertical Sync (VSync)"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.vsync, tr("Vertical Sync (VSync)"), tr("Unchecked"),
tr("Enable this option to match PCSX2's refresh rate with your current monitor or screen. VSync is automatically disabled when "
"it is not possible (e.g., running at non-100% speed)."));
dialog->registerWidgetHelp(m_ui.useVSyncForTiming, tr("Use Host VSync Timing"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.useVSyncForTiming, tr("Use Host VSync Timing"), tr("Unchecked"),
tr("When synchronizing with the host refresh rate, this option disables PCSX2's internal frame timing and uses the host instead. "
"Can result in smoother frame pacing, <strong>but at the cost of increased input latency</strong>."));
dialog->registerWidgetHelp(m_ui.skipPresentingDuplicateFrames, tr("Skip Presenting Duplicate Frames"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.skipPresentingDuplicateFrames, tr("Skip Presenting Duplicate Frames"), tr("Unchecked"),
tr("Detects when idle frames are being presented in 25/30fps games, and skips presenting those frames. The frame is still "
"rendered, it just means the GPU has more time to complete it (this is NOT frame skipping). Can smooth out frame time "
"fluctuations when the CPU/GPU are near maximum utilization, but makes frame pacing more inconsistent and can increase "
"input lag. Helps when using frame generation on 25/30fps games."));
dialog->registerWidgetHelp(m_ui.manuallySetRealTimeClock, tr("Manually Set Real-Time Clock"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.manuallySetRealTimeClock, tr("Manually Set Real-Time Clock"), tr("Unchecked"),
tr("Manually set a real-time clock to use for the virtual PlayStation 2 instead of using your OS' system clock."));
dialog->registerWidgetHelp(m_ui.rtcDateTime, tr("Real-Time Clock"), tr("Current date and time"),
dialog()->registerWidgetHelp(m_ui.rtcDateTime, tr("Real-Time Clock"), tr("Current date and time"),
tr("Real-time clock (RTC) used by the virtual PlayStation 2. Date format is the same as the one used by your OS. "
"This time is only applied upon booting the PS2; changing it while in-game will have no effect. "
"NOTE: This assumes you have your PS2 set to the default timezone of GMT+0 and default DST of Summer Time. "
@@ -177,10 +173,10 @@ EmulationSettingsWidget::~EmulationSettingsWidget() = default;
void EmulationSettingsWidget::initializeSpeedCombo(QComboBox* cb, const char* section, const char* key, float default_value)
{
float value = Host::GetBaseFloatSettingValue(section, key, default_value);
if (m_dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
cb->addItem(tr("Use Global Setting [%1%]").arg(value * 100.0f, 0, 'f', 0));
if (!m_dialog->getSettingsInterface()->GetFloatValue(section, key, &value))
if (!dialog()->getSettingsInterface()->GetFloatValue(section, key, &value))
{
// set to something without data
value = -1.0f;
@@ -236,10 +232,10 @@ void EmulationSettingsWidget::handleSpeedComboChange(QComboBox* cb, const char*
if (!ok)
{
// we need to set back to the old value
float value = m_dialog->getEffectiveFloatValue(section, key, 1.0f);
float value = dialog()->getEffectiveFloatValue(section, key, 1.0f);
QSignalBlocker sb(cb);
if (m_dialog->isPerGameSettings() && !m_dialog->getSettingsInterface()->GetFloatValue(section, key, &value))
if (dialog()->isPerGameSettings() && !dialog()->getSettingsInterface()->GetFloatValue(section, key, &value))
cb->setCurrentIndex(0);
else if (const int index = cb->findData(QVariant(value)); index >= 0)
cb->setCurrentIndex(index);
@@ -253,12 +249,12 @@ void EmulationSettingsWidget::handleSpeedComboChange(QComboBox* cb, const char*
.arg((50 * custom_value) / 100));
new_value = static_cast<float>(custom_value / 100.0);
}
else if (current_index > 0 || !m_dialog->isPerGameSettings())
else if (current_index > 0 || !dialog()->isPerGameSettings())
{
new_value = cb->currentData().toFloat();
}
m_dialog->setFloatSettingValue(section, key, new_value);
dialog()->setFloatSettingValue(section, key, new_value);
}
void EmulationSettingsWidget::onOptimalFramePacingChanged()
@@ -274,15 +270,15 @@ void EmulationSettingsWidget::onOptimalFramePacingChanged()
}
else
{
value = m_dialog->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
value = dialog()->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
optimal = (value == 0);
}
m_ui.maxFrameLatency->setMinimum(optimal ? 0 : 1);
m_ui.maxFrameLatency->setValue(optimal ? 0 : DEFAULT_FRAME_LATENCY);
m_ui.maxFrameLatency->setEnabled(!m_dialog->isPerGameSettings() && !m_ui.optimalFramePacing->isChecked());
m_ui.maxFrameLatency->setEnabled(!dialog()->isPerGameSettings() && !m_ui.optimalFramePacing->isChecked());
m_dialog->setIntSettingValue("EmuCore/GS", "VsyncQueueSize", value);
dialog()->setIntSettingValue("EmuCore/GS", "VsyncQueueSize", value);
}
void EmulationSettingsWidget::updateOptimalFramePacing()
@@ -290,9 +286,9 @@ void EmulationSettingsWidget::updateOptimalFramePacing()
const QSignalBlocker sb(m_ui.optimalFramePacing);
const QSignalBlocker sb2(m_ui.maxFrameLatency);
int value = m_dialog->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
int value = dialog()->getEffectiveIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY);
bool optimal = (value == 0);
if (m_dialog->isPerGameSettings() && !m_dialog->getSettingsInterface()->GetIntValue("EmuCore/GS", "VsyncQueueSize", &value))
if (dialog()->isPerGameSettings() && !dialog()->getSettingsInterface()->GetIntValue("EmuCore/GS", "VsyncQueueSize", &value))
{
m_ui.optimalFramePacing->setCheckState(Qt::PartiallyChecked);
m_ui.maxFrameLatency->setEnabled(false);
@@ -309,13 +305,13 @@ void EmulationSettingsWidget::updateOptimalFramePacing()
void EmulationSettingsWidget::updateUseVSyncForTimingEnabled()
{
const bool vsync = m_dialog->getEffectiveBoolValue("EmuCore/GS", "VsyncEnable", false);
const bool sync_to_host_refresh = m_dialog->getEffectiveBoolValue("EmuCore/GS", "SyncToHostRefreshRate", false);
const bool vsync = dialog()->getEffectiveBoolValue("EmuCore/GS", "VsyncEnable", false);
const bool sync_to_host_refresh = dialog()->getEffectiveBoolValue("EmuCore/GS", "SyncToHostRefreshRate", false);
m_ui.useVSyncForTiming->setEnabled(vsync && sync_to_host_refresh);
}
void EmulationSettingsWidget::onManuallySetRealTimeClockChanged()
{
const bool enabled = m_dialog->getEffectiveBoolValue("EmuCore", "ManuallySetRealTimeClock", false);
const bool enabled = dialog()->getEffectiveBoolValue("EmuCore", "ManuallySetRealTimeClock", false);
m_ui.rtcDateTime->setEnabled(enabled);
}

View File

@@ -3,18 +3,16 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_EmulationSettingsWidget.h"
class SettingsWindow;
#include "SettingsWidget.h"
class EmulationSettingsWidget : public QWidget
class EmulationSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
EmulationSettingsWidget(SettingsWindow* dialog, QWidget* parent);
EmulationSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~EmulationSettingsWidget();
private Q_SLOTS:
@@ -27,7 +25,5 @@ private:
void updateUseVSyncForTimingEnabled();
void onManuallySetRealTimeClockChanged();
SettingsWindow* m_dialog;
Ui::EmulationSettingsWidget m_ui;
};

View File

@@ -6,23 +6,11 @@
<rect>
<x>0</x>
<y>0</y>
<width>672</width>
<height>500</height>
<width>700</width>
<height>800</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="speedGroup">
<property name="title">
@@ -262,19 +250,6 @@
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="rtcGroup">
<property name="title">
@@ -294,6 +269,19 @@
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>

View File

@@ -1,20 +1,19 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#include <QtWidgets/QMessageBox>
#include <algorithm>
#include "FolderSettingsWidget.h"
#include "pcsx2/GS/GS.h"
#include "SettingWidgetBinder.h"
#include "SettingsWindow.h"
FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
#include <QtWidgets/QMessageBox>
m_ui.setupUi(this);
FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog()->getSettingsInterface();
setupTab(m_ui);
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.cache, m_ui.cacheBrowse, m_ui.cacheOpen, m_ui.cacheReset, "Folders", "Cache", Path::Combine(EmuFolders::DataRoot, "cache"));
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.cheats, m_ui.cheatsBrowse, m_ui.cheatsOpen, m_ui.cheatsReset, "Folders", "Cheats", Path::Combine(EmuFolders::DataRoot, "cheats"));
@@ -26,7 +25,7 @@ FolderSettingsWidget::FolderSettingsWidget(SettingsWindow* dialog, QWidget* pare
});
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.saveStates, m_ui.saveStatesBrowse, m_ui.saveStatesOpen, m_ui.saveStatesReset, "Folders", "SaveStates", Path::Combine(EmuFolders::DataRoot, "sstates"));
SettingWidgetBinder::BindWidgetToFolderSetting(sif, m_ui.videoDumpingDirectory, m_ui.videoDumpingDirectoryBrowse, m_ui.videoDumpingDirectoryOpen, m_ui.videoDumpingDirectoryReset, "Folders", "Videos", Path::Combine(EmuFolders::DataRoot, "videos"));
dialog->registerWidgetHelp(m_ui.organizeScreenshotsByGame, tr("Organize Screenshots by Game"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.organizeScreenshotsByGame, tr("Organize Screenshots by Game"), tr("Unchecked"),
tr("When enabled, screenshots will be saved in a folder with the game's name, instead of all being saved in the Snapshots folder"));
}

View File

@@ -3,13 +3,11 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_FolderSettingsWidget.h"
class SettingsWindow;
#include "SettingsWidget.h"
class FolderSettingsWidget : public QWidget
class FolderSettingsWidget : public SettingsWidget
{
Q_OBJECT

View File

@@ -6,175 +6,123 @@
<rect>
<x>0</x>
<y>0</y>
<width>648</width>
<height>487</height>
<width>700</width>
<height>700</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0" rowspan="2">
<widget class="QScrollArea" name="scrollArea">
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>665</width>
<height>600</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<item row="0" column="0">
<widget class="QGroupBox" name="cacheGroup">
<property name="title">
<string>Cache Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<widget class="QLineEdit" name="cache"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="cacheBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="cacheOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="cacheReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="cacheLabel">
<property name="text">
<string>Used for storing shaders, game list, and achievement data.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QGroupBox" name="saveStatesGroup">
<property name="title">
<string>Save States Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="saveStatesLabel">
<property name="text">
<string>Used for storing save states.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="saveStatesBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="saveStatesReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="saveStates"/>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="saveStatesOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="cheatsGroup">
<property name="title">
<string>Cheats Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="0">
<widget class="QLineEdit" name="cheats"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="cheatsBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="cheatsOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="cheatsReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="cheatsLabel">
<property name="text">
<string>Used for storing .pnach files containing game cheats.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QGroupBox" name="snapshotsGroup">
<property name="title">
<string>Snapshots Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QLineEdit" name="snapshots"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="snapshotsBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="snapshotsOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="snapshotsReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="snaphotsLabel">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="cacheGroup">
<property name="title">
<string>Cache Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<widget class="QLineEdit" name="cache"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="cacheBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="cacheOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="cacheReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="cacheLabel">
<property name="text">
<string>Used for storing shaders, game list, and achievement data.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="cheatsGroup">
<property name="title">
<string>Cheats Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="0">
<widget class="QLineEdit" name="cheats"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="cheatsBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="cheatsOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="cheatsReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="cheatsLabel">
<property name="text">
<string>Used for storing .pnach files containing game cheats.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="snapshotsGroup">
<property name="title">
<string>Snapshots Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QLineEdit" name="snapshots"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="snapshotsBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="snapshotsOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="snapshotsReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="snaphotsLabel">
<property name="text">
<string>Used for screenshots and saving GS dumps.</string>
</property>
@@ -183,97 +131,146 @@
<item row="2" column="0" colspan="4">
<widget class="QCheckBox" name="organizeScreenshotsByGame">
<property name="text">
<string>Save Screenshots in Game-Specific Folders</string>
<string>Save Snapshots in Game-Specific Folders</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="coversGroup">
<property name="title">
<string>Covers Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QLineEdit" name="covers"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="coversBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="coversOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="coversReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="coversLabel">
<property name="text">
<string>Used for storing covers in the game grid/Big Picture UIs.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<widget class="QGroupBox" name="videoDumpDirectory">
<property name="title">
<string>Video Dumping Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="3" column="2">
<widget class="QPushButton" name="videoDumpingDirectoryOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="videoDumpingDirectory"/>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="videoDumpingDirectoryBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="videoDumpingDirectoryReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="videoDumpLabel">
<property name="text">
<string>Used for storing video captures.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QGroupBox" name="saveStatesGroup">
<property name="title">
<string>Save States Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="saveStatesLabel">
<property name="text">
<string>Used for storing save states.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="saveStatesBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="saveStatesReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLineEdit" name="saveStates"/>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="saveStatesOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="coversGroup">
<property name="title">
<string>Covers Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QLineEdit" name="covers"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="coversBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="coversOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="coversReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="coversLabel">
<property name="text">
<string>Used for storing covers in the game grid/Big Picture UIs.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="videoDumpDirectory">
<property name="title">
<string>Video Dumping Directory</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="3" column="2">
<widget class="QPushButton" name="videoDumpingDirectoryOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLineEdit" name="videoDumpingDirectory"/>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="videoDumpingDirectoryBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QPushButton" name="videoDumpingDirectoryReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="videoDumpLabel">
<property name="text">
<string>Used for storing video captures.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>

View File

@@ -16,10 +16,10 @@
#include <QtCore/QSortFilterProxyModel>
#include <QtGui/QStandardItemModel>
GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: m_dialog(dialog)
GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
m_ui.setupUi(this);
setupTab(m_ui);
m_model = new QStandardItemModel(this);
@@ -40,7 +40,7 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget
m_ui.cheatList->expandAll();
SettingsInterface* sif = m_dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableCheats, "EmuCore", "EnableCheats", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.allCRCsCheckbox, "EmuCore", "ShowCheatsForAllCRCs", false);
updateListEnabled();
@@ -56,9 +56,9 @@ GameCheatSettingsWidget::GameCheatSettingsWidget(SettingsWindow* dialog, QWidget
m_model_proxy->setFilterFixedString(text);
m_ui.cheatList->expandAll();
});
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GameCheatSettingsWidget::reloadList);
connect(dialog(), &SettingsWindow::discSerialChanged, this, &GameCheatSettingsWidget::reloadList);
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Cheats For All CRCs"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Cheats For All CRCs"), tr("Checked"),
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
}
@@ -120,18 +120,18 @@ void GameCheatSettingsWidget::onReloadClicked()
void GameCheatSettingsWidget::updateListEnabled()
{
const bool cheats_enabled = m_dialog->getEffectiveBoolValue("EmuCore", "EnableCheats", false);
const bool cheats_enabled = dialog()->getEffectiveBoolValue("EmuCore", "EnableCheats", false);
m_ui.cheatList->setEnabled(cheats_enabled);
m_ui.enableAll->setEnabled(cheats_enabled);
m_ui.disableAll->setEnabled(cheats_enabled);
m_ui.reloadCheats->setEnabled(cheats_enabled);
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled && !m_dialog->getSerial().empty());
m_ui.allCRCsCheckbox->setEnabled(cheats_enabled && !dialog()->getSerial().empty());
m_ui.searchText->setEnabled(cheats_enabled);
}
void GameCheatSettingsWidget::disableAllCheats()
{
SettingsInterface* si = m_dialog->getSettingsInterface();
SettingsInterface* si = dialog()->getSettingsInterface();
si->ClearSection(Patch::CHEATS_CONFIG_SECTION);
si->Save();
}
@@ -144,7 +144,7 @@ void GameCheatSettingsWidget::resizeEvent(QResizeEvent* event)
void GameCheatSettingsWidget::setCheatEnabled(std::string name, bool enabled, bool save_and_reload_settings)
{
SettingsInterface* si = m_dialog->getSettingsInterface();
SettingsInterface* si = dialog()->getSettingsInterface();
auto it = std::find(m_enabled_patches.begin(), m_enabled_patches.end(), name);
if (enabled)
@@ -173,7 +173,7 @@ void GameCheatSettingsWidget::setStateForAll(bool enabled)
disconnect(m_model, &QStandardItemModel::itemChanged, this, &GameCheatSettingsWidget::onCheatListItemChanged);
setStateRecursively(nullptr, enabled);
m_dialog->getSettingsInterface()->Save();
dialog()->getSettingsInterface()->Save();
g_emu_thread->reloadGameSettings();
connect(m_model, &QStandardItemModel::itemChanged, this, &GameCheatSettingsWidget::onCheatListItemChanged);
@@ -205,13 +205,13 @@ void GameCheatSettingsWidget::reloadList()
{
u32 num_unlabelled_codes = 0;
bool showAllCRCS = m_ui.allCRCsCheckbox->isChecked();
m_patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), true, showAllCRCS, &num_unlabelled_codes);
m_patches = Patch::GetPatchInfo(dialog()->getSerial(), dialog()->getDiscCRC(), true, showAllCRCS, &num_unlabelled_codes);
m_enabled_patches =
m_dialog->getSettingsInterface()->GetStringList(Patch::CHEATS_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
dialog()->getSettingsInterface()->GetStringList(Patch::CHEATS_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
m_parent_map.clear();
m_model->removeRows(0, m_model->rowCount());
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty() && m_ui.cheatList->isEnabled());
m_ui.allCRCsCheckbox->setEnabled(!dialog()->getSerial().empty() && m_ui.cheatList->isEnabled());
for (const Patch::PatchInfo& pi : m_patches)
{

View File

@@ -8,6 +8,8 @@
#include "ui_GameCheatSettingsWidget.h"
#include "SettingsWidget.h"
#include "pcsx2/Patch.h"
#include "common/HeterogeneousContainers.h"
@@ -21,14 +23,12 @@ namespace GameList
struct Entry;
}
class SettingsWindow;
class GameCheatSettingsWidget : public QWidget
class GameCheatSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
GameCheatSettingsWidget(SettingsWindow* dialog, QWidget* parent);
GameCheatSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~GameCheatSettingsWidget();
void disableAllCheats();
@@ -51,7 +51,6 @@ private:
void setStateRecursively(QStandardItem* parent, bool enabled);
Ui::GameCheatSettingsWidget m_ui;
SettingsWindow* m_dialog;
QStandardItemModel* m_model = nullptr;
QSortFilterProxyModel* m_model_proxy = nullptr;

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>697</width>
<height>361</height>
<width>700</width>
<height>600</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -98,7 +98,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -10,12 +10,12 @@
#include "SettingWidgetBinder.h"
#include "SettingsWindow.h"
GameFixSettingsWidget::GameFixSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
GameFixSettingsWidget::GameFixSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.FpuMulHack, "EmuCore/Gamefixes", "FpuMulHack", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.GoemonTlbHack, "EmuCore/Gamefixes", "GoemonTlbHack", false);
@@ -36,24 +36,24 @@ GameFixSettingsWidget::GameFixSettingsWidget(SettingsWindow* dialog, QWidget* pa
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.XgKickHack, "EmuCore/Gamefixes", "XgKickHack", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.BlitInternalFPSHack, "EmuCore/Gamefixes", "BlitInternalFPSHack", false);
dialog->registerWidgetHelp(m_ui.FpuMulHack, tr("FPU Multiply Hack"), tr("Unchecked"), tr("For Tales of Destiny."));
dialog->registerWidgetHelp(m_ui.GoemonTlbHack, tr("Preload TLB Hack"), tr("Unchecked"), tr("To avoid TLB miss on Goemon."));
dialog->registerWidgetHelp(m_ui.SoftwareRendererFMVHack, tr("Use Software Renderer For FMVs"), tr("Unchecked"), tr("Needed for some games with complex FMV rendering."));
dialog->registerWidgetHelp(m_ui.SkipMPEGHack, tr("Skip MPEG Hack"), tr("Unchecked"), tr("Skips videos/FMVs in games to avoid game hanging/freezes."));
dialog->registerWidgetHelp(m_ui.OPHFlagHack, tr("OPH Flag Hack"), tr("Unchecked"), tr("Known to affect following games: Bleach Blade Battlers, Growlanser II and III, Wizardry."));
dialog->registerWidgetHelp(m_ui.EETimingHack, tr("EE Timing Hack"), tr("Unchecked"), tr("General-purpose timing hack. Known to affect following games: Digital Devil Saga, SSX."));
dialog->registerWidgetHelp(m_ui.InstantDMAHack, tr("Instant DMA Hack"), tr("Unchecked"), tr("Good for cache emulation problems. Known to affect following games: Fire Pro Wrestling Z."));
dialog->registerWidgetHelp(m_ui.DMABusyHack, tr("DMA Busy Hack"), tr("Unchecked"), tr("Known to affect following games: Mana Khemia 1, Metal Saga, Pilot Down Behind Enemy Lines."));
dialog->registerWidgetHelp(m_ui.GIFFIFOHack, tr("Emulate GIF FIFO"), tr("Unchecked"), tr("Correct but slower. Known to affect the following games: Fifa Street 2."));
dialog->registerWidgetHelp(m_ui.VIFFIFOHack, tr("Emulate VIF FIFO"), tr("Unchecked"), tr("Simulate VIF1 FIFO read ahead. Known to affect following games: Test Drive Unlimited, Transformers."));
dialog->registerWidgetHelp(m_ui.VIF1StallHack, tr("Delay VIF1 Stalls"), tr("Unchecked"), tr("For SOCOM 2 HUD and Spy Hunter loading hang."));
dialog->registerWidgetHelp(m_ui.VuAddSubHack, tr("VU Add Hack"), tr("Unchecked"), tr("For Tri-Ace Games: Star Ocean 3, Radiata Stories, Valkyrie Profile 2."));
dialog->registerWidgetHelp(m_ui.IbitHack, tr("VU I Bit Hack"), tr("Unchecked"), tr("Avoids constant recompilation in some games. Known to affect the following games: Scarface The World is Yours, Crash Tag Team Racing."));
dialog->registerWidgetHelp(m_ui.FullVU0SyncHack, tr("Full VU0 Synchronization"), tr("Unchecked"), tr("Forces tight VU0 sync on every COP2 instruction."));
dialog->registerWidgetHelp(m_ui.VUSyncHack, tr("VU Sync"), tr("Unchecked"), tr("Run behind. To avoid sync problems when reading or writing VU registers."));
dialog->registerWidgetHelp(m_ui.VUOverflowHack, tr("VU Overflow Hack"), tr("Unchecked"), tr("To check for possible float overflows (Superman Returns)."));
dialog->registerWidgetHelp(m_ui.XgKickHack, tr("VU XGKick Sync"), tr("Unchecked"), tr("Use accurate timing for VU XGKicks (slower)."));
dialog->registerWidgetHelp(m_ui.BlitInternalFPSHack, tr("Force Blit Internal FPS Detection"), tr("Unchecked"), tr("Use alternative method to calculate internal FPS to avoid false readings in some games."));
dialog()->registerWidgetHelp(m_ui.FpuMulHack, tr("FPU Multiply Hack"), tr("Unchecked"), tr("For Tales of Destiny."));
dialog()->registerWidgetHelp(m_ui.GoemonTlbHack, tr("Preload TLB Hack"), tr("Unchecked"), tr("To avoid TLB miss on Goemon."));
dialog()->registerWidgetHelp(m_ui.SoftwareRendererFMVHack, tr("Use Software Renderer For FMVs"), tr("Unchecked"), tr("Needed for some games with complex FMV rendering."));
dialog()->registerWidgetHelp(m_ui.SkipMPEGHack, tr("Skip MPEG Hack"), tr("Unchecked"), tr("Skips videos/FMVs in games to avoid game hanging/freezes."));
dialog()->registerWidgetHelp(m_ui.OPHFlagHack, tr("OPH Flag Hack"), tr("Unchecked"), tr("Known to affect following games: Bleach Blade Battlers, Growlanser II and III, Wizardry."));
dialog()->registerWidgetHelp(m_ui.EETimingHack, tr("EE Timing Hack"), tr("Unchecked"), tr("General-purpose timing hack. Known to affect following games: Digital Devil Saga, SSX."));
dialog()->registerWidgetHelp(m_ui.InstantDMAHack, tr("Instant DMA Hack"), tr("Unchecked"), tr("Good for cache emulation problems. Known to affect following games: Fire Pro Wrestling Z."));
dialog()->registerWidgetHelp(m_ui.DMABusyHack, tr("DMA Busy Hack"), tr("Unchecked"), tr("Known to affect following games: Mana Khemia 1, Metal Saga, Pilot Down Behind Enemy Lines."));
dialog()->registerWidgetHelp(m_ui.GIFFIFOHack, tr("Emulate GIF FIFO"), tr("Unchecked"), tr("Correct but slower. Known to affect the following games: Fifa Street 2."));
dialog()->registerWidgetHelp(m_ui.VIFFIFOHack, tr("Emulate VIF FIFO"), tr("Unchecked"), tr("Simulate VIF1 FIFO read ahead. Known to affect following games: Test Drive Unlimited, Transformers."));
dialog()->registerWidgetHelp(m_ui.VIF1StallHack, tr("Delay VIF1 Stalls"), tr("Unchecked"), tr("For SOCOM 2 HUD and Spy Hunter loading hang."));
dialog()->registerWidgetHelp(m_ui.VuAddSubHack, tr("VU Add Hack"), tr("Unchecked"), tr("For Tri-Ace Games: Star Ocean 3, Radiata Stories, Valkyrie Profile 2."));
dialog()->registerWidgetHelp(m_ui.IbitHack, tr("VU I Bit Hack"), tr("Unchecked"), tr("Avoids constant recompilation in some games. Known to affect the following games: Scarface The World is Yours, Crash Tag Team Racing."));
dialog()->registerWidgetHelp(m_ui.FullVU0SyncHack, tr("Full VU0 Synchronization"), tr("Unchecked"), tr("Forces tight VU0 sync on every COP2 instruction."));
dialog()->registerWidgetHelp(m_ui.VUSyncHack, tr("VU Sync"), tr("Unchecked"), tr("Run behind. To avoid sync problems when reading or writing VU registers."));
dialog()->registerWidgetHelp(m_ui.VUOverflowHack, tr("VU Overflow Hack"), tr("Unchecked"), tr("To check for possible float overflows (Superman Returns)."));
dialog()->registerWidgetHelp(m_ui.XgKickHack, tr("VU XGKick Sync"), tr("Unchecked"), tr("Use accurate timing for VU XGKicks (slower)."));
dialog()->registerWidgetHelp(m_ui.BlitInternalFPSHack, tr("Force Blit Internal FPS Detection"), tr("Unchecked"), tr("Use alternative method to calculate internal FPS to avoid false readings in some games."));
}
GameFixSettingsWidget::~GameFixSettingsWidget() = default;

View File

@@ -3,18 +3,16 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_GameFixSettingsWidget.h"
class SettingsWindow;
#include "SettingsWidget.h"
class GameFixSettingsWidget : public QWidget
class GameFixSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
GameFixSettingsWidget(SettingsWindow* dialog, QWidget* parent);
GameFixSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~GameFixSettingsWidget();
private:

View File

@@ -6,202 +6,159 @@
<rect>
<x>0</x>
<y>0</y>
<width>676</width>
<height>535</height>
<width>700</width>
<height>700</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Game Fixes</string>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>674</width>
<height>533</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Game Fixes</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="FpuMulHack">
<property name="text">
<string extracomment="FPU = Floating Point Unit. A part of the PS2's CPU. Do not translate.\nMultiply: mathematical term.\nTales of Destiny: a game's name. Leave as-is or use an official translation.">FPU Multiply Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SoftwareRendererFMVHack">
<property name="text">
<string extracomment="FMV: Full Motion Video. Find the common used term in your language.">Use Software Renderer For FMVs</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SkipMPEGHack">
<property name="text">
<string extracomment="MPEG: video codec, leave as-is. FMV: Full Motion Video. Find the common used term in your language.">Skip MPEG Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GoemonTlbHack">
<property name="text">
<string extracomment="TLB: Translation Lookaside Buffer. Leave as-is. Goemon: name of a character from the series with his name. Leave as-is or use an official translation.">Preload TLB Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="EETimingHack">
<property name="text">
<string extracomment="EE: Emotion Engine. Leave as-is.">EE Timing Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="InstantDMAHack">
<property name="text">
<string extracomment="DMA: Direct Memory Access. Leave as-is.">Instant DMA Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="OPHFlagHack">
<property name="text">
<string extracomment="OPH: Name of a flag (Output PatH) in the GIF_STAT register in the EE. Leave as-is.\nBleach Blade Battles: a game's name. Leave as-is or use an official translation.">OPH Flag Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GIFFIFOHack">
<property name="text">
<string extracomment="GIF = GS (Graphics Synthesizer, the GPU) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate GIF FIFO</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="DMABusyHack">
<property name="text">
<string extracomment="DMA: Direct Memory Access. Leave as-is.">DMA Busy Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIF1StallHack">
<property name="text">
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is. SOCOM 2 and Spy Hunter: names of two different games. Leave as-is or use an official translation.\nHUD = Heads-Up Display. The games' interfaces.">Delay VIF1 Stalls</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIFFIFOHack">
<property name="text">
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate VIF FIFO</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="FullVU0SyncHack">
<property name="text">
<string extracomment="VU0 = VU (Vector Unit) 0. Leave as-is.">Full VU0 Synchronization</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="IbitHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nI Bit = A bit referred as I, not as 1.\nScarface The World is Yours and Crash Tag Team Racing: names of two different games. Leave as-is or use an official translation.">VU I Bit Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VuAddSubHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nTri-Ace: a game development company name. Leave as-is.">VU Add Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUOverflowHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nSuperman Returns: a game's name. Leave as-is or use an official translation.">VU Overflow Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUSyncHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nRun Behind: watch out for misleading capitalization for non-English: this refers to making the VUs run behind (delayed relative to) the EE.\nM-Bit: a bitflag in VU instructions that tells VU0 to synchronize with the EE. M-Bit Game: A game that uses instructions with the M-Bit enabled (unofficial PCSX2 name).">VU Sync</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="XgKickHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nXGKick: the name of one of the VU's instructions. Leave as-is.">VU XGKick Sync</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="BlitInternalFPSHack">
<property name="text">
<string extracomment="Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit This option tells PCSX2 to estimate internal FPS by detecting blits (image copies) onto visible display memory.">Force Blit Internal FPS Detection</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="FpuMulHack">
<property name="text">
<string extracomment="FPU = Floating Point Unit. A part of the PS2's CPU. Do not translate.\nMultiply: mathematical term.\nTales of Destiny: a game's name. Leave as-is or use an official translation.">FPU Multiply Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SoftwareRendererFMVHack">
<property name="text">
<string extracomment="FMV: Full Motion Video. Find the common used term in your language.">Use Software Renderer For FMVs</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SkipMPEGHack">
<property name="text">
<string extracomment="MPEG: video codec, leave as-is. FMV: Full Motion Video. Find the common used term in your language.">Skip MPEG Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GoemonTlbHack">
<property name="text">
<string extracomment="TLB: Translation Lookaside Buffer. Leave as-is. Goemon: name of a character from the series with his name. Leave as-is or use an official translation.">Preload TLB Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="EETimingHack">
<property name="text">
<string extracomment="EE: Emotion Engine. Leave as-is.">EE Timing Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="InstantDMAHack">
<property name="text">
<string extracomment="DMA: Direct Memory Access. Leave as-is.">Instant DMA Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="OPHFlagHack">
<property name="text">
<string extracomment="OPH: Name of a flag (Output PatH) in the GIF_STAT register in the EE. Leave as-is.\nBleach Blade Battles: a game's name. Leave as-is or use an official translation.">OPH Flag Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GIFFIFOHack">
<property name="text">
<string extracomment="GIF = GS (Graphics Synthesizer, the GPU) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate GIF FIFO</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="DMABusyHack">
<property name="text">
<string extracomment="DMA: Direct Memory Access. Leave as-is.">DMA Busy Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIF1StallHack">
<property name="text">
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is. SOCOM 2 and Spy Hunter: names of two different games. Leave as-is or use an official translation.\nHUD = Heads-Up Display. The games' interfaces.">Delay VIF1 Stalls</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIFFIFOHack">
<property name="text">
<string extracomment="VIF = VU (Vector Unit) Interface. Leave as-is.\nFIFO = First-In-First-Out, a type of buffer. Leave as-is.">Emulate VIF FIFO</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="FullVU0SyncHack">
<property name="text">
<string extracomment="VU0 = VU (Vector Unit) 0. Leave as-is.">Full VU0 Synchronization</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="IbitHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nI Bit = A bit referred as I, not as 1.\nScarface The World is Yours and Crash Tag Team Racing: names of two different games. Leave as-is or use an official translation.">VU I Bit Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VuAddSubHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nTri-Ace: a game development company name. Leave as-is.">VU Add Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUOverflowHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nSuperman Returns: a game's name. Leave as-is or use an official translation.">VU Overflow Hack</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUSyncHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nRun Behind: watch out for misleading capitalization for non-English: this refers to making the VUs run behind (delayed relative to) the EE.\nM-Bit: a bitflag in VU instructions that tells VU0 to synchronize with the EE. M-Bit Game: A game that uses instructions with the M-Bit enabled (unofficial PCSX2 name).">VU Sync</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="XgKickHack">
<property name="text">
<string extracomment="VU = Vector Unit. Leave as-is.\nXGKick: the name of one of the VU's instructions. Leave as-is.">VU XGKick Sync</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="BlitInternalFPSHack">
<property name="text">
<string extracomment="Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit This option tells PCSX2 to estimate internal FPS by detecting blits (image copies) onto visible display memory.">Force Blit Internal FPS Detection</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>

View File

@@ -10,7 +10,6 @@
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QMenu>
#include <QtWidgets/QMessageBox>
#include <algorithm>
#include "GameListSettingsWidget.h"
#include "MainWindow.h"
@@ -18,17 +17,17 @@
#include "QtUtils.h"
#include "SettingWidgetBinder.h"
GameListSettingsWidget::GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
GameListSettingsWidget::GameListSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.preferEnglishGameList, "UI", "PreferEnglishGameList", false);
connect(m_ui.preferEnglishGameList, &QCheckBox::checkStateChanged, this, [this]{ emit preferEnglishGameListChanged(); });
connect(m_ui.preferEnglishGameList, &QCheckBox::checkStateChanged, this, [this] { emit preferEnglishGameListChanged(); });
dialog->registerWidgetHelp(m_ui.preferEnglishGameList, tr("Prefer English Titles"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.preferEnglishGameList, tr("Prefer English Titles"), tr("Unchecked"),
tr("For games with both a title in the game's native language and one in English, prefer the English title."));
m_ui.searchDirectoryList->setSelectionMode(QAbstractItemView::SingleSelection);

View File

@@ -2,19 +2,19 @@
// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include <string>
#include <QtWidgets/QWidget>
#include "ui_GameListSettingsWidget.h"
class SettingsWindow;
#include "SettingsWidget.h"
class GameListSettingsWidget : public QWidget
#include <string>
class GameListSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
GameListSettingsWidget(SettingsWindow* dialog, QWidget* parent);
GameListSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~GameListSettingsWidget();
bool addExcludedPath(const std::string& path);

View File

@@ -6,11 +6,11 @@
<rect>
<x>0</x>
<y>0</y>
<width>532</width>
<height>376</height>
<width>700</width>
<height>800</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,2,0,1,0">
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0">
<property name="leftMargin">
<number>0</number>
</property>
@@ -63,8 +63,7 @@
<string>Add...</string>
</property>
<property name="icon">
<iconset theme="folder-add-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="folder-add-line"/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -83,8 +82,7 @@
<string>Remove</string>
</property>
<property name="icon">
<iconset theme="folder-reduce-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="folder-reduce-line"/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -141,8 +139,7 @@
<string>Directory...</string>
</property>
<property name="icon">
<iconset theme="folder-add-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="folder-add-line"/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -161,8 +158,7 @@
<string>File...</string>
</property>
<property name="icon">
<iconset theme="file-add-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="file-add-line"/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -181,8 +177,7 @@
<string>Remove</string>
</property>
<property name="icon">
<iconset theme="file-reduce-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="file-reduce-line"/>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -221,8 +216,7 @@
<string>Scan For New Games</string>
</property>
<property name="icon">
<iconset theme="file-search-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="file-search-line"/>
</property>
</widget>
</item>
@@ -238,8 +232,7 @@
<string>Rescan All Games</string>
</property>
<property name="icon">
<iconset theme="refresh-line">
<normaloff>.</normaloff>.</iconset>
<iconset theme="refresh-line"/>
</property>
</widget>
</item>

View File

@@ -65,10 +65,11 @@ void GamePatchDetailsWidget::onEnabledStateChanged(int state)
g_emu_thread->reloadGameSettings();
}
GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: m_dialog(dialog)
GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
m_ui.setupUi(this);
setupTab(m_ui);
m_ui.scrollArea->setFrameShape(QFrame::WinPanel);
m_ui.scrollArea->setFrameShadow(QFrame::Sunken);
@@ -76,14 +77,14 @@ GamePatchSettingsWidget::GamePatchSettingsWidget(SettingsWindow* dialog, QWidget
setGlobalWsPatchNoteVisibility(false);
setGlobalNiPatchNoteVisibility(false);
SettingsInterface* sif = m_dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.allCRCsCheckbox, "EmuCore", "ShowPatchesForAllCRCs", false);
connect(m_ui.reload, &QPushButton::clicked, this, &GamePatchSettingsWidget::onReloadClicked);
connect(m_ui.allCRCsCheckbox, &QCheckBox::checkStateChanged, this, &GamePatchSettingsWidget::reloadList);
connect(m_dialog, &SettingsWindow::discSerialChanged, this, &GamePatchSettingsWidget::reloadList);
connect(dialog(), &SettingsWindow::discSerialChanged, this, &GamePatchSettingsWidget::reloadList);
dialog->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Patches For All CRCs"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.allCRCsCheckbox, tr("Show Patches For All CRCs"), tr("Checked"),
tr("Toggles scanning patch files for all CRCs of the game. With this enabled available patches for the game serial with different CRCs will also be loaded."));
reloadList();
@@ -101,31 +102,31 @@ void GamePatchSettingsWidget::onReloadClicked()
void GamePatchSettingsWidget::disableAllPatches()
{
SettingsInterface* si = m_dialog->getSettingsInterface();
SettingsInterface* si = dialog()->getSettingsInterface();
si->ClearSection(Patch::PATCHES_CONFIG_SECTION);
si->Save();
}
void GamePatchSettingsWidget::reloadList()
{
const SettingsInterface* si = m_dialog->getSettingsInterface();
const SettingsInterface* si = dialog()->getSettingsInterface();
// Patches shouldn't have any unlabelled patch groups, because they're new.
u32 number_of_unlabeled_patches = 0;
bool showAllCRCS = m_ui.allCRCsCheckbox->isChecked();
std::vector<Patch::PatchInfo> patches = Patch::GetPatchInfo(m_dialog->getSerial(), m_dialog->getDiscCRC(), false, showAllCRCS, &number_of_unlabeled_patches);
std::vector<Patch::PatchInfo> patches = Patch::GetPatchInfo(dialog()->getSerial(), dialog()->getDiscCRC(), false, showAllCRCS, &number_of_unlabeled_patches);
std::vector<std::string> enabled_list =
si->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_ENABLE_CONFIG_KEY);
std::vector<std::string> disabled_list =
si->GetStringList(Patch::PATCHES_CONFIG_SECTION, Patch::PATCH_DISABLE_CONFIG_KEY);
const bool ws_patches_enabled_globally = m_dialog->getEffectiveBoolValue("EmuCore", "EnableWideScreenPatches", false);
const bool ni_patches_enabled_globally = m_dialog->getEffectiveBoolValue("EmuCore", "EnableNoInterlacingPatches", false);
const bool ws_patches_enabled_globally = dialog()->getEffectiveBoolValue("EmuCore", "EnableWideScreenPatches", false);
const bool ni_patches_enabled_globally = dialog()->getEffectiveBoolValue("EmuCore", "EnableNoInterlacingPatches", false);
setUnlabeledPatchesWarningVisibility(number_of_unlabeled_patches > 0);
setGlobalWsPatchNoteVisibility(ws_patches_enabled_globally);
setGlobalNiPatchNoteVisibility(ni_patches_enabled_globally);
delete m_ui.scrollArea->takeWidget();
m_ui.allCRCsCheckbox->setEnabled(!m_dialog->getSerial().empty());
m_ui.allCRCsCheckbox->setEnabled(!dialog()->getSerial().empty());
QWidget* container = new QWidget(m_ui.scrollArea);
QVBoxLayout* layout = new QVBoxLayout(container);
@@ -177,7 +178,7 @@ void GamePatchSettingsWidget::reloadList()
}
GamePatchDetailsWidget* it =
new GamePatchDetailsWidget(std::move(pi.name), pi.author, pi.description, globally_toggleable_option, check_state, m_dialog, container);
new GamePatchDetailsWidget(std::move(pi.name), pi.author, pi.description, globally_toggleable_option, check_state, dialog(), container);
layout->addWidget(it);
}
}

View File

@@ -3,11 +3,11 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_GamePatchDetailsWidget.h"
#include "ui_GamePatchSettingsWidget.h"
#include "SettingsWidget.h"
#include "pcsx2/Patch.h"
namespace GameList
@@ -15,8 +15,6 @@ namespace GameList
struct Entry;
}
class SettingsWindow;
class GamePatchDetailsWidget : public QWidget
{
Q_OBJECT
@@ -35,12 +33,12 @@ private:
std::string m_name;
};
class GamePatchSettingsWidget : public QWidget
class GamePatchSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
GamePatchSettingsWidget(SettingsWindow* dialog, QWidget* parent);
GamePatchSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
void disableAllPatches();
~GamePatchSettingsWidget();
@@ -54,5 +52,4 @@ private:
void setGlobalNiPatchNoteVisibility(bool visible);
Ui::GamePatchSettingsWidget m_ui;
SettingsWindow* m_dialog;
};

View File

@@ -24,10 +24,10 @@
#include <QtWidgets/QFileDialog>
#include <QtWidgets/QMessageBox>
GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* dialog, QWidget* parent)
: m_dialog(dialog)
GameSummaryWidget::GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
m_ui.setupUi(this);
setupTab(m_ui);
const QString base_path(QtHost::GetResourcesBasePath());
for (int i = 0; i < m_ui.region->count(); i++)
@@ -91,7 +91,7 @@ void GameSummaryWidget::populateDetails(const GameList::Entry* entry)
m_ui.detailsFormLayout->getWidgetPosition(m_ui.titleEN, &row, nullptr);
m_ui.detailsFormLayout->setRowVisible(row, !entry->title_en.empty());
std::optional<std::string> profile(m_dialog->getStringValue("EmuCore", "InputProfileName", std::nullopt));
std::optional<std::string> profile(dialog()->getStringValue("EmuCore", "InputProfileName", std::nullopt));
if (profile.has_value())
m_ui.inputProfile->setCurrentIndex(m_ui.inputProfile->findText(QString::fromStdString(profile.value())));
else
@@ -120,7 +120,7 @@ void GameSummaryWidget::populateDiscPath(const GameList::Entry* entry)
{
if (entry->type == GameList::EntryType::ELF)
{
std::optional<std::string> iso_path(m_dialog->getStringValue("EmuCore", "DiscPath", std::nullopt));
std::optional<std::string> iso_path(dialog()->getStringValue("EmuCore", "DiscPath", std::nullopt));
if (iso_path.has_value() && !iso_path->empty())
m_ui.discPath->setText(QString::fromStdString(iso_path.value()));
@@ -143,17 +143,17 @@ void GameSummaryWidget::populateDiscPath(const GameList::Entry* entry)
void GameSummaryWidget::onInputProfileChanged(int index)
{
if (index == 0)
m_dialog->setStringSettingValue("EmuCore", "InputProfileName", std::nullopt);
dialog()->setStringSettingValue("EmuCore", "InputProfileName", std::nullopt);
else
m_dialog->setStringSettingValue("EmuCore", "InputProfileName", m_ui.inputProfile->itemText(index).toUtf8());
dialog()->setStringSettingValue("EmuCore", "InputProfileName", m_ui.inputProfile->itemText(index).toUtf8());
}
void GameSummaryWidget::onDiscPathChanged(const QString& value)
{
if (value.isEmpty())
m_dialog->removeSettingValue("EmuCore", "DiscPath");
dialog()->removeSettingValue("EmuCore", "DiscPath");
else
m_dialog->setStringSettingValue("EmuCore", "DiscPath", value.toStdString().c_str());
dialog()->setStringSettingValue("EmuCore", "DiscPath", value.toStdString().c_str());
// force rescan of elf to update the serial
g_main_window->rescanFile(m_entry_path);
@@ -163,7 +163,7 @@ void GameSummaryWidget::onDiscPathChanged(const QString& value)
if (entry)
{
populateDetails(entry);
m_dialog->setSerial(entry->serial);
dialog()->setSerial(entry->serial);
m_ui.checkWiki->setEnabled(!entry->serial.empty());
}
}
@@ -340,15 +340,15 @@ void GameSummaryWidget::onVerifyClicked()
if (!hentry->version.empty())
{
setVerifyResult(tr("Verified as %1 [%2] (Version %3).")
.arg(QString::fromStdString(hentry->name))
.arg(QString::fromStdString(hentry->serial))
.arg(QString::fromStdString(hentry->version)));
.arg(QString::fromStdString(hentry->name))
.arg(QString::fromStdString(hentry->serial))
.arg(QString::fromStdString(hentry->version)));
}
else
{
setVerifyResult(tr("Verified as %1 [%2].")
.arg(QString::fromStdString(hentry->name))
.arg(QString::fromStdString(hentry->serial)));
.arg(QString::fromStdString(hentry->name))
.arg(QString::fromStdString(hentry->serial)));
}
}
else
@@ -397,7 +397,7 @@ void GameSummaryWidget::repopulateCurrentDetails()
if (entry)
{
populateDetails(entry);
m_dialog->setWindowTitle(QString::fromStdString(entry->title));
dialog()->setWindowTitle(QString::fromStdString(entry->title));
}
}

View File

@@ -3,23 +3,21 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_GameSummaryWidget.h"
#include "SettingsWidget.h"
namespace GameList
{
struct Entry;
}
class SettingsWindow;
class GameSummaryWidget : public QWidget
class GameSummaryWidget : public SettingsWidget
{
Q_OBJECT
public:
GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* dialog, QWidget* parent);
GameSummaryWidget(const GameList::Entry* entry, SettingsWindow* settings_dialog, QWidget* parent);
~GameSummaryWidget();
private Q_SLOTS:
@@ -42,7 +40,6 @@ private:
void setCustomRegion(int region);
Ui::GameSummaryWidget m_ui;
SettingsWindow* m_dialog;
std::string m_entry_path;
std::string m_redump_search_keyword;
};

View File

@@ -6,13 +6,13 @@
<rect>
<x>0</x>
<y>0</y>
<width>641</width>
<height>573</height>
<width>700</width>
<height>600</height>
</rect>
</property>
<layout class="QFormLayout" name="detailsFormLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::FieldGrowthPolicy::ExpandingFieldsGrow</enum>
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="leftMargin">
<number>0</number>
@@ -433,12 +433,12 @@
<item row="11" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>
@@ -448,7 +448,7 @@
<item>
<widget class="QTableWidget" name="tracks">
<property name="editTriggers">
<set>QAbstractItemView::EditTrigger::NoEditTriggers</set>
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="cornerButtonEnabled">
<bool>false</bool>
@@ -463,7 +463,7 @@
<item>
<spacer name="verifyButtonSpacer">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -487,12 +487,12 @@
<item row="2" column="2">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -0,0 +1,325 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsAdvancedSettingsTab</class>
<widget class="QWidget" name="GraphicsAdvancedSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>605</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="advancedOptions">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Advanced Options</string>
</property>
<layout class="QFormLayout" name="advancedOptionsFormLayout">
<item row="0" column="0">
<widget class="QLabel" name="hwDownloadModeLabel">
<property name="text">
<string>Hardware Download Mode:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="gsDownloadMode">
<item>
<property name="text">
<string>Accurate (Recommended)</string>
</property>
</item>
<item>
<property name="text">
<string>Disable Readbacks (Synchronize GS Thread)</string>
</property>
</item>
<item>
<property name="text">
<string>Unsynchronized (Non-Deterministic)</string>
</property>
</item>
<item>
<property name="text">
<string>Disabled (Ignore Transfers)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="gsDumpCompressionLabel">
<property name="text">
<string>GS Dump Compression:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="gsDumpCompression">
<item>
<property name="text">
<string>Uncompressed</string>
</property>
</item>
<item>
<property name="text">
<string>LZMA (xz)</string>
</property>
</item>
<item>
<property name="text">
<string>Zstandard (zst)</string>
</property>
</item>
</widget>
</item>
<item row="10" column="0" colspan="2">
<layout class="QGridLayout" name="advancedLayout">
<item row="1" column="1">
<widget class="QCheckBox" name="extendedUpscales">
<property name="text">
<string>Extended Upscaling Multipliers</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="disableMailboxPresentation">
<property name="text">
<string extracomment="Mailbox Presentation: a type of graphics-rendering technique that has not been exposed to the public that often, so chances are you will need to keep the word mailbox in English. It does not have anything to do with postal mailboxes or email inboxes/outboxes.">Disable Mailbox Presentation</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="useBlitSwapChain">
<property name="text">
<string extracomment="Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit \nSwap chain: see Microsoft's Terminology Portal.">Use Blit Swap Chain</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="spinCPUDuringReadbacks">
<property name="text">
<string>Spin CPU During Readbacks</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="spinGPUDuringReadbacks">
<property name="text">
<string>Spin GPU During Readbacks</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="exclussiveFSLabel">
<property name="text">
<string>Allow Exclusive Fullscreen:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="exclusiveFullscreenControl">
<item>
<property name="text">
<string>Automatic (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Disallowed</string>
</property>
</item>
<item>
<property name="text">
<string>Allowed</string>
</property>
</item>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="texturePreloading">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Partial</string>
</property>
</item>
<item>
<property name="text">
<string>Full (Hash Cache)</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Texture Preloading:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="frameRateOptions">
<property name="title">
<string>Frame Rate Options</string>
</property>
<layout class="QGridLayout" name="frameRateOptionsFormLayout">
<item row="0" column="0">
<widget class="QLabel" name="ntscLabel">
<property name="text">
<string>NTSC Frame Rate:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ntscFrameRate">
<property name="suffix">
<string extracomment="Hz=Hertz, as in the measuring unit. Shown after the corresponding number. Those languages who'd need to remove the space or do something in between should do so."> Hz</string>
</property>
<property name="minimum">
<double>10.000000000000000</double>
</property>
<property name="maximum">
<double>300.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="palLabel">
<property name="text">
<string>PAL Frame Rate:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="palFrameRate">
<property name="suffix">
<string> Hz</string>
</property>
<property name="minimum">
<double>10.000000000000000</double>
</property>
<property name="maximum">
<double>300.000000000000000</double>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="debuggingOptions">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Debugging Options</string>
</property>
<layout class="QFormLayout" name="debuggingOptionsFormLayout">
<item row="0" column="0">
<widget class="QLabel" name="barriersLabel">
<property name="text">
<string>Override Texture Barriers:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="overrideTextureBarriers">
<item>
<property name="text">
<string>Automatic (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Force Disabled</string>
</property>
</item>
<item>
<property name="text">
<string>Force Enabled</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" colspan="2">
<layout class="QGridLayout" name="debuggingOptionsLayout">
<item row="0" column="1">
<widget class="QCheckBox" name="disableFramebufferFetch">
<property name="text">
<string>Disable Framebuffer Fetch</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="disableShaderCache">
<property name="text">
<string>Disable Shader Cache</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="disableVertexShaderExpand">
<property name="text">
<string>Disable Vertex Shader Expand</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="useDebugDevice">
<property name="text">
<string>Use Debug Device</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,364 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsDisplaySettingsTab</class>
<widget class="QWidget" name="GraphicsDisplaySettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="3" column="0">
<widget class="QLabel" name="interlacingLabel">
<property name="text">
<string>Deinterlacing:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="fullscreenModes"/>
</item>
<item row="7" column="0" colspan="2">
<layout class="QGridLayout" name="displayGridLayout">
<item row="1" column="1">
<widget class="QCheckBox" name="integerScaling">
<property name="text">
<string>Integer Scaling</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="widescreenPatches">
<property name="text">
<string>Apply Widescreen Patches</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="noInterlacingPatches">
<property name="text">
<string>Apply No-Interlacing Patches</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="PCRTCAntiBlur">
<property name="text">
<string>Anti-Blur</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="DisableInterlaceOffset">
<property name="text">
<string>Disable Interlace Offset</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="PCRTCOffsets">
<property name="text">
<string>Screen Offsets</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="PCRTCOverscan">
<property name="text">
<string>Show Overscan</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="fmvAspectRatioLabel">
<property name="text">
<string>FMV Aspect Ratio Override:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="aspectRatio">
<item>
<property name="text">
<string>Fit to Window / Fullscreen</string>
</property>
</item>
<item>
<property name="text">
<string>Auto Standard (4:3 Interlaced / 3:2 Progressive)</string>
</property>
</item>
<item>
<property name="text">
<string>Standard (4:3)</string>
</property>
</item>
<item>
<property name="text">
<string>Widescreen (16:9)</string>
</property>
</item>
<item>
<property name="text">
<string>Native/Full (10:7)</string>
</property>
</item>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="bilinearFiltering">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Smooth: Refers to the texture clarity.">Bilinear (Smooth)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Sharp: Refers to the texture clarity.">Bilinear (Sharp)</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="verticalStretchLabel">
<property name="text">
<string>Vertical Stretch:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="fsModeLabel">
<property name="text">
<string>Fullscreen Mode:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="billinearLabel">
<property name="text">
<string>Bilinear Filtering:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="fmvAspectRatio">
<item>
<property name="text">
<string>Off (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Auto Standard (4:3 Interlaced / 3:2 Progressive)</string>
</property>
</item>
<item>
<property name="text">
<string>Standard (4:3)</string>
</property>
</item>
<item>
<property name="text">
<string>Widescreen (16:9)</string>
</property>
</item>
<item>
<property name="text">
<string>Native/Full (10:7)</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="cropLabel">
<property name="text">
<string>Crop:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="aspectRatioLabel">
<property name="text">
<string>Aspect Ratio:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="interlacing">
<item>
<property name="text">
<string>Automatic (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>No Deinterlacing</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Weave: deinterlacing method that can be translated or left as-is in English. Sawtooth: refers to the jagged effect weave deinterlacing has on motion.">Weave (Top Field First, Sawtooth)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Weave: deinterlacing method that can be translated or left as-is in English. Sawtooth: refers to the jagged effect weave deinterlacing has on motion.">Weave (Bottom Field First, Sawtooth)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Bob: deinterlacing method that refers to the way it makes video look like it's bobbing up and down.">Bob (Top Field First, Full Frames)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Bob: deinterlacing method that refers to the way it makes video look like it's bobbing up and down.">Bob (Bottom Field First, Full Frames)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Blend: deinterlacing method that blends the colors of the two frames, can be translated or left as-is in English.">Blend (Top Field First, Merge 2 Fields)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Blend: deinterlacing method that blends the colors of the two frames, can be translated or left as-is in English.">Blend (Bottom Field First, Merge 2 Fields)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Adaptive: deinterlacing method that should be translated.">Adaptive (Top Field First, Similar to Bob + Weave)</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Adaptive: deinterlacing method that should be translated.">Adaptive (Bottom Field First, Similar to Bob + Weave)</string>
</property>
</item>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="stretchY">
<property name="suffix">
<string extracomment="Percentage sign that shows next to a value. You might want to add a space before if your language requires it.">%</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>300</number>
</property>
</widget>
</item>
<item row="8" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="1">
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,1,0,1">
<item row="0" column="3">
<widget class="QSpinBox" name="cropTop">
<property name="suffix">
<string>px</string>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="cropTopLabel">
<property name="text">
<string extracomment="Warning: short space constraints. Abbreviate if necessary.">Top:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="cropLeftLabel">
<property name="text">
<string extracomment="Warning: short space constraints. Abbreviate if necessary.">Left:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="cropLeft">
<property name="suffix">
<string>px</string>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="cropRightLabel">
<property name="text">
<string extracomment="Warning: short space constraints. Abbreviate if necessary.">Right:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="cropRight">
<property name="suffix">
<string>px</string>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="cropBottomLabel">
<property name="text">
<string extracomment="Warning: short space constraints. Abbreviate if necessary.">Bottom:</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="cropBottom">
<property name="suffix">
<string>px</string>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,325 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsHardwareFixesSettingsTab</class>
<widget class="QWidget" name="GraphicsHardwareFixesSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="3" column="1">
<widget class="QComboBox" name="hwAutoFlush">
<item>
<property name="text">
<string>Disabled (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Enabled (Sprites Only)</string>
</property>
</item>
<item>
<property name="text">
<string>Enabled (All Primitives)</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="texInRTLabel">
<property name="text">
<string>Texture Inside RT:</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="skipDrawLabel">
<property name="text">
<string>Skip Draw Range:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cpuCLUTRender">
<property name="currentText">
<string extracomment="0 (Disabled)">0 (Disabled)</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>0 (Disabled)</string>
</property>
</item>
<item>
<property name="text">
<string>1 (Normal)</string>
</property>
</item>
<item>
<property name="text">
<string>2 (Aggressive)</string>
</property>
</item>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="cpuCLUTRenderLayout" stretch="0,0">
<item>
<widget class="QComboBox" name="cpuSpriteRenderBW">
<item>
<property name="text">
<string>0 (Disabled)</string>
</property>
</item>
<item>
<property name="text">
<string>1 (64 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>2 (128 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>3 (192 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>4 (256 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>5 (320 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>6 (384 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>7 (448 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>8 (512 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>9 (576 Max Width)</string>
</property>
</item>
<item>
<property name="text">
<string>10 (640 Max Width)</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="cpuSpriteRenderLevel">
<item>
<property name="text">
<string>Sprites Only</string>
</property>
</item>
<item>
<property name="text">
<string>Sprites/Triangles</string>
</property>
</item>
<item>
<property name="text">
<string>Blended Sprites/Triangles</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="textureInsideRt">
<item>
<property name="text">
<string>Disabled (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Inside Target</string>
</property>
</item>
<item>
<property name="text">
<string>Merge Targets</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="swCLUTLabel">
<property name="text">
<string>Software CLUT Render:</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<layout class="QGridLayout" name="hwFixesLayout">
<item row="4" column="0">
<widget class="QCheckBox" name="estimateTextureRegion">
<property name="text">
<string>Estimate Texture Region</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="disableRenderFixes">
<property name="text">
<string>Disable Render Fixes</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="readTCOnClose">
<property name="text">
<string>Read Targets When Closing</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="disableSafeFeatures">
<property name="text">
<string>Disable Safe Features</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="disablePartialInvalidation">
<property name="text">
<string>Disable Partial Source Invalidation</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="disableDepthEmulation">
<property name="text">
<string>Disable Depth Conversion</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="frameBufferConversion">
<property name="text">
<string>Framebuffer Conversion</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="gpuPaletteConversion">
<property name="text">
<string>GPU Palette Conversion</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="preloadFrameData">
<property name="text">
<string>Preload Frame Data</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="hwAutoFlushLabel">
<property name="text">
<string>Auto Flush:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="gpuTargetCLUTLabel">
<property name="text">
<string extracomment="CLUT: Color Look Up Table, often referred to as a palette in non-PS2 things. GPU Target CLUT: GPU handling of when a game uses data from a render target as a CLUT.">GPU Target CLUT:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="gpuTargetCLUTMode">
<item>
<property name="text">
<string>Disabled (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Enabled (Exact Match)</string>
</property>
</item>
<item>
<property name="text">
<string>Enabled (Check Inside Target)</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="cpuCLUTRenderLabel">
<property name="text">
<string>CPU Sprite Render Size:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<layout class="QHBoxLayout" name="skipDrawLayout">
<item>
<widget class="QSpinBox" name="skipDrawStart">
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="skipDrawEnd">
<property name="maximum">
<number>10000</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,206 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsHardwareRenderingSettingsTab</class>
<widget class="QWidget" name="GraphicsHardwareRenderingSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="1" column="0">
<widget class="QLabel" name="textureFilteringLabel">
<property name="text">
<string>Texture Filtering:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="dithering">
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>Scaled</string>
</property>
</item>
<item>
<property name="text">
<string>Unscaled (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Force 32bit</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0" colspan="2">
<layout class="QGridLayout" name="hardwareRenderingOptionsLayout">
<item row="0" column="1">
<widget class="QCheckBox" name="enableHWFixes">
<property name="text">
<string>Manual Hardware Renderer Fixes</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="mipmapping">
<property name="text">
<string>Mipmapping</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="anisotropicFilteringLabel">
<property name="text">
<string>Anisotropic Filtering:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="anisotropicFiltering"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="internalResLabel">
<property name="text">
<string>Internal Resolution:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="upscaleMultiplier"/>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="textureFiltering">
<item>
<property name="text">
<string>Nearest</string>
</property>
</item>
<item>
<property name="text">
<string>Bilinear (Forced)</string>
</property>
</item>
<item>
<property name="text">
<string>Bilinear (PS2)</string>
</property>
</item>
<item>
<property name="text">
<string>Bilinear (Forced excluding sprite)</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="ditheringLabel">
<property name="text">
<string>Dithering:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="blending">
<item>
<property name="text">
<string>Minimum</string>
</property>
</item>
<item>
<property name="text">
<string>Basic (Recommended)</string>
</property>
</item>
<item>
<property name="text">
<string>Medium</string>
</property>
</item>
<item>
<property name="text">
<string>High</string>
</property>
</item>
<item>
<property name="text">
<string>Full (Slow)</string>
</property>
</item>
<item>
<property name="text">
<string>Maximum (Very Slow)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="trilinearFiltering">
<item>
<property name="text">
<string>Automatic (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Off (None)</string>
</property>
</item>
<item>
<property name="text">
<string>Trilinear (PS2)</string>
</property>
</item>
<item>
<property name="text">
<string>Trilinear (Forced)</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="blendingLabel">
<property name="text">
<string>Blending Accuracy:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="trilinearFilterLabel">
<property name="text">
<string>Trilinear Filtering:</string>
</property>
</widget>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsMediaCaptureSettingsTab</class>
<widget class="QWidget" name="GraphicsMediaCaptureSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Screenshot Capture Setup</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<layout class="QHBoxLayout" name="screenshotLayout" stretch="0,1,0,0,0">
<item>
<widget class="QLabel" name="screenshotSizeLabel">
<property name="text">
<string>Resolution:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="screenshotSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Window Resolution (Aspect Corrected)</string>
</property>
</item>
<item>
<property name="text">
<string>Internal Resolution (Aspect Corrected)</string>
</property>
</item>
<item>
<property name="text">
<string>Internal Resolution (No Aspect Correction)</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="screenshotFormat">
<item>
<property name="text">
<string>PNG</string>
</property>
</item>
<item>
<property name="text">
<string>JPEG</string>
</property>
</item>
<item>
<property name="text">
<string>WebP</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="screenshotQualityLabel">
<property name="text">
<string>Quality:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="screenshotQuality">
<property name="suffix">
<string>%</string>
</property>
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="captureTabGroupBox">
<property name="statusTip">
<string>capture</string>
</property>
<property name="title">
<string>Video Recording Setup</string>
</property>
<layout class="QFormLayout" name="captureTabGroupBoxLayout">
<item row="0" column="0">
<widget class="QLabel" name="captureContainerLabel">
<property name="text">
<string>Container:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="captureContainer"/>
</item>
<item row="1" column="0" colspan="2">
<layout class="QGridLayout" name="captureOptionLayout" columnstretch="1,1">
<property name="horizontalSpacing">
<number>20</number>
</property>
<property name="verticalSpacing">
<number>10</number>
</property>
<item row="1" column="1">
<widget class="QWidget" name="audioCaptureOptions" native="true">
<layout class="QFormLayout" name="formLayout_10">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="audioCaptureCodecLabel">
<property name="text">
<string>Codec:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="audioCaptureCodec"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="audioCaptureBitrateLabel">
<property name="text">
<string>Bitrate:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="audioCaptureBitrate">
<property name="suffix">
<string> kbps</string>
</property>
<property name="minimum">
<number>16</number>
</property>
<property name="maximum">
<number>2048</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="enableAudioCaptureArguments">
<property name="text">
<string>Extra Arguments</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLineEdit" name="audioCaptureArguments"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="enableAudioCapture">
<property name="text">
<string>Capture Audio</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QWidget" name="videoCaptureOptions" native="true">
<layout class="QFormLayout" name="formLayout_6">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="videoCaptureCodecLabel">
<property name="text">
<string>Codec:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="videoCaptureCodec"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="videoCaptureFomatLabel">
<property name="text">
<string>Format:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="videoCaptureFormat"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="videoCaptureBitrateLabel">
<property name="text">
<string>Bitrate:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="videoCaptureBitrate">
<property name="suffix">
<string extracomment="Unit that will appear next to a number. Alter the space or whatever is needed before the text depending on your language."> kbps</string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>200000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="videoCaptureResolutionLabel">
<property name="text">
<string>Resolution:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="videoCaptureResolutionLayout" stretch="1,0,1,0">
<item>
<widget class="QSpinBox" name="videoCaptureWidth">
<property name="minimum">
<number>320</number>
</property>
<property name="maximum">
<number>32768</number>
</property>
<property name="singleStep">
<number>16</number>
</property>
<property name="value">
<number>640</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="xLabel">
<property name="text">
<string>x</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="videoCaptureHeight">
<property name="minimum">
<number>240</number>
</property>
<property name="maximum">
<number>32768</number>
</property>
<property name="singleStep">
<number>16</number>
</property>
<property name="value">
<number>240</number>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="videoCaptureResolutionAuto">
<property name="text">
<string>Auto</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="enableVideoCaptureArguments">
<property name="text">
<string>Extra Arguments</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QLineEdit" name="videoCaptureArguments"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="enableVideoCapture">
<property name="text">
<string>Capture Video</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,360 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsOnScreenDisplaySettingsTab</class>
<widget class="QWidget" name="GraphicsOnScreenDisplaySettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>800</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="layout">
<property name="title">
<string>On-Screen Display</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QLabel" name="messagesPosLabel">
<property name="text">
<string>OSD Messages Position:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="scale">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string>%</string>
</property>
<property name="minimum">
<number>50</number>
</property>
<property name="maximum">
<number>500</number>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="messagesPos">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Top Left (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Top Center</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right</string>
</property>
</item>
<item>
<property name="text">
<string>Center Left</string>
</property>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
</item>
<item>
<property name="text">
<string>Center Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Center</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0" colspan="2">
<layout class="QGridLayout" name="optionLayout" rowstretch="0,0,0,0,0,0,0,0,0,0,0">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="spacing">
<number>7</number>
</property>
<item row="8" column="0">
<widget class="QCheckBox" name="showFrameTimes">
<property name="text">
<string>Show Frame Times</string>
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QLabel" name="warningLabel">
<property name="text">
<string>Warnings For User</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QCheckBox" name="showCPU">
<property name="text">
<string>Show CPU Usage</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="showHardwareInfo">
<property name="text">
<string>Show Hardware Info</string>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QCheckBox" name="showInputRec">
<property name="text">
<string>Show Input Recording Status</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="showResolution">
<property name="text">
<string>Show Resolution</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="Column1_SystemInformation">
<property name="text">
<string>System Information</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="showVPS">
<property name="text">
<string>Show VPS</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QCheckBox" name="showGPU">
<property name="text">
<string>Show GPU Usage</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="showSpeed">
<property name="text">
<string>Show Speed Percentages</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="Column0_PerformanceAndStats">
<property name="text">
<string>Performance &amp; Stats</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QCheckBox" name="showSettings">
<property name="text">
<string>Show Settings</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QCheckBox" name="showGSStats">
<property name="text">
<string>Show Statistics</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QCheckBox" name="showIndicators">
<property name="text">
<string>Show Indicators</string>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QCheckBox" name="showVideoCapture">
<property name="text">
<string>Show Video Capture Status</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QCheckBox" name="showInputs">
<property name="text">
<string>Show Inputs</string>
</property>
</widget>
</item>
<item row="10" column="2">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<property name="text">
<string>Warn About Unsafe Settings</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="showFPS">
<property name="text">
<string>Show FPS</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="showVersion">
<property name="text">
<string>Show PCSX2 Version</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="Column2_SettingsAndInputs">
<property name="text">
<string>Settings &amp; Inputs</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="scaleLabel">
<property name="text">
<string>OSD Scale:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="performancePos">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Top Left</string>
</property>
</item>
<item>
<property name="text">
<string>Top Center</string>
</property>
</item>
<item>
<property name="text">
<string>Top Right (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Center Left</string>
</property>
</item>
<item>
<property name="text">
<string>Center</string>
</property>
</item>
<item>
<property name="text">
<string>Center Right</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Left</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Center</string>
</property>
</item>
<item>
<property name="text">
<string>Bottom Right</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0" colspan="2">
<spacer name="checkboxSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QLabel" name="performancePosLabel">
<property name="text">
<string>OSD Performance Position:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,249 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsPostProcessingSettingsTab</class>
<widget class="QWidget" name="GraphicsPostProcessingSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>703</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="sharpeningGroup">
<property name="title">
<string>Sharpening/Anti-Aliasing</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="casModeLabel">
<property name="text">
<string extracomment="You might find an official translation for this on AMD's website (Spanish version linked): https://www.amd.com/es/technologies/radeon-software-fidelityfx">Contrast Adaptive Sharpening:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="casLayout" stretch="1,0">
<item>
<widget class="QComboBox" name="casMode">
<property name="sizePolicy">
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>None (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Sharpen Only (Internal Resolution)</string>
</property>
</item>
<item>
<property name="text">
<string>Sharpen and Resize (Display Resolution)</string>
</property>
</item>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="sharpnessLayout">
<item>
<widget class="QLabel" name="casSharpnessLabel">
<property name="text">
<string>Sharpness:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="casSharpness">
<property name="suffix">
<string extracomment="Percentage sign that will appear next to a number. Add a space or whatever is needed before depending on your language.">%</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="fxaa">
<property name="text">
<string>FXAA</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="filtersLayout">
<property name="title">
<string>Filters</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QCheckBox" name="shadeBoost">
<property name="text">
<string>Shade Boost</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0,1">
<item row="0" column="0">
<widget class="QLabel" name="brightnessLabel">
<property name="text">
<string>Brightness:</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QSpinBox" name="shadeBoostContrast">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="contrastLabel">
<property name="text">
<string>Contrast:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="shadeBoostBrightness">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="gammaLabel">
<property name="text">
<string>Gamma:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="shadeBoostGamma">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="saturationLabel">
<property name="text">
<string>Saturation:</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="shadeBoostSaturation">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="tvShaderLabel">
<property name="text">
<string>TV Shader:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="tvShader">
<item>
<property name="text">
<string>None (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Scanline Filter</string>
</property>
</item>
<item>
<property name="text">
<string>Diagonal Filter</string>
</property>
</item>
<item>
<property name="text">
<string>Triangular Filter</string>
</property>
</item>
<item>
<property name="text">
<string>Wave Filter</string>
</property>
</item>
<item>
<property name="text">
<string extracomment="Lottes = Timothy Lottes, the creator of the shader filter. Leave as-is. CRT= Cathode Ray Tube, an old type of television technology.">Lottes CRT</string>
</property>
</item>
<item>
<property name="text">
<string>4xRGSS downsampling (4x Rotated Grid SuperSampling)</string>
</property>
</item>
<item>
<property name="text">
<string>NxAGSS downsampling (Nx Automatic Grid SuperSampling)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsSettingsHeader</class>
<widget class="QWidget" name="GraphicsSettingsHeader">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="rendererLayout">
<property name="title">
<string/>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="rendererText">
<property name="text">
<string>Renderer:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="rendererDropdown"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="adapterText">
<property name="text">
<string>Adapter:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="adapterDropdown"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

File diff suppressed because it is too large Load Diff

View File

@@ -5,20 +5,28 @@
#include <QtWidgets/QWidget>
#include "ui_GraphicsSettingsWidget.h"
#include "ui_GraphicsAdvancedSettingsTab.h"
#include "ui_GraphicsDisplaySettingsTab.h"
#include "ui_GraphicsHardwareFixesSettingsTab.h"
#include "ui_GraphicsHardwareRenderingSettingsTab.h"
#include "ui_GraphicsMediaCaptureSettingsTab.h"
#include "ui_GraphicsOnScreenDisplaySettingsTab.h"
#include "ui_GraphicsPostProcessingSettingsTab.h"
#include "ui_GraphicsSettingsHeader.h"
#include "ui_GraphicsSoftwareRenderingSettingsTab.h"
#include "ui_GraphicsTextureReplacementSettingsTab.h"
#include "ui_GraphicsUpscalingFixesSettingsTab.h"
#include "common/Pcsx2Defs.h"
#include "SettingsWidget.h"
enum class GSRendererType : s8;
class SettingsWindow;
class GraphicsSettingsWidget : public QWidget
class GraphicsSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
GraphicsSettingsWidget(SettingsWindow* dialog, QWidget* parent);
GraphicsSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~GraphicsSettingsWidget();
Q_SIGNALS:
@@ -53,10 +61,23 @@ private:
void populateUpscaleMultipliers(u32 max_upscale_multiplier);
void resetManualHardwareFixes();
SettingsWindow* m_dialog;
Ui::GraphicsSettingsHeader m_header;
Ui::GraphicsDisplaySettingsTab m_display;
Ui::GraphicsHardwareRenderingSettingsTab m_hw;
Ui::GraphicsSoftwareRenderingSettingsTab m_sw;
Ui::GraphicsHardwareFixesSettingsTab m_fixes;
Ui::GraphicsUpscalingFixesSettingsTab m_upscaling;
Ui::GraphicsTextureReplacementSettingsTab m_texture;
Ui::GraphicsPostProcessingSettingsTab m_post;
Ui::GraphicsOnScreenDisplaySettingsTab m_osd;
Ui::GraphicsMediaCaptureSettingsTab m_capture;
Ui::GraphicsAdvancedSettingsTab m_advanced;
Ui::GraphicsSettingsWidget m_ui;
bool m_hardware_renderer_visible = false;
bool m_software_renderer_visible = false;
QWidget* m_display_tab = nullptr;
QWidget* m_hardware_rendering_tab = nullptr;
QWidget* m_software_rendering_tab = nullptr;
QWidget* m_hardware_fixes_tab = nullptr;
QWidget* m_upscaling_fixes_tab = nullptr;
QWidget* m_texture_replacement_tab = nullptr;
QWidget* m_advanced_tab = nullptr;
};

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsSoftwareRenderingSettingsTab</class>
<widget class="QWidget" name="GraphicsSoftwareRenderingSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="1" column="0">
<widget class="QLabel" name="extraSWThreadsLabel">
<property name="text">
<string>Software Rendering Threads:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="swTextureFilteringLabel">
<property name="text">
<string>Texture Filtering:</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<layout class="QGridLayout" name="swRenderingLayout">
<item row="0" column="1">
<widget class="QCheckBox" name="swMipmap">
<property name="text">
<string>Mipmapping</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="swAutoFlush">
<property name="text">
<string>Auto Flush</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="swTextureFiltering">
<property name="enabled">
<bool>true</bool>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<item>
<property name="text">
<string>Nearest</string>
</property>
</item>
<item>
<property name="text">
<string>Bilinear (Forced)</string>
</property>
</item>
<item>
<property name="text">
<string>Bilinear (PS2)</string>
</property>
</item>
<item>
<property name="text">
<string>Bilinear (Forced excluding sprite)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="extraSWThreads">
<property name="suffix">
<string> threads</string>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsTextureReplacementSettingsTab</class>
<widget class="QWidget" name="GraphicsTextureReplacementSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="textureOptions">
<property name="title">
<string>Options</string>
</property>
<layout class="QGridLayout" name="textureOptionLayout">
<item row="3" column="0">
<widget class="QCheckBox" name="precacheTextureReplacements">
<property name="text">
<string>Precache Textures</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="loadTextureReplacementsAsync">
<property name="text">
<string>Asynchronous Texture Loading</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="loadTextureReplacements">
<property name="text">
<string>Load Textures</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="dumpReplaceableTextures">
<property name="text">
<string>Dump Textures</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="dumpReplaceableMipmaps">
<property name="text">
<string>Dump Mipmaps</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="dumpTexturesWithFMVActive">
<property name="text">
<string>Dump FMV Textures</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="texturesDirectoryBox">
<property name="title">
<string>Search Directory</string>
</property>
<layout class="QGridLayout" name="textureDirectoryLayout">
<item row="1" column="0">
<widget class="QLineEdit" name="texturesDirectory"/>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="texturesBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="texturesOpen">
<property name="text">
<string>Open...</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QPushButton" name="texturesReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="textureDescriptionText">
<property name="text">
<string>PCSX2 will dump and load texture replacements from this directory.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,224 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsUpscalingFixesSettingsTab</class>
<widget class="QWidget" name="GraphicsUpscalingFixesSettingsTab">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>700</width>
<height>500</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="5" column="0" colspan="2">
<layout class="QGridLayout" name="upscalingFixesLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="alignSprite">
<property name="text">
<string>Align Sprite</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="nativePaletteDraw">
<property name="text">
<string>Unscaled Palette Texture Draws</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="mergeSprite">
<property name="text">
<string>Merge Sprite</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="forceEvenSpritePosition">
<property name="text">
<string>Force Even Sprite Position</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="halfPixelOffsetLabel">
<property name="text">
<string>Half Pixel Offset:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="halfPixelOffset">
<item>
<property name="text">
<string>Off (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Normal (Vertex)</string>
</property>
</item>
<item>
<property name="text">
<string>Special (Texture)</string>
</property>
</item>
<item>
<property name="text">
<string>Special (Texture - Aggressive)</string>
</property>
</item>
<item>
<property name="text">
<string>Align to Native</string>
</property>
</item>
<item>
<property name="text">
<string>Align to Native - with Texture Offset</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="nativeScalingLabel">
<property name="text">
<string>Native Scaling</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="bilinearHack">
<item>
<property name="text">
<string>Automatic (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Force Bilinear</string>
</property>
</item>
<item>
<property name="text">
<string>Force Nearest</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="nativeScaling">
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>Normal</string>
</property>
</item>
<item>
<property name="text">
<string>Aggressive</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="textureOffsetLabel">
<property name="text">
<string>Texture Offsets:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<layout class="QHBoxLayout" name="textureOffsetLayout" stretch="0,1,0,1">
<item>
<widget class="QLabel" name="textureOffsetXLabel">
<property name="text">
<string>X:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="textureOffsetX">
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="textureOffsetYLabel">
<property name="text">
<string>Y:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="textureOffsetY">
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="bilinearHackLabel">
<property name="text">
<string>Bilinear Dirty Upscale:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="roundSprite">
<item>
<property name="text">
<string>Off (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Half</string>
</property>
</item>
<item>
<property name="text">
<string>Full</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="roundSpriteLabel">
<property name="text">
<string>Round Sprite:</string>
</property>
</widget>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -71,12 +71,12 @@ const char* InterfaceSettingsWidget::THEME_VALUES[] = {
"Custom",
nullptr};
InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.inhibitScreensaver, "EmuCore", "InhibitScreensaver", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.confirmShutdown, "UI", "ConfirmShutdown", true);
@@ -110,15 +110,15 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
connect(m_ui.language, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit languageChanged(); });
// Per-game settings is special, we don't want to bind it if we're editing per-game settings.
if (!dialog->isPerGameSettings())
if (!dialog()->isPerGameSettings())
{
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pauseOnStart, "UI", "StartPaused", false);
}
if (!dialog->isPerGameSettings() && AutoUpdaterDialog::isSupported())
if (!dialog()->isPerGameSettings() && AutoUpdaterDialog::isSupported())
{
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.autoUpdateEnabled, "AutoUpdater", "CheckAtStartup", true);
dialog->registerWidgetHelp(m_ui.autoUpdateEnabled, tr("Enable Automatic Update Check"), tr("Checked"),
dialog()->registerWidgetHelp(m_ui.autoUpdateEnabled, tr("Enable Automatic Update Check"), tr("Checked"),
tr("Automatically checks for updates to the program on startup. Updates can be deferred "
"until later or skipped entirely."));
@@ -136,7 +136,7 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
m_ui.automaticUpdaterGroup->hide();
}
if (dialog->isPerGameSettings())
if (dialog()->isPerGameSettings())
{
// language/theme doesn't make sense to have in per-game settings
m_ui.verticalLayout->removeWidget(m_ui.preferencesGroup);
@@ -146,43 +146,43 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget
m_ui.pauseOnStart->setEnabled(false);
}
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.inhibitScreensaver, tr("Inhibit Screensaver"), tr("Checked"),
tr("Prevents the screen saver from activating and the host from sleeping while emulation is running."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.confirmShutdown, tr("Confirm Shutdown"), tr("Checked"),
tr("Determines whether a prompt will be displayed to confirm shutting down the virtual machine "
"when the hotkey is pressed."));
dialog->registerWidgetHelp(m_ui.pauseOnStart, tr("Pause On Start"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.pauseOnStart, tr("Pause On Start"), tr("Unchecked"),
tr("Pauses the emulator when a game is started."));
dialog->registerWidgetHelp(m_ui.pauseOnFocusLoss, tr("Pause On Focus Loss"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.pauseOnFocusLoss, tr("Pause On Focus Loss"), tr("Unchecked"),
tr("Pauses the emulator when you minimize the window or switch to another application, "
"and unpauses when you switch back."));
dialog->registerWidgetHelp(m_ui.pauseOnControllerDisconnection, tr("Pause On Controller Disconnection"),
dialog()->registerWidgetHelp(m_ui.pauseOnControllerDisconnection, tr("Pause On Controller Disconnection"),
tr("Unchecked"), tr("Pauses the emulator when a controller with bindings is disconnected."));
dialog->registerWidgetHelp(m_ui.startFullscreen, tr("Start Fullscreen"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.startFullscreen, tr("Start Fullscreen"), tr("Unchecked"),
tr("Automatically switches to fullscreen mode when a game is started."));
dialog->registerWidgetHelp(m_ui.hideMouseCursor, tr("Hide Cursor In Fullscreen"), tr("Unchecked"),
dialog()->registerWidgetHelp(m_ui.hideMouseCursor, tr("Hide Cursor In Fullscreen"), tr("Unchecked"),
tr("Hides the mouse pointer/cursor when the emulator is in fullscreen mode."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.renderToSeparateWindow, tr("Render To Separate Window"), tr("Unchecked"),
tr("Renders the game to a separate window, instead of the main window. If unchecked, the game will display over the game list."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.hideMainWindow, tr("Hide Main Window When Running"), tr("Unchecked"),
tr("Hides the main window (with the game list) when a game is running. Requires Render To Separate Window to be enabled."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.discordPresence, tr("Enable Discord Presence"), tr("Unchecked"),
tr("Shows the game you are currently playing as part of your profile in Discord."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.mouseLock, tr("Enable Mouse Lock"), tr("Unchecked"),
tr("Locks the mouse cursor to the windows when PCSX2 is in focus and all other windows are closed.<br><b>Unavailable on Linux Wayland.</b><br><b>Requires accessibility permissions on macOS.</b>"));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.doubleClickTogglesFullscreen, tr("Double-Click Toggles Fullscreen"), tr("Checked"),
tr("Allows switching in and out of fullscreen mode by double-clicking the game window."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.disableWindowResizing, tr("Disable Window Resizing"), tr("Unchecked"),
tr("Prevents the main window from being resized."));
dialog->registerWidgetHelp(
dialog()->registerWidgetHelp(
m_ui.startFullscreenUI, tr("Start Big Picture Mode"), tr("Unchecked"),
tr("Automatically starts Big Picture Mode instead of the regular Qt interface when PCSX2 launches."));

View File

@@ -3,18 +3,16 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_InterfaceSettingsWidget.h"
class SettingsWindow;
#include "SettingsWidget.h"
class InterfaceSettingsWidget : public QWidget
class InterfaceSettingsWidget : public SettingsWidget
{
Q_OBJECT
public:
InterfaceSettingsWidget(SettingsWindow* dialog, QWidget* parent);
InterfaceSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~InterfaceSettingsWidget();
Q_SIGNALS:

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>698</width>
<height>512</height>
<width>700</width>
<height>608</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -131,11 +131,11 @@
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="startFullscreenUI">
<property name="text">
<string>Start Big Picture UI</string>
</property>
</widget>
</item>
<property name="text">
<string>Start Big Picture UI</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -222,12 +222,12 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -27,13 +27,12 @@ static std::string getSlotFilenameKey(u32 slot)
return StringUtil::StdStringFromFormat("Slot%u_Filename", slot + 1);
}
MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: SettingsWidget(settings_dialog, parent)
{
SettingsInterface* sif = m_dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
m_ui.setupUi(this);
setupTab(m_ui);
// this is a bit lame, but resizeEvent() isn't good enough to autosize our columns,
// since the group box hasn't been resized at that point.
@@ -60,7 +59,7 @@ MemoryCardSettingsWidget::MemoryCardSettingsWidget(SettingsWindow* dialog, QWidg
refresh();
dialog->registerWidgetHelp(m_ui.automaticManagement, tr("Automatically manage saves based on running game"),
dialog()->registerWidgetHelp(m_ui.automaticManagement, tr("Automatically manage saves based on running game"),
tr("Checked"),
tr("(Folder type only / Card size: Auto) Loads only the relevant booted game saves, ignoring others. Avoids "
"running out of space for saves."));
@@ -98,11 +97,11 @@ void MemoryCardSettingsWidget::setupAdditionalUi()
void MemoryCardSettingsWidget::createSlotWidgets(SlotGroup* port, u32 slot)
{
const bool perGame = m_dialog->isPerGameSettings();
const bool perGame = dialog()->isPerGameSettings();
port->root = new QWidget(m_ui.slotGroupBox);
SettingsInterface* sif = m_dialog->getSettingsInterface();
SettingsInterface* sif = dialog()->getSettingsInterface();
port->enable = new QCheckBox(tr("Slot %1").arg(slot + 1), port->root);
SettingWidgetBinder::BindWidgetToBoolSetting(
sif, port->enable, CONFIG_SECTION, StringUtil::StdStringFromFormat("Slot%u_Enable", slot + 1), true);
@@ -154,14 +153,14 @@ void MemoryCardSettingsWidget::tryInsertCard(u32 slot, const QString& newCard)
return;
}
m_dialog->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(), newCardStr.c_str());
dialog()->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(), newCardStr.c_str());
refresh();
}
void MemoryCardSettingsWidget::ejectSlot(u32 slot)
{
m_dialog->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(),
m_dialog->isPerGameSettings() ? std::nullopt : std::optional<const char*>(""));
dialog()->setStringSettingValue(CONFIG_SECTION, getSlotFilenameKey(slot).c_str(),
dialog()->isPerGameSettings() ? std::nullopt : std::optional<const char*>(""));
refresh();
}
@@ -310,22 +309,22 @@ void MemoryCardSettingsWidget::listContextMenuRequested(const QPoint& pos)
void MemoryCardSettingsWidget::refresh()
{
const bool perGame = m_dialog->isPerGameSettings();
const bool perGame = dialog()->isPerGameSettings();
for (u32 slot = 0; slot < static_cast<u32>(m_slots.size()); slot++)
{
const bool enabled = m_slots[slot].enable->isChecked();
const std::string slotKey = getSlotFilenameKey(slot);
const std::optional<std::string> name(
m_dialog->getEffectiveStringValue(CONFIG_SECTION, slotKey.c_str(), FileMcd_GetDefaultName(slot).c_str()));
const bool inherited = perGame ? !m_dialog->containsSettingValue(CONFIG_SECTION, slotKey.c_str()) : false;
dialog()->getEffectiveStringValue(CONFIG_SECTION, slotKey.c_str(), FileMcd_GetDefaultName(slot).c_str()));
const bool inherited = perGame ? !dialog()->containsSettingValue(CONFIG_SECTION, slotKey.c_str()) : false;
m_slots[slot].slot->setCard(name, inherited);
m_slots[slot].slot->setEnabled(enabled);
m_slots[slot].eject->setEnabled(enabled);
}
m_ui.cardList->refresh(m_dialog);
m_ui.cardList->refresh(dialog());
updateCardActions();
}
@@ -333,8 +332,8 @@ void MemoryCardSettingsWidget::swapCards()
{
const std::string card1Key = getSlotFilenameKey(0);
const std::string card2Key = getSlotFilenameKey(1);
std::optional<std::string> card1Name = m_dialog->getStringValue(CONFIG_SECTION, card1Key.c_str(), std::nullopt);
std::optional<std::string> card2Name = m_dialog->getStringValue(CONFIG_SECTION, card2Key.c_str(), std::nullopt);
std::optional<std::string> card1Name = dialog()->getStringValue(CONFIG_SECTION, card1Key.c_str(), std::nullopt);
std::optional<std::string> card2Name = dialog()->getStringValue(CONFIG_SECTION, card2Key.c_str(), std::nullopt);
if (!card1Name.has_value() || card1Name->empty() || !card2Name.has_value() || card2Name->empty())
{
QMessageBox::critical(
@@ -342,8 +341,8 @@ void MemoryCardSettingsWidget::swapCards()
return;
}
m_dialog->setStringSettingValue(CONFIG_SECTION, card1Key.c_str(), card2Name->c_str());
m_dialog->setStringSettingValue(CONFIG_SECTION, card2Key.c_str(), card1Name->c_str());
dialog()->setStringSettingValue(CONFIG_SECTION, card1Key.c_str(), card2Name->c_str());
dialog()->setStringSettingValue(CONFIG_SECTION, card2Key.c_str(), card1Name->c_str());
refresh();
}

View File

@@ -3,17 +3,16 @@
#pragma once
#include <array>
#include <optional>
#include <string>
#include "SettingsWidget.h"
#include <QtGui/QResizeEvent>
#include <QtWidgets/QWidget>
#include <QtWidgets/QTreeWidget>
#include <QtWidgets/QToolButton>
#include <QtWidgets/QListWidget>
class SettingsWindow;
#include <array>
#include <optional>
#include <string>
struct AvailableMcdInfo;
@@ -56,7 +55,7 @@ protected:
// Must be included *after* the custom widgets.
#include "ui_MemoryCardSettingsWidget.h"
class MemoryCardSettingsWidget : public QWidget
class MemoryCardSettingsWidget : public SettingsWidget
{
Q_OBJECT
@@ -66,7 +65,7 @@ public:
MAX_SLOTS = 2
};
MemoryCardSettingsWidget(SettingsWindow* dialog, QWidget* parent);
MemoryCardSettingsWidget(SettingsWindow* settings_dialog, QWidget* parent);
~MemoryCardSettingsWidget();
protected:
@@ -103,7 +102,6 @@ private:
void renameCard();
void convertCard();
SettingsWindow* m_dialog;
Ui::MemoryCardSettingsWidget m_ui;
std::array<SlotGroup, MAX_SLOTS> m_slots;

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>639</width>
<height>443</height>
<width>700</width>
<height>600</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
@@ -134,7 +134,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
<height>0</height>
</size>
</property>
</spacer>

View File

@@ -0,0 +1,116 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#include "SettingsWidget.h"
#include <QtWidgets/QScrollArea>
#include <QtWidgets/QScrollBar>
#include <QtWidgets/QTabBar>
#include <QtWidgets/QTabWidget>
#include <QtWidgets/QVBoxLayout>
SettingsWidget::SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(settings_dialog)
{
QVBoxLayout* layout = new QVBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
m_tab_widget = new QTabWidget(this);
m_tab_widget->setDocumentMode(true);
layout->addWidget(m_tab_widget);
}
void SettingsWidget::addPageHeader(QWidget* header, bool custom_margins)
{
QVBoxLayout* box_layout = static_cast<QVBoxLayout*>(layout());
box_layout->insertWidget(layout()->count() - 1, header);
if (!custom_margins && header->layout())
header->layout()->setContentsMargins(0, 0, 0, 0);
}
QWidget* SettingsWidget::addTab(QString name, QWidget* contents, bool custom_margins)
{
QScrollArea* scroll_area = new QScrollArea(this);
scroll_area->setWidget(contents);
scroll_area->setWidgetResizable(true);
scroll_area->setFrameStyle(QFrame::NoFrame);
m_tab_widget->addTab(scroll_area, name);
// Only show the tab bar if there's more than one tab to choose from.
if (m_tab_widget->count() == 1)
m_tab_widget->tabBar()->setVisible(false);
else if ((m_tab_widget->count() == 2))
m_tab_widget->tabBar()->setVisible(true);
// Automatically setup the margins on the tab contents and headers.
if (m_tab_widget->count() == 1)
{
if (!custom_margins)
updateTabMargins(scroll_area);
}
else
{
if (m_tab_widget->count() == 2 && m_last_scroll_area)
updateTabMargins(m_last_scroll_area);
if (!custom_margins)
updateTabMargins(scroll_area);
}
if (!custom_margins)
{
m_last_scroll_area = scroll_area;
connect(scroll_area->verticalScrollBar(), &QScrollBar::rangeChanged, this, [this, scroll_area]() {
updateTabMargins(scroll_area);
});
connect(scroll_area->horizontalScrollBar(), &QScrollBar::rangeChanged, this, [this, scroll_area]() {
updateTabMargins(scroll_area);
});
}
return scroll_area;
}
void SettingsWidget::setTabVisible(QWidget* tab, bool is_visible, QWidget* switch_to)
{
int index = m_tab_widget->indexOf(tab);
if (index < 0)
return;
if (!is_visible && index == m_tab_widget->currentIndex() && switch_to)
m_tab_widget->setCurrentWidget(switch_to);
m_tab_widget->setTabEnabled(index, is_visible);
m_tab_widget->setTabVisible(index, is_visible);
}
void SettingsWidget::updateTabMargins(QScrollArea* scroll_area)
{
if (!scroll_area->widget()->layout())
return;
if (m_tab_widget->count() == 1)
{
int horizontal_margin = 0;
if (scroll_area->verticalScrollBar()->minimum() < scroll_area->verticalScrollBar()->maximum())
horizontal_margin = -1;
int vertical_margin = 0;
if (scroll_area->horizontalScrollBar()->minimum() < scroll_area->horizontalScrollBar()->maximum())
vertical_margin = -1;
if (layoutDirection() == Qt::RightToLeft)
scroll_area->widget()->layout()->setContentsMargins(horizontal_margin, 0, 0, vertical_margin);
else
scroll_area->widget()->layout()->setContentsMargins(0, 0, horizontal_margin, vertical_margin);
}
else
{
scroll_area->widget()->layout()->setContentsMargins(-1, -1, -1, -1);
}
}

View File

@@ -0,0 +1,56 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include "common/Pcsx2Defs.h"
#include <QtWidgets/QWidget>
class QScrollArea;
class QTabWidget;
class SettingsWindow;
class SettingsWidget : public QWidget
{
Q_OBJECT
protected:
SettingsWidget(SettingsWindow* settings_dialog, QWidget* parent = nullptr);
__fi SettingsWindow* dialog() { return m_dialog; }
__fi const SettingsWindow* dialog() const { return m_dialog; }
template <typename HeaderUi>
void setupHeader(HeaderUi& header_ui)
{
QWidget* header = new QWidget(this);
header_ui.setupUi(header);
addPageHeader(header);
}
// Create a settings tab with a scroll area.
template <typename ContentsUi>
QWidget* setupTab(ContentsUi& contents_ui, QString name = QString())
{
QWidget* contents = new QWidget(this);
contents_ui.setupUi(contents);
return addTab(name, contents);
}
void addPageHeader(QWidget* header, bool custom_margins = false);
QWidget* addTab(QString name, QWidget* contents, bool custom_margins = false);
void setTabVisible(QWidget* tab, bool is_visible, QWidget* switch_to = nullptr);
private:
void updateTabMargins(QScrollArea* scroll_area);
SettingsWindow* m_dialog;
QWidget* m_page_header;
QTabWidget* m_tab_widget;
QScrollArea* m_last_scroll_area = nullptr;
};

View File

@@ -9,7 +9,6 @@
#include "Settings/AudioSettingsWidget.h"
#include "Settings/BIOSSettingsWidget.h"
#include "Settings/DEV9SettingsWidget.h"
#include "Settings/DebugSettingsWidget.h"
#include "Settings/EmulationSettingsWidget.h"
#include "Settings/FolderSettingsWidget.h"
#include "Settings/GameCheatSettingsWidget.h"
@@ -21,6 +20,7 @@
#include "Settings/HotkeySettingsWidget.h"
#include "Settings/InterfaceSettingsWidget.h"
#include "Settings/MemoryCardSettingsWidget.h"
#include "Settings/DebugSettingsWidget.h"
#include "SettingsWindow.h"
#include "pcsx2/Achievements.h"

View File

@@ -2,7 +2,11 @@
// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include "ui_SettingsWindow.h"
#include "common/Pcsx2Defs.h"
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtWidgets/QWidget>

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>450</height>
<width>900</width>
<height>800</height>
</rect>
</property>
<property name="sizePolicy">

View File

@@ -101,7 +101,6 @@
<ClCompile Include="LogWindow.cpp" />
<ClCompile Include="QtProgressCallback.cpp" />
<ClCompile Include="Settings\DebugAnalysisSettingsWidget.cpp" />
<ClCompile Include="Settings\DebugUserInterfaceSettingsWidget.cpp" />
<ClCompile Include="Settings\DebugSettingsWidget.cpp" />
<ClCompile Include="Settings\FolderSettingsWidget.cpp" />
<ClCompile Include="Settings\GameCheatSettingsWidget.cpp" />
@@ -147,6 +146,7 @@
<ClCompile Include="Settings\GameListSettingsWidget.cpp" />
<ClCompile Include="Settings\GraphicsSettingsWidget.cpp" />
<ClCompile Include="Settings\InterfaceSettingsWidget.cpp" />
<ClCompile Include="Settings\SettingsWidget.cpp" />
<ClCompile Include="Settings\SettingsWindow.cpp" />
<ClCompile Include="Settings\AdvancedSettingsWidget.cpp" />
<ClCompile Include="Settings\GameFixSettingsWidget.cpp" />
@@ -188,6 +188,7 @@
<QtMoc Include="Settings\BIOSSettingsWidget.h" />
<QtMoc Include="Settings\EmulationSettingsWidget.h" />
<QtMoc Include="Settings\GraphicsSettingsWidget.h" />
<QtMoc Include="Settings\SettingsWidget.h" />
<QtMoc Include="Settings\SettingsWindow.h" />
<QtMoc Include="Settings\AdvancedSettingsWidget.h" />
<QtMoc Include="Settings\GameFixSettingsWidget.h" />
@@ -214,7 +215,6 @@
<ClInclude Include="Settings\ControllerSettingWidgetBinder.h" />
<QtMoc Include="Settings\FolderSettingsWidget.h" />
<QtMoc Include="Settings\DebugAnalysisSettingsWidget.h" />
<QtMoc Include="Settings\DebugUserInterfaceSettingsWidget.h" />
<QtMoc Include="Settings\DebugSettingsWidget.h" />
<QtMoc Include="Settings\GameCheatSettingsWidget.h" />
<QtMoc Include="Settings\GamePatchSettingsWidget.h" />
@@ -285,6 +285,7 @@
<ClCompile Include="$(IntDir)Settings\moc_GameListSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_GraphicsSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_InterfaceSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_SettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_SettingsWindow.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_AdvancedSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_GameCheatSettingsWidget.cpp" />
@@ -304,7 +305,6 @@
<ClCompile Include="$(IntDir)Settings\moc_AchievementLoginDialog.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_AchievementSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_DebugAnalysisSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_DebugUserInterfaceSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_DebugSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Debugger\moc_AnalysisOptionsDialog.cpp" />
<ClCompile Include="$(IntDir)Debugger\moc_DebuggerView.cpp" />
@@ -400,8 +400,10 @@
<QtUi Include="Settings\ControllerMouseSettingsDialog.ui" />
<QtUi Include="Settings\ControllerSettingsWindow.ui" />
<QtUi Include="Settings\DebugAnalysisSettingsWidget.ui" />
<QtUi Include="Settings\DebugSettingsWidget.ui" />
<QtUi Include="Settings\DebugUserInterfaceSettingsWidget.ui" />
<QtUi Include="Settings\DebugAnalysisSettingsTab.ui" />
<QtUi Include="Settings\DebugGSSettingsTab.ui" />
<QtUi Include="Settings\DebugLoggingSettingsTab.ui" />
<QtUi Include="Settings\DebugUserInterfaceSettingsTab.ui" />
<QtUi Include="Settings\DEV9DnsHostDialog.ui" />
<QtUi Include="Settings\DEV9SettingsWidget.ui" />
<QtUi Include="Settings\EmulationSettingsWidget.ui" />
@@ -412,7 +414,17 @@
<QtUi Include="Settings\GamePatchDetailsWidget.ui" />
<QtUi Include="Settings\GamePatchSettingsWidget.ui" />
<QtUi Include="Settings\GameSummaryWidget.ui" />
<QtUi Include="Settings\GraphicsSettingsWidget.ui" />
<QtUi Include="Settings\GraphicsAdvancedSettingsTab.ui" />
<QtUi Include="Settings\GraphicsDisplaySettingsTab.ui" />
<QtUi Include="Settings\GraphicsHardwareFixesSettingsTab.ui" />
<QtUi Include="Settings\GraphicsHardwareRenderingSettingsTab.ui" />
<QtUi Include="Settings\GraphicsMediaCaptureSettingsTab.ui" />
<QtUi Include="Settings\GraphicsOnScreenDisplaySettingsTab.ui" />
<QtUi Include="Settings\GraphicsPostProcessingSettingsTab.ui" />
<QtUi Include="Settings\GraphicsSettingsHeader.ui" />
<QtUi Include="Settings\GraphicsSoftwareRenderingSettingsTab.ui" />
<QtUi Include="Settings\GraphicsTextureReplacementSettingsTab.ui" />
<QtUi Include="Settings\GraphicsUpscalingFixesSettingsTab.ui" />
<QtUi Include="Settings\InputBindingDialog.ui" />
<QtUi Include="Settings\InterfaceSettingsWidget.ui" />
<QtUi Include="Settings\MemoryCardConvertDialog.ui" />

View File

@@ -266,15 +266,9 @@
<ClCompile Include="Settings\DebugAnalysisSettingsWidget.cpp">
<Filter>Settings</Filter>
</ClCompile>
<ClCompile Include="Settings\DebugUserInterfaceSettingsWidget.cpp">
<Filter>Settings</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_DebugAnalysisSettingsWidget.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_DebugUserInterfaceSettingsWidget.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="Settings\DebugSettingsWidget.cpp">
<Filter>Settings</Filter>
</ClCompile>
@@ -494,6 +488,24 @@
<ClCompile Include="Debugger\ThreadView.cpp">
<Filter>Debugger</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\moc_ModuleModel.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\moc_ModuleView.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_SettingsWidget.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="Settings\SettingsWidget.cpp">
<Filter>Settings</Filter>
</ClCompile>
<ClCompile Include="Debugger\ModuleView.cpp">
<Filter>Debugger</Filter>
</ClCompile>
<ClCompile Include="Debugger\ModuleModel.cpp">
<Filter>Debugger</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="..\pcsx2\windows\PCSX2.manifest">
@@ -616,9 +628,6 @@
<QtMoc Include="Settings\DebugAnalysisSettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="Settings\DebugUserInterfaceSettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="Settings\DebugSettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
@@ -649,7 +658,6 @@
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="LogWindow.h" />
<QtMoc Include="Debugger\SymbolTree\TypeString.h" />
<QtMoc Include="Debugger\Breakpoints\BreakpointDialog.h">
<Filter>Debugger\Breakpoints</Filter>
</QtMoc>
@@ -728,6 +736,18 @@
<QtMoc Include="Debugger\ThreadView.h">
<Filter>Debugger</Filter>
</QtMoc>
<QtMoc Include="Debugger\SymbolTree\TypeString.h">
<Filter>Debugger\SymbolTree</Filter>
</QtMoc>
<QtMoc Include="Settings\SettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="Debugger\ModuleView.h">
<Filter>Debugger</Filter>
</QtMoc>
<QtMoc Include="Debugger\ModuleModel.h">
<Filter>Debugger</Filter>
</QtMoc>
</ItemGroup>
<ItemGroup>
<QtResource Include="resources\resources.qrc">
@@ -834,10 +854,16 @@
<QtUi Include="Settings\DebugAnalysisSettingsWidget.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\DebugSettingsWidget.ui">
<QtUi Include="Settings\DebugAnalysisSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\DebugUserInterfaceSettingsWidget.ui">
<QtUi Include="Settings\DebugGSSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\DebugLoggingSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\DebugUserInterfaceSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\DEV9DnsHostDialog.ui">
@@ -870,7 +896,37 @@
<QtUi Include="Settings\GameSummaryWidget.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsSettingsWidget.ui">
<QtUi Include="Settings\GraphicsAdvancedSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsDisplaySettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsHardwareFixesSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsHardwareRenderingSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsMediaCaptureSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsOnScreenDisplaySettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsPostProcessingSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsSettingsHeader.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsSoftwareRenderingSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsTextureReplacementSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GraphicsUpscalingFixesSettingsTab.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\InputBindingDialog.ui">
@@ -953,10 +1009,13 @@
<QtUi Include="Debugger\ThreadView.ui">
<Filter>Debugger</Filter>
</QtUi>
<QtUi Include="Debugger\ModuleView.ui">
<Filter>Debugger</Filter>
</QtUi>
</ItemGroup>
<ItemGroup>
<QtTs Include="Translations\pcsx2-qt_en.ts">
<Filter>Translations</Filter>
</QtTs>
</ItemGroup>
</Project>
</Project>

View File

@@ -2095,7 +2095,7 @@ void Achievements::DrawGameOverlays()
using ImGuiFullscreen::g_medium_font;
using ImGuiFullscreen::LayoutScale;
if (!HasActiveGame() || !EmuConfig.Achievements.Overlays)
if (!HasActiveGame() || !(EmuConfig.Achievements.Overlays || EmuConfig.Achievements.LBOverlays))
return;
const auto lock = GetLock();
@@ -2107,7 +2107,7 @@ void Achievements::DrawGameOverlays()
ImVec2 position = CalculateOverlayPosition(io, padding, EmuConfig.Achievements.OverlayPosition);
ImDrawList* dl = ImGui::GetBackgroundDrawList();
if (!s_active_challenge_indicators.empty())
if (!s_active_challenge_indicators.empty() && EmuConfig.Achievements.Overlays)
{
const ImVec2 stack_direction = GetStackingDirection(EmuConfig.Achievements.OverlayPosition);
ImVec2 current_position = AdjustPositionForAlignment(position, image_size, EmuConfig.Achievements.OverlayPosition);
@@ -2162,7 +2162,7 @@ void Achievements::DrawGameOverlays()
position.y += stack_direction.y * (image_size.y + padding);
}
if (s_active_progress_indicator.has_value())
if (s_active_progress_indicator.has_value() && EmuConfig.Achievements.Overlays)
{
const AchievementProgressIndicator& indicator = s_active_progress_indicator.value();
const float opacity = IndicatorOpacity(indicator);
@@ -2206,7 +2206,7 @@ void Achievements::DrawGameOverlays()
position.y += stack_direction.y * (progress_box_size.y + padding);
}
if (!s_active_leaderboard_trackers.empty())
if (!s_active_leaderboard_trackers.empty() && EmuConfig.Achievements.LBOverlays)
{
const ImVec2 stack_direction = GetStackingDirection(EmuConfig.Achievements.OverlayPosition);
@@ -2848,8 +2848,14 @@ void Achievements::DrawLeaderboardsWindow()
const float tab_width = (ImGui::GetWindowWidth() / ImGuiFullscreen::g_layout_scale) * 0.5f;
ImGui::SetCursorPos(ImVec2(0.0f, top + spacing_small));
if (ImGui::IsKeyPressed(ImGuiKey_NavGamepadTweakSlow, false) || ImGui::IsKeyPressed(ImGuiKey_NavGamepadTweakFast, false))
if (ImGui::IsKeyPressed(ImGuiKey_NavGamepadTweakSlow, false) || ImGui::IsKeyPressed(ImGuiKey_NavGamepadTweakFast, false) ||
ImGui::IsKeyPressed(ImGuiKey_GamepadDpadLeft, false) || ImGui::IsKeyPressed(ImGuiKey_GamepadDpadRight, false) ||
ImGui::IsKeyPressed(ImGuiKey_LeftArrow, false) || ImGui::IsKeyPressed(ImGuiKey_RightArrow, false))
{
s_is_showing_all_leaderboard_entries = !s_is_showing_all_leaderboard_entries;
}
ImGuiFullscreen::BeginNavBar();
for (const bool show_all : {false, true})
{
@@ -2861,6 +2867,8 @@ void Achievements::DrawLeaderboardsWindow()
}
}
ImGuiFullscreen::EndNavBar();
const ImVec2 bg_pos = ImVec2(0.0f, ImGui::GetCurrentWindow()->DC.CursorPos.y + LayoutScale(tab_height_unscaled));
const ImVec2 bg_size =
ImVec2(ImGui::GetWindowWidth(), spacing + LayoutScale(ImGuiFullscreen::LAYOUT_MENU_BUTTON_HEIGHT_NO_SUMMARY) + spacing);
@@ -2914,7 +2922,6 @@ void Achievements::DrawLeaderboardsWindow()
}
}
ImGuiFullscreen::EndFullscreenWindow();
FullscreenUI::SetStandardSelectionFooterText(true);
if (!is_leaderboard_open)
{
@@ -2935,6 +2942,8 @@ void Achievements::DrawLeaderboardsWindow()
ImGuiFullscreen::EndMenuButtons();
}
ImGuiFullscreen::EndFullscreenWindow();
FullscreenUI::SetStandardSelectionFooterText(true);
}
else
{
@@ -3001,6 +3010,24 @@ void Achievements::DrawLeaderboardsWindow()
ImGuiFullscreen::EndMenuButtons();
}
ImGuiFullscreen::EndFullscreenWindow();
if (ImGuiFullscreen::IsGamepadInputSource())
{
const bool circleOK = ImGui::GetIO().ConfigNavSwapGamepadButtons;
ImGuiFullscreen::SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_DPAD_LEFT_RIGHT, TRANSLATE_SV("Achievements", "Switch Rankings")),
std::make_pair(ICON_PF_DPAD_UP_DOWN, TRANSLATE_SV("Achievements", "Change Selection")),
std::make_pair(circleOK ? ICON_PF_BUTTON_CROSS : ICON_PF_BUTTON_CIRCLE, TRANSLATE_SV("Achievements", "Back")),
});
}
else
{
ImGuiFullscreen::SetFullscreenFooterText(std::array{
std::make_pair(ICON_PF_ARROW_LEFT ICON_PF_ARROW_RIGHT, TRANSLATE_SV("Achievements", "Switch Rankings")),
std::make_pair(ICON_PF_ARROW_UP ICON_PF_ARROW_DOWN, TRANSLATE_SV("Achievements", "Change Selection")),
std::make_pair(ICON_PF_ESC, TRANSLATE_SV("Achievements", "Back")),
});
}
}
if (close_leaderboard_on_exit)

View File

@@ -487,6 +487,7 @@ set(pcsx2GSSources
GS/GSCapture.cpp
GS/GSClut.cpp
GS/GSDrawingContext.cpp
GS/GSDrawingEnvironment.cpp
GS/GSDump.cpp
GS/GSLocalMemory.cpp
GS/GSLzma.cpp

View File

@@ -1256,7 +1256,8 @@ struct Pcsx2Config
InfoSound : 1,
UnlockSound : 1,
LBSubmitSound : 1,
Overlays : 1;
Overlays : 1,
LBOverlays : 1;
BITFIELD_END
u32 NotificationsDuration = DEFAULT_NOTIFICATION_DURATION;

View File

@@ -171,29 +171,29 @@ void GSDrawingContext::Dump(const std::string& filename)
fprintf(fp,
"XYOFFSET\n"
"\tX:%u\n"
"\tY:%u\n\n",
XYOFFSET.OFX, XYOFFSET.OFY);
"\tOFX:%.4f\n"
"\tOFY:%.4f\n\n",
XYOFFSET.OFX / 16.0f, XYOFFSET.OFY / 16.0f);
fprintf(fp,
"MIPTBP1\n"
"\tBP1:0x%x\n"
"\tBW1:%u\n"
"\tBP2:0x%x\n"
"\tBW2:%u\n"
"\tBP3:0x%x\n"
"\tBW3:%u\n\n",
"\tTBP1:0x%x\n"
"\tTBW1:%u\n"
"\tTBP2:0x%x\n"
"\tTBW2:%u\n"
"\tTBP3:0x%x\n"
"\tTBW3:%u\n\n",
static_cast<uint32_t>(MIPTBP1.TBP1), static_cast<uint32_t>(MIPTBP1.TBW1), static_cast<uint32_t>(MIPTBP1.TBP2),
static_cast<uint32_t>(MIPTBP1.TBW2), static_cast<uint32_t>(MIPTBP1.TBP3), static_cast<uint32_t>(MIPTBP1.TBW3));
fprintf(fp,
"MIPTBP2\n"
"\tBP4:0x%x\n"
"\tBW4:%u\n"
"\tBP5:0x%x\n"
"\tBW5:%u\n"
"\tBP6:0x%x\n"
"\tBW6:%u\n\n",
"\tTBP4:0x%x\n"
"\tTBW4:%u\n"
"\tTBP5:0x%x\n"
"\tTBW5:%u\n"
"\tTBP6:0x%x\n"
"\tTBW6:%u\n\n",
static_cast<uint32_t>(MIPTBP2.TBP4), static_cast<uint32_t>(MIPTBP2.TBW4), static_cast<uint32_t>(MIPTBP2.TBP5),
static_cast<uint32_t>(MIPTBP2.TBW5), static_cast<uint32_t>(MIPTBP2.TBP6), static_cast<uint32_t>(MIPTBP2.TBW6));
@@ -201,17 +201,17 @@ void GSDrawingContext::Dump(const std::string& filename)
"TEX0\n"
"\tTBP0:0x%x\n"
"\tTBW:%u\n"
"\tPSM:0x%x\n"
"\tPSM:0x%x (%s)\n"
"\tTW:%u\n"
"\tTH:%u\n"
"\tTCC:%u\n"
"\tTFX:%u\n"
"\tCBP:0x%x\n"
"\tCPSM:0x%x\n"
"\tCPSM:0x%x (%s)\n"
"\tCSM:%u\n"
"\tCSA:%u\n"
"\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);
TEX0.TBP0, TEX0.TBW, TEX0.PSM, GSUtil::GetPSMName(TEX0.PSM), TEX0.TW, static_cast<uint32_t>(TEX0.TH), TEX0.TCC, TEX0.TFX, TEX0.CBP, TEX0.CPSM, GSUtil::GetPSMName(TEX0.CPSM), TEX0.CSM,TEX0.CSA, TEX0.CLD);
fprintf(fp,
"TEX1\n"
@@ -226,21 +226,20 @@ void GSDrawingContext::Dump(const std::string& filename)
fprintf(fp,
"CLAMP\n"
"\tWMS:%u\n"
"\tWMT:%u\n"
"\tWMS:%u (%s)\n"
"\tWMT:%u (%s)\n"
"\tMINU:%u\n"
"\tMAXU:%u\n"
"\tMAXV:%u\n"
"\tMINV:%u\n\n",
CLAMP.WMS, CLAMP.WMT, CLAMP.MINU, CLAMP.MAXU, CLAMP.MAXV, static_cast<uint32_t>(CLAMP.MINV));
CLAMP.WMS, GSUtil::GetWMName(CLAMP.WMS), CLAMP.WMT,GSUtil::GetWMName(CLAMP.WMT), CLAMP.MINU, CLAMP.MAXU, CLAMP.MAXV, static_cast<uint32_t>(CLAMP.MINV));
// TODO mimmap? (yes I'm lazy)
fprintf(fp,
"SCISSOR\n"
"\tX0:%u\n"
"\tX1:%u\n"
"\tY0:%u\n"
"\tY1:%u\n\n",
"\tSCAX0:%u\n"
"\tSCAX1:%u\n"
"\tSCAY0:%u\n"
"\tSCAY1:%u\n\n",
SCISSOR.SCAX0, SCISSOR.SCAX1, SCISSOR.SCAY0, SCISSOR.SCAY1);
fprintf(fp,
@@ -258,14 +257,14 @@ void GSDrawingContext::Dump(const std::string& filename)
fprintf(fp,
"TEST\n"
"\tATE:%u\n"
"\tATST:%s\n"
"\tATST:%u (%s)\n"
"\tAREF:%u\n"
"\tAFAIL:%s\n"
"\tAFAIL:%u (%s)\n"
"\tDATE:%u\n"
"\tDATM:%u\n"
"\tZTE:%u\n"
"\tZTST:%u\n\n",
TEST.ATE, GSUtil::GetATSTName(TEST.ATST), TEST.AREF, GSUtil::GetAFAILName(TEST.AFAIL), TEST.DATE, TEST.DATM, TEST.ZTE, TEST.ZTST);
"\tZTST:%u (%s)\n\n",
TEST.ATE, TEST.ATST, GSUtil::GetATSTName(TEST.ATST), TEST.AREF, TEST.AFAIL, GSUtil::GetAFAILName(TEST.AFAIL), TEST.DATE, TEST.DATM, TEST.ZTE, TEST.ZTST, GSUtil::GetZTSTName(TEST.ZTST));
fprintf(fp,
"FBA\n"
@@ -276,16 +275,16 @@ void GSDrawingContext::Dump(const std::string& filename)
"FRAME\n"
"\tFBP (*32):0x%x\n"
"\tFBW:%u\n"
"\tPSM:0x%x\n"
"\tPSM:0x%x (%s)\n"
"\tFBMSK:0x%x\n\n",
FRAME.FBP * 32, FRAME.FBW, FRAME.PSM, FRAME.FBMSK);
FRAME.FBP * 32, FRAME.FBW, FRAME.PSM, GSUtil::GetPSMName(FRAME.PSM), FRAME.FBMSK);
fprintf(fp,
"ZBUF\n"
"\tZBP (*32):0x%x\n"
"\tPSM:0x%x\n"
"\tPSM:0x%x (%s)\n"
"\tZMSK:%u\n\n",
ZBUF.ZBP * 32, ZBUF.PSM, ZBUF.ZMSK);
ZBUF.ZBP * 32, ZBUF.PSM, GSUtil::GetPSMName(ZBUF.PSM), ZBUF.ZMSK);
fclose(fp);
}

View File

@@ -0,0 +1,147 @@
// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#include "GS/GSGL.h"
#include "GS/GS.h"
#include "GS/GSUtil.h"
#include "GS/GSDrawingContext.h"
#include "GS/GSDrawingEnvironment.h"
void GSDrawingEnvironment::Reset()
{
memset(&PRIM, 0, sizeof(PRIM));
memset(&PRMODE, 0, sizeof(PRMODE));
memset(&PRMODECONT, 0, sizeof(PRMODECONT));
memset(&TEXCLUT, 0, sizeof(TEXCLUT));
memset(&SCANMSK, 0, sizeof(SCANMSK));
memset(&TEXA, 0, sizeof(TEXA));
memset(&FOGCOL, 0, sizeof(FOGCOL));
memset(&DIMX, 0, sizeof(DIMX));
memset(&DTHE, 0, sizeof(DTHE));
memset(&COLCLAMP, 0, sizeof(COLCLAMP));
memset(&PABE, 0, sizeof(PABE));
memset(&BITBLTBUF, 0, sizeof(BITBLTBUF));
memset(&TRXDIR, 0, sizeof(TRXDIR));
memset(&TRXPOS, 0, sizeof(TRXPOS));
memset(&TRXREG, 0, sizeof(TRXREG));
CTXT[0].Reset();
CTXT[1].Reset();
}
void GSDrawingEnvironment::Dump(const std::string& filename) const
{
FILE* fp = fopen(filename.c_str(), "wt");
if (!fp)
return;
fprintf(fp, "PRIM\n"
"\tPRIM:%u (%s)\n"
"\tIIP:%u\n"
"\tTME:%u\n"
"\tFGE:%u\n"
"\tABE:%u\n"
"\tAA1:%u\n"
"\tFST:%u\n"
"\tCTXT:%u\n"
"\tFIX:%u\n\n",
PRIM.PRIM, GSUtil::GetPrimName(PRIM.PRIM), PRIM.IIP, PRIM.TME, PRIM.FGE, PRIM.ABE, PRIM.AA1, PRIM.FST, PRIM.CTXT, PRIM.FIX);
fprintf(fp, "PRMODE (when AC=0)\n"
"\t_PRIM:%u (%s)\n"
"\tIIP:%u\n"
"\tTME:%u\n"
"\tFGE:%u\n"
"\tABE:%u\n"
"\tAA1:%u\n"
"\tFST:%u\n"
"\tCTXT:%u\n"
"\tFIX:%u\n\n",
PRMODE._PRIM, GSUtil::GetPrimName(PRMODE._PRIM), PRMODE.IIP, PRMODE.TME, PRMODE.FGE, PRMODE.ABE, PRMODE.AA1, PRMODE.FST, PRMODE.CTXT, PRMODE.FIX);
fprintf(fp, "PRMODECONT\n"
"\tAC:%u\n\n",
PRMODECONT.AC);
fprintf(fp, "TEXCLUT\n"
"\tCOU:%u\n"
"\tCBW:%u\n"
"\tCOV:%u\n\n",
TEXCLUT.COU, TEXCLUT.CBW, TEXCLUT.COV);
fprintf(fp, "SCANMSK\n"
"\tMSK:%u\n\n",
SCANMSK.MSK);
fprintf(fp, "TEXA\n"
"\tAEM:%u\n"
"\tTA0:%u\n"
"\tTA1:%u\n\n",
TEXA.AEM, TEXA.TA0, TEXA.TA1);
fprintf(fp, "FOGCOL\n"
"\tFCG:%u\n"
"\tFCB:%u\n"
"\tFCR:%u\n\n",
FOGCOL.FCG, FOGCOL.FCB, FOGCOL.FCR);
fprintf(fp, "DIMX\n"
"\tDM22:%d\n"
"\tDM23:%d\n"
"\tDM31:%d\n"
"\tDM02:%d\n"
"\tDM21:%d\n"
"\tDM12:%d\n"
"\tDM03:%d\n"
"\tDM01:%d\n"
"\tDM33:%d\n"
"\tDM30:%d\n"
"\tDM11:%d\n"
"\tDM10:%d\n"
"\tDM20:%d\n"
"\tDM32:%d\n"
"\tDM00:%d\n"
"\tDM13:%d\n\n",
DIMX.DM22, DIMX.DM23, DIMX.DM31, DIMX.DM02, DIMX.DM21, DIMX.DM12, DIMX.DM03, DIMX.DM01, DIMX.DM33, DIMX.DM30, DIMX.DM11, DIMX.DM10, DIMX.DM20, DIMX.DM32, DIMX.DM00, DIMX.DM13);
fprintf(fp, "DTHE\n"
"\tDTHE:%u\n\n",
DTHE.DTHE);
fprintf(fp, "COLCLAMP\n"
"\tCLAMP:%u\n\n",
COLCLAMP.CLAMP);
fprintf(fp, "PABE\n"
"\tPABE:%u\n\n",
PABE.PABE);
fprintf(fp, "BITBLTBUF\n"
"\tSBW:%u\n"
"\tSBP:0x%x\n"
"\tSPSM:%u (%s)\n"
"\tDBW:%u\n"
"\tDPSM:%u (%s)\n"
"\tDBP:0x%x\n\n",
BITBLTBUF.SBW, BITBLTBUF.SBP, BITBLTBUF.SPSM, GSUtil::GetPSMName(BITBLTBUF.SPSM), BITBLTBUF.DBW, BITBLTBUF.DPSM, GSUtil::GetPSMName(BITBLTBUF.DPSM), BITBLTBUF.DBP);
fprintf(fp, "TRXDIR\n"
"\tXDIR:%u\n\n",
TRXDIR.XDIR);
fprintf(fp, "TRXPOS\n"
"\tDIRY:%u\n"
"\tSSAY:%u\n"
"\tSSAX:%u\n"
"\tDIRX:%u\n"
"\tDSAX:%u\n"
"\tDSAY:%u\n\n",
TRXPOS.DIRY, TRXPOS.SSAY, TRXPOS.SSAX, TRXPOS.DIRX, TRXPOS.DSAX, TRXPOS.DSAY);
fprintf(fp, "TRXREG\n"
"\tRRH:%u\n"
"\tRRW:%u\n\n",
TRXREG.RRH, TRXREG.RRW);
fclose(fp);
}

View File

@@ -23,142 +23,7 @@ public:
GIFRegTRXREG TRXREG;
GSDrawingContext CTXT[2];
void Reset()
{
memset(&PRIM, 0, sizeof(PRIM));
memset(&PRMODE, 0, sizeof(PRMODE));
memset(&PRMODECONT, 0, sizeof(PRMODECONT));
memset(&TEXCLUT, 0, sizeof(TEXCLUT));
memset(&SCANMSK, 0, sizeof(SCANMSK));
memset(&TEXA, 0, sizeof(TEXA));
memset(&FOGCOL, 0, sizeof(FOGCOL));
memset(&DIMX, 0, sizeof(DIMX));
memset(&DTHE, 0, sizeof(DTHE));
memset(&COLCLAMP, 0, sizeof(COLCLAMP));
memset(&PABE, 0, sizeof(PABE));
memset(&BITBLTBUF, 0, sizeof(BITBLTBUF));
memset(&TRXDIR, 0, sizeof(TRXDIR));
memset(&TRXPOS, 0, sizeof(TRXPOS));
memset(&TRXREG, 0, sizeof(TRXREG));
void Reset();
CTXT[0].Reset();
CTXT[1].Reset();
}
void Dump(const std::string& filename) const
{
FILE* fp = fopen(filename.c_str(), "wt");
if (!fp)
return;
fprintf(fp, "PRIM\n"
"\tPRIM:%u\n"
"\tIIP:%u\n"
"\tTME:%u\n"
"\tFGE:%u\n"
"\tABE:%u\n"
"\tAA1:%u\n"
"\tFST:%u\n"
"\tCTXT:%u\n"
"\tFIX:%u\n\n"
, PRIM.PRIM, PRIM.IIP, PRIM.TME, PRIM.FGE, PRIM.ABE, PRIM.AA1, PRIM.FST, PRIM.CTXT, PRIM.FIX);
fprintf(fp, "PRMODE (when AC=0)\n"
"\t_PRIM:%u\n"
"\tIIP:%u\n"
"\tTME:%u\n"
"\tFGE:%u\n"
"\tABE:%u\n"
"\tAA1:%u\n"
"\tFST:%u\n"
"\tCTXT:%u\n"
"\tFIX:%u\n\n"
, PRMODE._PRIM, PRMODE.IIP, PRMODE.TME, PRMODE.FGE, PRMODE.ABE, PRMODE.AA1, PRMODE.FST, PRMODE.CTXT, PRMODE.FIX);
fprintf(fp, "PRMODECONT\n"
"\tAC:%u\n\n"
, PRMODECONT.AC);
fprintf(fp, "TEXCLUT\n"
"\tCOU:%u\n"
"\tCBW:%u\n"
"\tCOV:%u\n\n"
, TEXCLUT.COU, TEXCLUT.CBW, TEXCLUT.COV);
fprintf(fp, "SCANMSK\n"
"\tMSK:%u\n\n"
, SCANMSK.MSK);
fprintf(fp, "TEXA\n"
"\tAEM:%u\n"
"\tTA0:%u\n"
"\tTA1:%u\n\n"
, TEXA.AEM, TEXA.TA0, TEXA.TA1);
fprintf(fp, "FOGCOL\n"
"\tFCG:%u\n"
"\tFCB:%u\n"
"\tFCR:%u\n\n"
, FOGCOL.FCG, FOGCOL.FCB, FOGCOL.FCR);
fprintf(fp, "DIMX\n"
"\tDM22:%d\n"
"\tDM23:%d\n"
"\tDM31:%d\n"
"\tDM02:%d\n"
"\tDM21:%d\n"
"\tDM12:%d\n"
"\tDM03:%d\n"
"\tDM01:%d\n"
"\tDM33:%d\n"
"\tDM30:%d\n"
"\tDM11:%d\n"
"\tDM10:%d\n"
"\tDM20:%d\n"
"\tDM32:%d\n"
"\tDM00:%d\n"
"\tDM13:%d\n\n"
, DIMX.DM22, DIMX.DM23, DIMX.DM31, DIMX.DM02, DIMX.DM21, DIMX.DM12, DIMX.DM03, DIMX.DM01, DIMX.DM33, DIMX.DM30, DIMX.DM11, DIMX.DM10, DIMX.DM20, DIMX.DM32, DIMX.DM00, DIMX.DM13);
fprintf(fp, "DTHE\n"
"\tDTHE:%u\n\n"
, DTHE.DTHE);
fprintf(fp, "COLCLAMP\n"
"\tCLAMP:%u\n\n"
, COLCLAMP.CLAMP);
fprintf(fp, "PABE\n"
"\tPABE:%u\n\n"
, PABE.PABE);
fprintf(fp, "BITBLTBUF\n"
"\tSBW:%u\n"
"\tSBP:0x%x\n"
"\tSPSM:%u\n"
"\tDBW:%u\n"
"\tDPSM:%u\n"
"\tDBP:0x%x\n\n"
, BITBLTBUF.SBW, BITBLTBUF.SBP, BITBLTBUF.SPSM, BITBLTBUF.DBW, BITBLTBUF.DPSM, BITBLTBUF.DBP);
fprintf(fp, "TRXDIR\n"
"\tXDIR:%u\n\n",
TRXDIR.XDIR);
fprintf(fp, "TRXPOS\n"
"\tDIRY:%u\n"
"\tSSAY:%u\n"
"\tSSAX:%u\n"
"\tDIRX:%u\n"
"\tDSAX:%u\n"
"\tDSAY:%u\n\n"
, TRXPOS.DIRY, TRXPOS.SSAY, TRXPOS.SSAX, TRXPOS.DIRX, TRXPOS.DSAX, TRXPOS.DSAY);
fprintf(fp, "TRXREG\n"
"\tRRH:%u\n"
"\tRRW:%u\n\n"
, TRXREG.RRH, TRXREG.RRW);
fclose(fp);
}
void Dump(const std::string& filename) const;
};

View File

@@ -520,22 +520,27 @@ void GSState::DumpVertices(const std::string& filename)
file << std::endl;
file << "TRACER" << std::endl;
file << "TRACER" << std::dec << std::endl;
GSVector4i v = m_vt.m_min.c;
file << "\tmin c (x,y,z,w): " << v.x << DEL << v.y << DEL << v.z << DEL << v.w << std::endl;
file << "\tmin c (r,g,b,a): " << v.x << DEL << v.y << DEL << v.z << DEL << v.w << std::endl;
v = m_vt.m_max.c;
file << "\tmax c (x,y,z,w): " << v.x << DEL << v.y << DEL << v.z << DEL << v.w << std::endl;
file << "\tmax c (r,g,b,a): " << v.x << DEL << v.y << DEL << v.z << DEL << v.w << std::endl;
GSVector4 v2 = m_vt.m_min.p;
file << "\tmin p (x,y,z,w): " << v2.x << DEL << v2.y << DEL << v2.z << DEL << v2.w << std::endl;
file << "\tmin p (x,y,z,f): " << v2.x << DEL << v2.y << DEL << v2.z << DEL << (u32)v2.w << std::endl;
v2 = m_vt.m_max.p;
file << "\tmax p (x,y,z,w): " << v2.x << DEL << v2.y << DEL << v2.z << DEL << v2.w << std::endl;
v2 = m_vt.m_min.t;
file << "\tmin t (x,y,z,w): " << v2.x << DEL << v2.y << DEL << v2.z << DEL << v2.w << std::endl;
v2 = m_vt.m_max.t;
file << "\tmax t (x,y,z,w): " << v2.x << DEL << v2.y << DEL << v2.z << DEL << v2.w << std::endl;
file << "\tmax p (x,y,z,f): " << v2.x << DEL << v2.y << DEL << v2.z << DEL << (u32)v2.w << std::endl;
v2 = m_vt.m_min.t;
file << "\tmin t (u,v,q): " << v2.x << DEL << v2.y << DEL << v2.z << std::endl;
v2 = m_vt.m_max.t;
file << "\tmax t (u,v,q): " << v2.x << DEL << v2.y << DEL << v2.z << std::endl;
file << std::endl;
file << "\teq c (r,g,b,a): " << (m_vt.m_eq.r & 1) << DEL << (m_vt.m_eq.g & 1) << DEL << (m_vt.m_eq.b & 1) << DEL << (m_vt.m_eq.a & 1) << std::endl;
file << "\teq p (x,y,z,f): " << (m_vt.m_eq.x & 1) << DEL << (m_vt.m_eq.y & 1) << DEL << (m_vt.m_eq.z & 1) << DEL << (m_vt.m_eq.f & 1) << std::endl;
file << "\teq t (u,v,q) : " << (m_vt.m_eq.s & 1) << DEL << (m_vt.m_eq.t & 1) << DEL << (m_vt.m_eq.q & 1) << std::endl;
file.close();
}

View File

@@ -94,6 +94,26 @@ const char* GSUtil::GetAFAILName(u32 afail)
return (afail < std::size(names)) ? names[afail] : "";
}
const char* GSUtil::GetWMName(u32 wm)
{
static constexpr const char* names[] = {"REPEAT", "CLAMP", "REGION_CLAMP", "REGION_REPEAT"};
return (wm < std::size(names)) ? names[wm] : "";
}
const char* GSUtil::GetZTSTName(u32 ztst)
{
static constexpr const char* names[] = {
"NEVER", "ALWAYS", "GEQUAL", "GREATER"};
return (ztst < std::size(names)) ? names[ztst] : "";
}
const char* GSUtil::GetPrimName(u32 prim)
{
static constexpr const char* names[] = {
"POINT", "LINE", "LINESTRIP", "TRIANGLE", "TRIANGLESTRIP", "TRIANGLEFAN", "SPRITE", "INVALID"};
return (prim < std::size(names)) ? names[prim] : "";
}
const u32* GSUtil::HasSharedBitsPtr(u32 dpsm)
{
return s_maps.SharedBitsField[dpsm];

View File

@@ -12,6 +12,9 @@ public:
static const char* GetATSTName(u32 atst);
static const char* GetAFAILName(u32 afail);
static const char* GetPSMName(int psm);
static const char* GetWMName(u32 wm);
static const char* GetZTSTName(u32 ztst);
static const char* GetPrimName(u32 prim);
static const u32* HasSharedBitsPtr(u32 dpsm);
static bool HasSharedBits(u32 spsm, const u32* ptr);

View File

@@ -340,6 +340,7 @@ void GSRendererHW::ConvertSpriteTextureShuffle(u32& process_rg, u32& process_ba,
shuffle_across = (((tex_pos + 8) >> 4) ^ ((pos + 8) >> 4)) & 0x8;
const bool full_width = ((second_vert.XYZ.X - first_vert.XYZ.X) >> 4) >= 16 && m_r.width() > 8 && tex && tex->m_from_target && rt == tex->m_from_target;
const bool width_multiple_16 = (((second_vert.XYZ.X - first_vert.XYZ.X) >> 7) & 1) == 0;
process_ba = ((pos > 112 && pos < 136) || full_width) ? SHUFFLE_WRITE : 0;
process_rg = (!process_ba || full_width) ? SHUFFLE_WRITE : 0;
// "same group" means it can read blue and write alpha using C32 tricks
@@ -580,6 +581,21 @@ void GSRendererHW::ConvertSpriteTextureShuffle(u32& process_rg, u32& process_ba,
else
v[i + 1 - reversed_U].U += 128u;
}
else if (!width_multiple_16)
{
// In this case the sprite does not span an exact columns boundary
// probably because some of the copied channels are not being used/discarded.
// Just align the range to the nearest column boundary and copy all
// channels regardless.
if ((((v[i + reversed_pos].XYZ.X - o.OFX) + 8) >> 4) & 0x8)
v[i + reversed_pos].XYZ.X -= 128u;
if ((((v[i + reversed_pos].XYZ.X - o.OFX) + 8) >> 4) & 0x8)
v[i + 1 - reversed_pos].XYZ.X += 128u;
if (v[i + reversed_U].U & 128)
v[i + reversed_U].U -= 128u;
if (v[i + 1 - reversed_U].U & 128)
v[i + 1 - reversed_U].U += 128u;
}
else
{
if (((pos + 8) >> 4) & 0x8)
@@ -4296,12 +4312,12 @@ void GSRendererHW::Draw()
rt->ResizeDrawn(rt_cover ? update_rect : rt->m_drawn_since_read.rintersect(rt->GetUnscaledRect()));
}
const bool rt_update = can_update_size || (m_texture_shuffle && (src && rt && src->m_from_target != rt));
const bool rt_update = can_update_size || (is_possible_mem_clear && m_vt.m_min.c.a > 0) || (m_texture_shuffle && (src && src->m_from_target != rt));
// If it's updating from a texture shuffle, limit the size to the source size.
if (rt_update && !can_update_size)
{
if (src->m_from_target)
if (src && src->m_from_target)
update_rect = update_rect.rintersect(src->m_from_target->m_valid);
update_rect = update_rect.rintersect(GSVector4i::loadh(GSVector2i(new_w, new_h)));
@@ -4383,7 +4399,7 @@ void GSRendererHW::Draw()
// Limit to 2x the vertical height of the resolution (for double buffering)
// Dark cloud writes to 424 when the buffer is only 416 high, but masks the Z.
// Updating the valid causes the Z to overlap the framebuffer, which is obviously incorrect.
const bool z_update = can_update_size && !z_masked;
const bool z_update = (can_update_size || (is_possible_mem_clear && m_vt.m_min.p.z > 0)) && !z_masked;
if (rt && m_using_temp_z)
{

View File

@@ -137,10 +137,6 @@ bool GSTextureCache::FullRectDirty(Target* target, u32 rgba_mask)
bool GSTextureCache::FullRectDirty(Target* target)
{
// Why?
if (target->m_age == 0)
return false;
return FullRectDirty(target, GSUtil::GetChannelMask(target->m_TEX0.PSM));
}
@@ -2437,10 +2433,29 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(GIFRegTEX0 TEX0, const GSVe
if (!is_shuffle && (!GSUtil::HasSameSwizzleBits(t->m_TEX0.PSM, TEX0.PSM) ||
((widthpage_offset % std::max(t->m_TEX0.TBW, 1U)) != 0 && ((widthpage_offset + (min_rect.width() + (s_psm.pgs.x - 1)) / s_psm.pgs.x)) > t->m_TEX0.TBW)))
{
GL_INS("TC: Deleting RT BP 0x%x BW %d PSM %s due to change in target", t->m_TEX0.TBP0, t->m_TEX0.TBW, GSUtil::GetPSMName(t->m_TEX0.PSM));
InvalidateSourcesFromTarget(t);
i = list.erase(i);
delete t;
const int page_offset = TEX0.TBP0 - t->m_TEX0.TBP0;
const int number_pages = page_offset / 32;
const u32 tbw = std::max(t->m_TEX0.TBW, 1u);
const int row_offset = number_pages / tbw;
const int page_height = GSLocalMemory::m_psm[t->m_TEX0.PSM].pgs.y;
const int vertical_position = row_offset * page_height;
if (src && src->m_from_target == t && src->m_target_direct && vertical_position >= t->m_valid.w / 2)
{
// Valids and drawn since last read doesn't match, keep the target but resize it.
src->m_valid_rect.w = std::min(vertical_position, src->m_valid_rect.w);
t->m_valid.w = std::min(vertical_position, t->m_valid.w);
t->ResizeValidity(t->m_valid);
t->ResizeDrawn(t->m_valid);
++i;
}
else
{
GL_INS("TC: Deleting RT BP 0x%x BW %d PSM %s due to change in target", t->m_TEX0.TBP0, t->m_TEX0.TBW, GSUtil::GetPSMName(t->m_TEX0.PSM));
InvalidateSourcesFromTarget(t);
i = list.erase(i);
delete t;
}
continue;
}

View File

@@ -345,15 +345,7 @@ void GSRendererSW::Draw()
std::memcpy(sd->index, m_index.buff, sizeof(u16) * m_index.tail);
GSVector4i scissor = context->scissor.in;
GSVector4i bbox = GSVector4i(m_vt.m_min.p.floor().upld(m_vt.m_max.p.ceil()));
// points and lines may have zero area bbox (single line: 0, 0 - 256, 0)
if (m_vt.m_primclass == GS_POINT_CLASS || m_vt.m_primclass == GS_LINE_CLASS)
{
if (bbox.x == bbox.z) bbox.z++;
if (bbox.y == bbox.w) bbox.w++;
}
GSVector4i bbox = GSVector4i(m_vt.m_min.p.floor().upld(m_vt.m_max.p.floor())) + GSVector4i(0, 0, 1, 1); // right/bottom should be exclusive so +1
GSVector4i r = bbox.rintersect(scissor);

Some files were not shown because too many files have changed in this diff Show More