Merge remote-tracking branch 'upstream/master'

This commit is contained in:
987123879113 2022-11-30 03:11:41 +09:00
commit 6f9f3616db
208 changed files with 3381 additions and 9208 deletions

View File

@ -1,3 +1,5 @@
---
exclude_paths:
- '3rdparty/**'
- '*.md'
- '**/*.md'

View File

@ -28,7 +28,7 @@ The following is a list of *general* style recommendations that will make review
* Looking at the project's commit history will help with keeping prefixes consistent overtime, *there is no strictly enforced list*.
* Try to keep messages brief and informative
* Remove unnecessary commits and squash commits together when appropriate.
* If you are not familiar with rebasing with git, check out the following resources:
* CLI - https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history

1
.github/labeler.yml vendored
View File

@ -12,7 +12,6 @@
- 'cmake/**/*'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- 'buildbot.xml'
- 'build.sh'
'Dependencies':
- '3rdparty/*'

View File

@ -45,7 +45,7 @@ jobs:
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 100M
SDL: SDL2-2.24.0
SDL: SDL2-2.26.0
PATCHELF_VERSION: 0.12
steps:

View File

@ -1,4 +1,4 @@
#!/bin/sh
cd "$(dirname "$0")"
exec ./usr/bin/pcsx2-qt "$@"
APPDIR=$(dirname "$0")
exec "$APPDIR/usr/bin/pcsx2-qt" "$@"

View File

@ -203,7 +203,7 @@ mkdir "$OUTDIR"
mkdir -p "$OUTDIR/usr/bin" "$OUTDIR/usr/lib" "$OUTDIR/usr/lib/pulseaudio"
echo "Copying binary and resources..."
cp -a "$BINDIR/$BINARY" "$BINDIR/resources" "$BINDIR/shaders" "$OUTDIR/usr/bin"
cp -a "$BINDIR/$BINARY" "$BINDIR/resources" "$OUTDIR/usr/bin"
# Don't need old wx locales.
rm -fr "$OUTDIR/usr/bin/resources/locale"

View File

@ -23,7 +23,7 @@ sudo cp /usr/local/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf
cd "$GITHUB_WORKSPACE"
ninja -C build install
cp ./pcsx2/gui/Resources/AppIcon64.png ./squashfs-root/PCSX2.png
cp ./linux_various/PCSX2.desktop.in ./squashfs-root/PCSX2.desktop
cp ./linux_various/PCSX2.desktop.in ./squashfs-root/PCSX2.desktop
sed -i -e 's|Categories=@PCSX2_MENU_CATEGORIES@|Categories=Game;Emulator;|g' ./squashfs-root/PCSX2.desktop
sed -i -e 's|__GL_THREADED_OPTIMIZATIONS=1|__GL_THREADED_OPTIMIZATIONS=0|g' ./squashfs-root/PCSX2.desktop
curl -sSfL "https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-$APPARCH" -o ./squashfs-root/runtime

View File

@ -4,14 +4,14 @@ set -e
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.24.0
SDL=SDL2-2.26.0
QT=6.3.1
mkdir -p deps-build
cd deps-build
cat > SHASUMS <<EOF
91e4c34b1768f92d399b078e171448c6af18cafda743987ed2064a28954d6d97 $SDL.tar.gz
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz

View File

@ -9,7 +9,7 @@ else
fi
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.24.0
SDL=SDL2-2.26.0
PNG=1.6.37
JPG=9e
SOUNDTOUCH=soundtouch-2.3.1
@ -26,7 +26,7 @@ export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS"
cat > SHASUMS <<EOF
91e4c34b1768f92d399b078e171448c6af18cafda743987ed2064a28954d6d97 $SDL.tar.gz
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d jpegsrc.v$JPG.tar.gz
6900996607258496ce126924a19fe9d598af9d892cf3f33d1e4daaa9b42ae0b1 $SOUNDTOUCH.tar.gz

2
3rdparty/sdl2/SDL vendored

@ -1 +1 @@
Subproject commit 8c9beb0c873f6ca5efbd88f1ad2648bfc793b2ac
Subproject commit 0bfeed061b10ea7dd37c88d9bae1824bad760f3a

View File

@ -158,6 +158,7 @@
<ClInclude Include="SDL\src\hidapi\SDL_hidapi_c.h" />
<ClInclude Include="SDL\src\joystick\controller_type.h" />
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_nintendo.h" />
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_rumble.h" />
<ClInclude Include="SDL\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="SDL\src\joystick\SDL_joystick_c.h" />
@ -289,12 +290,15 @@
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_combined.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_luna.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps3.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps4.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps5.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_rumble.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_shield.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_stadia.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steam.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_switch.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_wii.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_xboxone.c" />

View File

@ -542,6 +542,9 @@
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapijoystick_c.h">
<Filter>joystick\hidapi</Filter>
</ClInclude>
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_nintendo.h">
<Filter>joystick\hidapi</Filter>
</ClInclude>
<ClInclude Include="SDL\src\joystick\hidapi\SDL_hidapi_rumble.h">
<Filter>joystick\hidapi</Filter>
</ClInclude>
@ -966,6 +969,9 @@
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_luna.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps3.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_ps4.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
@ -978,9 +984,15 @@
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_stadia.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_steam.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_switch.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_wii.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>
<ClCompile Include="SDL\src\joystick\hidapi\SDL_hidapi_xbox360.c">
<Filter>joystick\hidapi</Filter>
</ClCompile>

View File

@ -9,7 +9,7 @@
# best to completely avoid them at this file. GS uses:
# F5 - Deinterlace modes
# PAGE_UP - FXAA antialiasing (HW and SW)
# PAGE_DOWN - Cycles through dither modes (HW)
# PAGE_DOWN - Cycles through dither modes (HW)
# DELETE - Software Antialiasing (AA1)
# HOME - FX shader
# INSERT - Hardware mipmapping

File diff suppressed because one or more lines are too long

View File

@ -2,57 +2,57 @@
†---------------------†
Disassembly view:
†---------------------†
Ctrl + G Goto
Ctrl + E Edit Breakpoint
Ctrl + D Enable/disable breakpoint
Ctrl + B Add breakpoint
Left Go back one branch level/goto pc
Right Follow branch/position memory view to accessed address
Up Move cursor up one line
Down Move cursor down one line
Page Up Move visible area up one page
Page Down Move visible area down one page
F10 Step over
F11 Step into
Tab Toggle display symbols
Left Click Select line/toggle breakpoint if line is already highlighted
Right Click Open context menu
†---------------------†
Ctrl + G Goto
Ctrl + E Edit Breakpoint
Ctrl + D Enable/disable breakpoint
Ctrl + B Add breakpoint
Left Go back one branch level/goto pc
Right Follow branch/position memory view to accessed address
Up Move cursor up one line
Down Move cursor down one line
Page Up Move visible area up one page
Page Down Move visible area down one page
F10 Step over
F11 Step into
Tab Toggle display symbols
Left Click Select line/toggle breakpoint if line is already highlighted
Right Click Open context menu
†---------------------†
Memory View:
†---------------------†
Ctrl + G Goto
Ctrl + B Add breakpoint
Left Move cursor back one byte/nibble
Right Move cursor ahead one byte/nibble
Up Move cursor up one line
Down Move cursor down one line
Page Up Move cursor up one page
Page Down Move cursor down one page
0-9,A-F Overwrite hex nibble
Any Overwrite ansi byte
Left Click Select byte/nibble
Right Click Open context menu
Ctrl+Wheel Zoom memory view
Esc Return to previous goto address
Ctrl+V Paste a hex string into memory
†---------------------†
Ctrl + G Goto
Ctrl + B Add breakpoint
Left Move cursor back one byte/nibble
Right Move cursor ahead one byte/nibble
Up Move cursor up one line
Down Move cursor down one line
Page Up Move cursor up one page
Page Down Move cursor down one page
0-9,A-F Overwrite hex nibble
Any Overwrite ansi byte
Left Click Select byte/nibble
Right Click Open context menu
Ctrl+Wheel Zoom memory view
Esc Return to previous goto address
Ctrl+V Paste a hex string into memory
†---------------------†
Breakpoint List:
†---------------------†
Up Select previous item
Down Select next item
Delete Remove selected breakpoint
Return Edit selected breakpoint
Space Toggle enable state of selected breakpoint
Up Select previous item
Down Select next item
Delete Remove selected breakpoint
Return Edit selected breakpoint
Space Toggle enable state of selected breakpoint
†---------------------†
†---------------------†

View File

@ -4056,6 +4056,8 @@ SCES-53931:
name: "Shinobido - Way of the Ninja"
region: "PAL-M5"
compat: 5
clampModes:
eeClampMode: 3 # Fixes hang going in to the gardens.
SCES-53950:
name: "F1 '06"
region: "PAL-M7"
@ -5120,7 +5122,7 @@ SCKA-20072:
region: "NTSC-K"
SCKA-20073:
name: "Final Fantasy XII"
region: "NTSC-J"
region: "NTSC-K"
SCKA-20078:
name: "Killzone [PlayStation 2 Big Hit Series]"
region: "NTSC-K"
@ -17622,8 +17624,6 @@ SLES-53702:
name: "Resident Evil 4"
region: "PAL-M5"
compat: 5
gameFixes:
- BlitInternalFPSHack # Fixes internal FPS detection.
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
SLES-53703:
@ -17824,8 +17824,6 @@ SLES-53755:
SLES-53756:
name: "Resident Evil 4"
region: "PAL-M5"
gameFixes:
- BlitInternalFPSHack # Fixes internal FPS detection.
gsHWFixes:
halfPixelOffset: 2 # Fixes blurriness.
SLES-53758:
@ -20269,21 +20267,29 @@ SLES-54778:
region: "PAL-E"
gsHWFixes:
mipmap: 1
halfPixelOffset: 1 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-54779:
name: "Harry Potter and the Order of the Phoenix"
region: "PAL-M5"
gsHWFixes:
mipmap: 1
halfPixelOffset: 1 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-54780:
name: "Harry Potter and the Order of the Phoenix"
region: "PAL-M6"
gsHWFixes:
mipmap: 1
halfPixelOffset: 1 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-54781:
name: "Harry Potter and the Order of the Phoenix"
region: "PAL-M5"
gsHWFixes:
mipmap: 1
halfPixelOffset: 1 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-54782:
name: "Obscure 2"
region: "PAL-M5"
@ -22659,7 +22665,7 @@ SLKA-25013:
- "SLKA-25012"
SLKA-25014:
name: "Evolution Snowboarding"
region: "NTSC-J"
region: "NTSC-K"
SLKA-25015:
name: "Evolution Skateboarding"
region: "NTSC-K"
@ -22668,10 +22674,10 @@ SLKA-25018:
region: "NTSC-K"
SLKA-25021:
name: "Shinobi"
region: "NTSC-M3"
region: "NTSC-K"
compat: 5
SLKA-25024:
name: "Disneys Stitch - Experiment 626"
name: "Disney's Stitch - Experiment 626"
region: "NTSC-K"
SLKA-25026:
name: "Chaos Legion"
@ -22817,7 +22823,7 @@ SLKA-25067:
region: "NTSC-K"
SLKA-25070:
name: "Guilty Gear XX Reload - The Midnight Carnival"
region: "NTSC-J-K"
region: "NTSC-K"
SLKA-25071:
name: "Tantei Jinguji Saburo 8 Innocent Black"
region: "NTSC-K"
@ -22876,7 +22882,7 @@ SLKA-25086:
vuClampMode: 2 # Missing geometry with microVU.
SLKA-25087:
name: "FIFA Soccer 2004"
region: "NTSC-J"
region: "NTSC-K"
compat: 5
clampModes:
vuClampMode: 2 # Missing geometry with microVU.
@ -23340,7 +23346,7 @@ SLKA-25262:
region: "NTSC-K"
SLKA-25263:
name: "NanoBreaker"
region: "NTSC-J"
region: "NTSC-K"
compat: 5
SLKA-25264:
name: "Full Spectrum Warrior"
@ -27255,7 +27261,7 @@ SLPM-65139:
region: "NTSC-J"
compat: 5
SLPM-65140:
name: "Jojo's Bizarre Adventure 5"
name: "Jojo no Kimyou na Bouken - Ougon no Kaze"
region: "NTSC-J"
SLPM-65141:
name: "Tsuzuse Gareijiri"
@ -30459,6 +30465,8 @@ SLPM-66091:
name: "Shinobido Imashime"
region: "NTSC-J"
compat: 5
clampModes:
eeClampMode: 3 # Fixes hang going in to the gardens.
SLPM-66092:
name: "Taito Memories Gekan"
region: "NTSC-J"
@ -32194,6 +32202,8 @@ SLPM-66555:
SLPM-66556:
name: "Shinobido Imashime [Spike The Best]"
region: "NTSC-J"
clampModes:
eeClampMode: 3 # Fixes hang going in to the gardens.
SLPM-66557:
name: "FIFA Street [EA Best Hits]"
region: "NTSC-J"
@ -33417,6 +33427,8 @@ SLPM-66886:
region: "NTSC-J"
gsHWFixes:
mipmap: 1
halfPixelOffset: 1 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLPM-66887:
name: "Harukanaru Jikuu no Kade 3 - Unmei no Meikyuu [Koei the Best]"
region: "NTSC-J"
@ -36914,6 +36926,8 @@ SLPS-25352:
name: "Espgaluda"
region: "NTSC-J"
compat: 5
gsHWFixes:
texturePreloading: 1 # Performs much better with partial preload.
SLPS-25353:
name: "Xenosaga Freaks"
region: "NTSC-J"
@ -44398,6 +44412,8 @@ SLUS-21035:
region: "NTSC-U"
clampModes:
eeClampMode: 2 # Fixes hang when the baseball hits the ground.
gsHWFixes:
texturePreloading: 1 # Performs much better and stops freezing and or stuttering.
patches:
2243CE1D:
content: |-
@ -45915,6 +45931,8 @@ SLUS-21324:
region: "NTSC-U"
clampModes:
eeClampMode: 2 # Fixes hang when the baseball hits the ground.
gsHWFixes:
texturePreloading: 1 # Performs much better and stops freezing and or stuttering.
patches:
D592B291:
content: |-
@ -47354,6 +47372,8 @@ SLUS-21619:
compat: 5
gsHWFixes:
mipmap: 1
halfPixelOffset: 1 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLUS-21620:
name: "NCAA Football '08"
region: "NTSC-U"

View File

@ -67,8 +67,8 @@
03000000c82d00000160000000000000,8BitDo SN30 Pro,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000161000000000000,8BitDo SN30 Pro,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000121000000000000,8BitDo SN30 Pro for Android,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,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00000260000000000000,8BitDo SN30 Pro+,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000261000000000000,8BitDo SN30 Pro+,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000260000000000000,8BitDo SN30 Pro Plus,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00000261000000000000,8BitDo SN30 Pro Plus,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Windows,
03000000c82d00001130000000000000,8BitDo Ultimate Wired,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,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00001230000000000000,8BitDo Ultimate Wireless,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,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
03000000c82d00001330000000000000,8BitDo Ultimate Wireless,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,rightstick:b14,righttrigger:b9,rightx:a3,righty:a4,start:b11,x:b3,y:b4,platform:Windows,
@ -795,8 +795,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00004028000000010000,8BitDo SN30,a:b1,b:b0,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000160000001000000,8BitDo SN30 Pro,a:b1,b:b0,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b13,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a5,rightx:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000161000000010000,8BitDo SN30 Pro,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:a2,righty:a5,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000260000001000000,8BitDo SN30 Pro+,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000261000000010000,8BitDo SN30 Pro+,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000260000001000000,8BitDo SN30 Pro Plus,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00000261000000010000,8BitDo SN30 Pro Plus,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Mac OS X,
03000000c82d00001130000000020000,8BitDo Ultimate Wired,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:Mac OS X,
03000000c82d00001330000001000000,8BitDo Ultimate Wireless,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:Mac OS X,
03000000a00500003232000008010000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Mac OS X,
@ -866,9 +866,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000006d0400001fc2000000000000,Logitech F710,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000006d04000018c2000000010000,Logitech RumblePad 2,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3~,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700005032000000010000,Mad Catz PS3 Fightpad Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700008433000000010000,Mad Catz PS3 Fightstick TE S+,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700008433000000010000,Mad Catz PS3 Fightstick TE S Plus,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700005082000000010000,Mad Catz PS4 Fightpad Pro,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Mac OS X,
03000000380700008483000000010000,Mad Catz PS4 Fightstick TE S+,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,
03000000380700008483000000010000,Mad Catz PS4 Fightstick TE S Plus,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,
03000000790000000600000007010000,Marvo GT-004,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,
030000008f0e00001330000011010000,Mayflash Controller Adapter,a:b2,b:b4,back:b16,dpdown:h0.8,dpleft:h0.2,dpright:h0.1,dpup:h0.4,leftshoulder:b12,lefttrigger:b16,leftx:a0,lefty:a2,rightshoulder:b14,rightx:a6~,righty:a4,start:b18,x:b0,y:b6,platform:Mac OS X,
03000000790000004318000000010000,Mayflash GameCube Adapter,a:b4,b:b0,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,lefttrigger:a12,leftx:a0,lefty:a4,rightshoulder:b28,righttrigger:a16,rightx:a20,righty:a8,start:b36,x:b8,y:b12,platform:Mac OS X,
@ -949,7 +949,6 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000381000002014000001000000,SteelSeries Nimbus,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,guide:b12,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,x:b2,y:b3,platform:Mac OS X,
05000000484944204465766963650000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X,
050000004e696d6275732b0000000000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X,
050000004e696d6275732b008b000000,SteelSeries Nimbus Plus,a:b0,b:b1,back:b15,dpdown:b11,dpleft:b13,dpright:b12,dpup:b10,guide:b16,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3~,start:b14,x:b2,y:b3,platform:Mac OS X,
03000000381000003014000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000381000003114000000000000,SteelSeries Stratus Duo,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
03000000110100001714000000000000,SteelSeries Stratus XL,a:b0,b:b1,dpdown:b9,dpleft:b11,dpright:b10,dpup:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1~,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3~,start:b12,x:b2,y:b3,platform:Mac OS X,
@ -1042,8 +1041,9 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c82d00001290000011010000,8BitDo SN30 Pro,a:b1,b:b0,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:a3,righty:a4,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00000161000000010000,8BitDo SN30 Pro,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00006228000000010000,8BitDo SN30 Pro,a:b1,b:b0,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:b4,y:b3,platform:Linux,
03000000c82d00000260000011010000,8BitDo SN30 Pro+,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00000261000000010000,8BitDo SN30 Pro+,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00000260000011010000,8BitDo SN30 Pro Plus,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
05000000c82d00000261000000010000,8BitDo SN30 Pro Plus,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:a2,righty:a3,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00001030000011010000,8BitDo 8BitDo Pro 2,a:b1,b:b0,x:b4,y:b3,back:b10,guide:b12,start:b11,leftstick:b13,rightstick:b14,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a5,righttrigger:a4,platform:Linux,
05000000202800000900000000010000,8BitDo SNES30,a:b1,b:b0,back:b10,dpdown:b122,dpleft:b119,dpright:b120,dpup:b117,leftshoulder:b6,rightshoulder:b7,start:b11,x:b4,y:b3,platform:Linux,
03000000c82d00001130000011010000,8BitDo Ultimate Wired,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,
03000000c82d00001230000011010000,8BitDo Ultimate Wireless,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

@ -21,14 +21,14 @@ uniform uvec4 const1;
uniform ivec2 srcOffset;
layout(binding=0) uniform sampler2D imgSrc;
layout(binding=0, rgba8) uniform writeonly image2D imgDst;
layout(binding=0, rgba8) uniform writeonly image2D imgDst;
#define A_GPU 1
#define A_GLSL 1
#include "ffx_a.h"
AF3 CasLoad(ASU2 p)
AF3 CasLoad(ASU2 p)
{
return texelFetch(imgSrc, srcOffset + ivec2(p), 0).rgb;
}

View File

@ -49,7 +49,7 @@ void ps_main3()
{
// We take half the lines from the current frame and stores them in the MAD frame buffer.
// the MAD frame buffer is split in 2 consecutive banks of 2 fields each, the fields in each bank
// are interleaved (top field at even lines and bottom field at odd lines).
// are interleaved (top field at even lines and bottom field at odd lines).
// When the source texture has an odd vres, the first line of bank 1 would be an odd index
// causing the wrong lines to be discarded, so a vertical offset (lofs) is added to the vertical
// position of the destination texture to force the proper field alignment
@ -154,7 +154,7 @@ void ps_main4()
// selecting deinterlacing output
if ((vpos & 1) == field)
{
// output coordinate present on current field

View File

@ -955,7 +955,7 @@ void ps_main()
#if PS_ZCLAMP
gl_FragDepth = min(gl_FragCoord.z, MaxDepthPS);
#endif
#endif
}
#endif

View File

@ -27,7 +27,7 @@ layout(push_constant) uniform const_buffer
};
layout(set=0, binding=0) uniform texture2D imgSrc;
layout(set=0, binding=1, rgba8) uniform writeonly image2D imgDst;
layout(set=0, binding=1, rgba8) uniform writeonly image2D imgDst;
layout(constant_id=0) const int sharpenOnly = 0;
#define A_GPU 1
@ -35,7 +35,7 @@ layout(constant_id=0) const int sharpenOnly = 0;
#include "ffx_a.h"
AF3 CasLoad(ASU2 p)
AF3 CasLoad(ASU2 p)
{
return texelFetch(imgSrc, srcOffset + ivec2(p), 0).rgb;
}

View File

@ -52,7 +52,7 @@ void ps_depth_copy()
void ps_filter_transparency()
{
vec4 c = sample_c(v_tex);
c.a = dot(c.rgb, vec3(0.299, 0.587, 0.114));
o_col0 = c;
@ -339,7 +339,7 @@ void ps_yuv()
void main()
{
o_col0 = vec4(0x7FFFFFFF);
#ifdef ps_stencil_image_init_0
if((127.5f / 255.0f) < sample_c(v_tex).a) // < 0x80 pass (== 0x80 should not pass)
o_col0 = vec4(-1);
@ -351,4 +351,4 @@ void main()
}
#endif
#endif
#endif

View File

@ -71,7 +71,7 @@ void ps_main3()
{
// We take half the lines from the current frame and stores them in the MAD frame buffer.
// the MAD frame buffer is split in 2 consecutive banks of 2 fields each, the fields in each bank
// are interleaved (top field at even lines and bottom field at odd lines).
// are interleaved (top field at even lines and bottom field at odd lines).
// When the source texture has an odd vres, the first line of bank 1 would be an odd index
// causing the wrong lines to be discarded, so a vertical offset (lofs) is added to the vertical
// position of the destination texture to force the proper field alignment

View File

@ -99,7 +99,7 @@ void ps_filter_complex() // triangular
{
const float PI = 3.14159265359f;
vec2 texdim = vec2(textureSize(samp0, 0));
o_col0 = (0.9 - 0.4 * cos(2 * PI * v_tex.y * texdim.y)) * sample_c(vec2(v_tex.x, (floor(v_tex.y * texdim.y) + 0.5) / texdim.y));
}
#endif
@ -360,4 +360,4 @@ void ps_filter_lottes()
#endif
#endif
#endif

View File

@ -97,7 +97,7 @@ layout(location = 0) in VSOutput
vec4 c;
#else
flat vec4 c;
#endif
#endif
} gsIn[];
layout(location = 0) out GSOutput

File diff suppressed because it is too large Load Diff

View File

@ -1,195 +0,0 @@
/*===============================================================================*\
|######################## [GSdx FX Suite v2.40] ########################|
|########################## By Asmodean ##########################|
|| ||
|| This program is free software; you can redistribute it and/or ||
|| modify it under the terms of the GNU General Public License ||
|| as published by the Free Software Foundation; either version 2 ||
|| of the License, or (at your option) any later version. ||
|| ||
|| This program is distributed in the hope that it will be useful, ||
|| but WITHOUT ANY WARRANTY; without even the implied warranty of ||
|| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ||
|| GNU General Public License for more details. (c)2016 ||
|| ||
|#################################################################################|
\*===============================================================================*/
//#NOTICE: GSdx FX is not compatible with GSdx9. Use GSdx OGL or DX10/11.
/*------------------------------------------------------------------------------
[DEFINITIONS & ON/OFF OPTIONS]
------------------------------------------------------------------------------*/
//--------------------------#[CHOOSE EFFECTS]#--------------------------------\\
//#[ANTIALIASING TECHNIQUES] [1=ON|0=OFF] #READ: For best results: Use gsdx fx antialiasing OR filtering. Not both together.
#define UHQ_FXAA 0 //# High Quality Fast Approximate Anti Aliasing. If GSdx's internal FXAA is also enabled, this equals FXAA2x.[3D]
//#[FS SCALING TECHNIQUES] [1=ON|0=OFF] #READ: For best results: Only enable one type of filtering at one time. Use post antialiasing OR FS filtering, not both.
#define BILINEAR_FILTERING 0 //# Bilinear Fullscreen Texture Filtering. BiLinear filtering - light to medium filtering of textures.[2D]
#define BICUBIC_FILTERING 0 //# Bicubic Fullscreen Texture Filtering. BiCubic filtering - medium to strong filtering of textures.[2D]
#define GAUSSIAN_FILTERING 0 //# Gaussian Fullscreen Texture Filtering. Gaussian filtering - strong to extra strong filtering of textures.[2D]
#define BICUBLIC_SCALER 0 //# Bicubic Interpolation Scaling. Uses BCS on up scaling, and downsampling of games, for smoother scaling.
#define LANCZOS_SCALER 0 //# Lanczos Interpolation Scaling. Uses Lanczos on up scaling, and downsampling of games for smoother scaling.
//#[LIGHTING & COLOUR] [1=ON|0=OFF] #READ: These can all be turned on & off independently of each other. [For High Dynamic Range(HDR) use Bloom & Tonemapping together]
#define BLENDED_BLOOM 1 //# High Quality SP Bloom. Soft lighting with blending techniques, for a natural looking bloom.
#define SCENE_TONEMAPPING 1 //# HDR Scene Tonemapping. Layered component conversion, and applies scene tone mapping.
#define COLOR_CORRECTION 0 //# Component Color Correction. Colorspace conversion, with correction curves, and multiple palette types.
#define CROSS_PROCESSING 0 //# Filmic Cross Processing. Alters the tone of the scene, crossing the game's color set, with another.
#define GAMMA_CORRECTION 0 //# RGB Gamma Correction. Fixed expansion to variable compression gamma correction curve.
#define PIXEL_VIBRANCE 0 //# Pixel Vibrance. Intelligently adjusts pixel vibrance depending on original color saturation.
#define COLOR_GRADING 0 //# Post-Complement Colour Grading. Alters individual colour components on a scene, to enhance selected colour tones.
#define TEXTURE_SHARPEN 0 //# Bicubic Texture Unsharpen Mask. Looks similar to a negative texture LOD bias. Enhances texture fidelity.
#define CURVE_CONTRAST 0 //# S-Curve Scene Contrast Enhancement. Locally adjusts contrast using a four-point cubic bezier spline.
#define CEL_SHADING 0 //# PX Cel Shading. Simulates the look of animation/toon. Typically best suited for animated style games.
#define PAINT_SHADING 0 //# Paint Shading. Creates the effect of a painted scene. Adapted from ENB series, it's pretty performance heavy.
#define COLOR_TEMPERATURE 0 //# White Point Temperature. Changes the temperature of the image from D65 white point reference.
//#[TV EMU TECHNIQUES] [1=ON|0=OFF] #READ: These can all be turned on & off independently of each other. These effects are typically used to simulated older TVs/CRT etc.
#define LOTTES_CRT 0 //# Timothy Lottes CRT emulation effect. Similar to scanlines, but with more control options. Ported by request.
#define SCANLINES 0 //# Scanlines to simulate the look of a CRT TV. Typically suited to sprite games. Note: Works best at Native Res.
#define VIGNETTE 0 //# Darkens the edges of the screen, to make it look more like it was shot with a camera lens.
#define DEBANDING 0 //# Applies a debanding effect, to minimize banding artifacts. Which is usually very prevalent in skyboxes (for example).
#define SP_DITHERING 0 //# Subpixel Dithering to simulate more colors than your monitor can display. Smoothes gradiants, this can reduce color banding.
#define PX_BORDER 0 //# Creates a pixel border, as a workaround for the bright edge that using hardware antialiasing(MSAA) can cause. (Ported by request from SFX).
/*------------------------------------------------------------------------------
[EFFECT CONFIG OPTIONS]
------------------------------------------------------------------------------*/
//##[UHQ_FXAA]
#define FxaaSubpixMax 0.00 //[0.00 to 1.00] Amount of subpixel aliasing removal. Higher values: softer. Lower values: sharper. 0.00: Edge only.
#define FxaaQuality 4 //[1|2|3|4] Overall Fxaa quality preset (pixel coverage). 1: Low, 2: Medium, 3: High, 4: Ultra.
#define FxaaEarlyExit 1 //[0 or 1] Use Fxaa early exit pathing. When enabled: Only luma edge pixels are antialiased. When disabled: the entire scene is antialiased(FSAA).
//##[BILINEAR_FILTERING]
#define FilterStrength 1.00 //[0.10 to 1.50] Bilinear filtering strength. Controls the overall strength of the filtering.
#define OffsetAmount 0.0 //[0.0 to 1.5] Pixel offset amount. If you want to use an st offset, 0.5 is generally recommended. 0.0 is off.
//##[BICUBIC_FILTERING]
#define Interpolation Triangular //[CatMullRom, Bell, BSpline, Triangular, Cubic] Type of interpolation to use. From left to right is lighter<-->stronger filtering.
#define BicubicStrength 0.75 //[0.10 to 1.50] Bicubic filtering strength. Controls the overall strength of the filtering.
#define PixelOffset 0.0 //[0.0 to 1.5] Pixel offset amount. If you want to use an st offset, 0.5 is generally recommended. 0.0 is off.
//##[GAUSSIAN_FILTERING]
#define FilterAmount 1.00 //[0.10 to 1.50] Gaussian filtering strength. Controls the overall strength of the filtering.
#define GaussianSpread 0.75 //[0.50 to 4.00] The filtering spread & offset levels. Controls the sampling spread of the filtering.
//##[BLENDED BLOOM]
#define BloomType BlendGlow //[BlendGlow, BlendAddGlow, BlendAddLight, BlendScreen, BlendLuma, BlendOverlay] The type of blended bloom. Light<->Dark.
#define BloomStrength 0.220 //[0.000 to 1.000] Overall strength of the bloom. You may want to readjust for each blend type.
#define BlendStrength 1.000 //[0.000 to 1.000] Strength of the blending. This is a modifier based on bloom. 1.0 equates to 100% strength.
#define BloomDefocus 2.000 //[1.000 to 4.000] The initial bloom defocus value. Increases the softness of light, bright objects, etc.
#define BloomWidth 3.200 //[1.000 to 8.000] Width of the bloom. Adjusts the width of the spread and soft glow. Scales with BloomStrength.
#define BloomReds 0.040 //[0.000 to 1.000] Red channel correction of the bloom. Raising will increase the bloom of reds.
#define BloomGreens 0.030 //[0.000 to 1.000] Green channel correction of the bloom. Raising will increase the bloom of greens.
#define BloomBlues 0.020 //[0.000 to 1.000] Blue channel correction of the bloom. Raising will increase the bloom of blues.
//##[SCENE TONEMAPPING]
#define TonemapType 1 //[0|1|2|3] The base tone mapping operator. 0 is LDR, 1 is HDR(original), 2 & 3 are Filmic HDR(slight grading).
#define TonemapMask 0 //[0 or 1] Enables an ALU tone masking curve. Produces a nice cinematic look. Suits some games more than others.
#define MaskStrength 0.25 //[0.000 to 1.000] Strength of the tone masking. Higher for a stronger effect. This is a dependency of TonemapMask.
#define ToneAmount 0.300 //[0.050 to 1.000] Tonemap strength (tone correction). Higher for stronger tone mapping, lower for lighter.
#define BlackLevels 0.060 //[0.000 to 1.000] Black level balance (shadow correction). Increase to deepen blacks, lower to lighten them.
#define Exposure 1.000 //[0.100 to 2.000] White correction (brightness). Higher values for more scene exposure, lower for less.
#define Luminance 1.000 //[0.100 to 2.000] Luminance average (luminance correction). Higher values will lower scene luminance average.
#define WhitePoint 1.000 //[0.100 to 2.000] Whitepoint average (wp lum correction). Higher values will lower the maximum scene white point.
//##[COLOR CORRECTION]
#define CorrectionPalette 1 //[1|2|3|4|5] The colorspace palette type. 1: RGB, 2: YXY, 3: XYZ, 4: HSV, 5: YUV. Each one will produce a different combination of shades & hues.
#define ChannelR 1.20 //[0.00 to 8.00] R(1), Y(2), X(3), H(4), Y(5) component channel varies with the colorspace used. Higher values increase correction strength.
#define ChannelG 1.60 //[0.00 to 8.00] G(1), X(2), Y(3), S(4), U(5) component channel varies with the colorspace used. Higher values increase correction strength.
#define ChannelB 1.80 //[0.00 to 8.00] B(1), Y(2), Z(3), V(4), V(5) component channel varies with the colorspace used. Higher values increase correction strength.
#define PaletteStrength 2.00 //[0.00 to 4.00] The interpolated strength ratio between the base color, and the corrected color. Raise to increase saturation.
//##[CROSS PROCESSING]
#define FilmicProcess 1 //[1|2|3] The color conversion type for the cross process. 1: cool, 2: warm, 3: dusk. You can achieve different results with each.
#define RedShift 0.50 //[0.10 to 1.00] Red color component shift of the filmic processing. Alters the red balance of the shift.
#define GreenShift 0.50 //[0.10 to 1.00] Green color component shift of the filmic processing. Alters the green balance of the shift.
#define BlueShift 0.50 //[0.10 to 1.00] Blue color component shift of the filmic processing. Alters the blue balance of the shift.
#define ShiftRatio 0.50 //[0.10 to 2.00] The blending ratio for the base color and the color shift. Higher for a stronger effect.
//##[TEXTURE SHARPEN]
#define SharpenStrength 0.75 //[0.10 to 2.00] Strength of the texture sharpening effect. This is the maximum strength that will be used.
#define SharpenClamp 0.015 //[0.005 to 0.500] Reduces the clamping/limiting on the maximum amount of sharpening each pixel recieves. Raise this to reduce the clamping.
#define SharpenBias 1.20 //[0.50 to 4.00] Sharpening edge bias. Lower values for clean subtle sharpen, and higher values for a deeper textured sharpen.
#define DebugSharpen 0 //[0 or 1] Visualize the sharpening effect. Useful for fine-tuning. Best to disable other effects, to see edge detection clearly.
//##[PIXEL VIBRANCE]
#define Vibrance 0.10 //[-1.00 to 1.00] Overall vibrance strength. Locally adjusts the vibrance of pixels depending on their original saturation.
#define RedVibrance 1.00 //[-8.00 to 8.00] Red channel coefficient of the vibrance strength. Adjusting the vibrance of the red channel independently.
#define GreenVibrance 1.00 //[-8.00 to 8.00] Green channel coefficient of the vibrance strength. Adjusting the vibrance of the green channel independently.
#define BlueVibrance 1.00 //[-8.00 to 8.00] Blue channel coefficient of the vibrance strength. Adjusting the vibrance of the blue channel independently.
//##[COLOR_GRADING]
#define RedGrading 1.20 //[0.00 to 3.00] Red colour grading coefficient. Adjust to influence the red channel coefficients of the grading, and highlight tones.
#define GreenGrading 1.10 //[0.00 to 3.00] Green colour grading coefficient. Adjust to influence the Green channel coefficients of the grading, and highlight tones.
#define BlueGrading 1.10 //[0.00 to 3.00] Blue colour grading coefficient. Adjust to influence the Blue channel coefficients of the grading, and highlight tones.
#define GradingStrength 0.25 //[0.00 to 1.00] The overall max strength of the colour grading effect. Raise to increase, lower to decrease the amount.
#define Correlation 1.00 //[0.10 to 1.00] Correlation between the base colour, and the grading influence. Lower = more of the scene is graded, Higher = less of the scene is graded.
//##[COLOR TEMPERATURE]
#define White_Point 6500.0 //[2000.0 to 12000.0] Temperature value given in Kelvin. A typical CRT has a target white point temperature of D93 (9300K)
//##[CEL SHADING]
#define EdgeStrength 1.00 //[0.00 to 4.00] Overall strength of the cel edge outline effect. Affects the overall density. 0.00: no outlines.
#define EdgeFilter 0.75 //[0.10 to 2.00] Filters out fainter cel edges. Use it for balancing the cel edge density. EG: for faces, foliage, etc.
#define EdgeThickness 1.20 //[0.50 to 2.00] Thickness of the cel edges. Increase for thicker outlining. Note: when downsampling, raise this to keep the same thickness.
#define UseYuvLuma 0 //[0 or 1] Uses YUV luma calculations, or base color luma calculations. Yuv luma can produce a better shaded look.
#define ColorRounding 0 //[0 or 1] Uses rounding methods on colors. This can emphasise shaded toon colors. Looks good in some games, and odd in others.
//##[PAINT SHADING]
#define PaintMethod 2 //[1 or 2] The algorithm used for paint effect. 1: water painting, 2: oil painting. You may want to readjust the radius between the two.
#define PaintRadius 4 //[2 to 8] Radius of the painted effect, increasing the radius also requires longer loops, so higher values require more performance.
#define PaintStrength 1.00 //[0.00 to 1.00] The overall interpolated strength of the paint effect. Where 1.0 equates to 100% strength.
//##[CURVE_CONTRAST]
#define CurveType 0 //[0|1|2] Choose what to apply contrast to. 0 = Luma, 1 = Chroma, 2 = both Luma and Chroma. Default is 0 (Luma)
#define CurvesContrast 0.35 //[0.00 to 2.00] The amount of contrast you want. Controls the overall strength of the texture sharpening.
//##[GAMMA_CORRECTION]
#define Gamma 2.20 //[1.5 to 4.0] Gamma correction. Decrease for lower gamma(darker). Increase for higher gamma(brighter). (Default: 2.2)
//##[LOTTES_CRT]
#define MaskingType 1 //[1|2|3|4] The type of CRT shadow masking used. 1: compressed TV style, 2: Aperture-grille, 3: Stretched VGA style, 4: VGA style.
#define CRTSizeX 512.0 //[128 to 2048] A workaround for arbitrary render target scaling. Either set it to a fixed width, or set it to screenSize.x
#define CRTSizeY 448.0 //[128 to 2048] A workaround for arbitrary render target scaling. Either set it to a fixed height, or set it to screenSize.y
#define ScanBrightness -8.00 //[-16.0 to 1.0] The overall brightness of the scanline effect. Lower for darker, higher for brighter.
#define FilterCRTAmount -1.00 //[-4.0 to 1.0] The amount of filtering used, to replicate the TV CRT look. Lower for less, higher for more.
#define HorizontalWarp 0.00 //[0.0 to 0.1] The distortion warping effect for the horizontal (x) axis of the screen. Use small increments.
#define VerticalWarp 0.00 //[0.0 to 0.1] The distortion warping effect for the verticle (y) axis of the screen. Use small increments.
#define MaskAmountDark 0.80 //[0.0 to 1.0] The value of the dark masking line effect used. Lower for darker lower end masking, higher for brighter.
#define MaskAmountLight 1.50 //[0.0 to 2.0] The value of the light masking line effect used. Lower for darker higher end masking, higher for brighter.
#define ResolutionScale 2.00 //[0.1 to 4.0] The scale of the image resolution. Lowering this can give off a nice retro TV look. Raising it can clear up the image.
#define MaskResolutionScale 0.80 //[0.1 to 2.0] The scale of the CRT mask resolution. Use this for balancing the scanline mask scale for difference resolution scaling.
#define UseShadowMask 1 //[0 or 1] Enables, or disables the use of the CRT shadow mask. 0 is disabled, 1 is enabled.
//##[SCANLINES]
#define ScanlineType 0 //[0|1|2] The type & orientation of the scanlines. 0 is x(horizontal), 1 is y(vertical), 2 is both(xy)
#define ScanlineScale 0.50 //[0.20 to 2.00] The scaling & thickness of the scanlines. Changing this can help with PCSX2 IR scaling problems.
#define ScanlineIntensity 0.18 //[0.10 to 1.00] The intensity of the scanlines. Defaults: 0.18 for ScanlineType 0|1|2, 0.50 for ScanlineType 3.
#define ScanlineBrightness 1.02 //[0.50 to 2.00] The brightness of the scanlines. Defaults: 2.00 for ScanlineType 0|1|2, 1.50 for ScanlineType 3.
//##[VIGNETTE]
#define VignetteRatio 1.77 //[0.15 to 6.00] Sets the espect ratio of the vignette. 1.77 for 16:9, 1.60 for 16:10, 1.33 for 4:3, 1.00 for 1:1.
#define VignetteRadius 1.10 //[0.50 to 3.00] Radius of the vignette effect. Lower values for stronger radial effect from center
#define VignetteAmount 0.25 //[0.00 to 1.00] Strength of black edge occlusion. Increase for higher strength, decrease for lower.
#define VignetteSlope 12 //[2|4|8|10|12|16] How far away from the center the vignetting will start.
//##[SUBPIXEL DITHERING]
#define DitherMethod 2 //[1 or 2] 1: Ordered grid dithering(faster), 2: random dithering(higher quality). Hardware dithering is also enabled by default.
#define ShowMethod 0 //[0 or 1] Shows the dithering method, based of the type of dithering selected. Useful for debugging, and confirmation of working order.
//##[DEBANDING]
#define DebandRadius 32.0 //[0.0 to 1024.0] Sampling radius, higher values will reduce further banding but might also reduce details.
#define DebandThreshold 0.017 //[0.000 to 0.100] Threshold, higher values will reduce further banding but might also reduce details and increase noise.
#define DebandSampleCount 4 //[1 to 8] Sample count, higher values are better. But also have a higher performance cost.
#define DebandOffsetMode 3 //[1|2|3] 1 = cross (axis aligned, fast), 2 = diagonal (45 degrees, slower), 3 = box (fully random, slower).
#define DebandDithering 1 //[0|1|2|3] Additional dithering options to smoothen the output. 0 = No dithering 1 = Ordered dithering, 2 = Random dithering, 3 = Iestyn's RGB dither (Valve).
//##[PX_BORDER]
#define BorderWidth float2(2, 2) //[0 to 2048, 0 to 2048] (X,Y)-width of the border. Measured in pixels.
#define BorderColor float3(0, 0, 0) //[0 to 255, 0 to 255, 0 to 255] What color the border should be. In integer RGB colors, meaning 0,0,0 is black and 255,255,255 is full white.
//[END OF USER OPTIONS]

View File

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="ReleaseAll" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Add all the solutions here. -->
<ItemGroup>
<SolutionSet Include="$(MSBuildProjectDirectory)\PCSX2_suite.sln" />
<!--SolutionSet Include="$(MSBuildProjectDirectory)\old_plugins.sln" /-->
<ProjectSetCPU Include="$(MSBuildProjectDirectory)\PCSX2_suite.sln" />
</ItemGroup>
<!-- Add common build properties here. -->
<PropertyGroup>
<CreateHardLinksIfPossible>true</CreateHardLinksIfPossible>
<CompileFastPlz>BuildInParallel=True;
CreateHardLinksForCopyFilesToOutputDirectoryIfPossible=$(CreateHardLinksIfPossible);
CreateHardLinksForCopyAdditionalFilesIfPossible=$(CreateHardLinksIfPossible);
CreateHardLinksForCopyLocalIfPossible=$(CreateHardLinksIfPossible);
CreateHardLinksForPublishFilesIfPossible=$(CreateHardLinksIfPossible);
</CompileFastPlz>
</PropertyGroup>
<PropertyGroup>
<RetainDebuggingArtifacts Condition="'$(RetainDebuggingArtifacts)' == ''">false</RetainDebuggingArtifacts>
</PropertyGroup>
<!-- Add all the custom targets here. -->
<Target Name="CleanBloat" AfterTargets="InternalBuild" Condition="'$(RetainDebuggingArtifacts)' == 'false'">
<ItemGroup>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.bsc"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.exp"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.ilk"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.iobj"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.ipdb"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.lib"/>
<BloatToDelete Include="$(MSBuildProjectDirectory)\bin\**\*.pdb"/>
</ItemGroup>
<Delete Files="@(BloatToDelete)" />
</Target>
<Target Name="CleanCruft">
<ItemGroup>
<CruftToDelete Include="$(MSBuildProjectDirectory)\**\svnrev.h"/>
<CruftToDelete Include="$(MSBuildProjectDirectory)\**\*.CppClean.log" />
</ItemGroup>
<Delete Files="@(CruftToDelete)" />
</Target>
<Target Name="InternalBuild" AfterTargets="DebugAll;DevelAll;ReleaseAll">
<MSBuild Projects="@(SolutionSet)" BuildInParallel="false" Properties="Configuration=$(BaseConfiguration)" Targets="Clean" />
<MSBuild Projects="@(ProjectSetCPU)" BuildInParallel="false" Properties="Configuration=%(ConfigCPU.Identity)" Targets="Clean" />
<CallTarget Targets="CleanCruft" />
<MSBuild Projects="@(SolutionSet)" BuildInParallel="false" Properties="Configuration=$(BaseConfiguration);$(CompileFastPlz)" Targets="Build" />
<MSBuild Projects="@(ProjectSetCPU)" BuildInParallel="true" Properties="Configuration=%(ConfigCPU.Identity);BuildProjectReferences=false;$(CompileFastPlz)" Targets="@(TargetsSetCPU)" />
</Target>
<Target Name="DebugAll">
<PropertyGroup>
<BaseConfiguration>Debug</BaseConfiguration>
</PropertyGroup>
<ItemGroup>
<ConfigCPU Include="Debug AVX2;Debug"/>
</ItemGroup>
</Target>
<Target Name="DevelAll">
<PropertyGroup>
<BaseConfiguration>Devel</BaseConfiguration>
</PropertyGroup>
<ItemGroup>
<ConfigCPU Include="Devel AVX2;Devel"/>
</ItemGroup>
</Target>
<Target Name="ReleaseAll">
<PropertyGroup>
<BaseConfiguration>Release</BaseConfiguration>
</PropertyGroup>
<ItemGroup>
<ConfigCPU Include="Release AVX2;Release"/>
</ItemGroup>
</Target>
</Project>

View File

@ -28,6 +28,11 @@ void* _aligned_malloc(size_t size, size_t align)
#if defined(__USE_ISOC11) && !defined(ASAN_WORKAROUND) // not supported yet on gcc 4.9
return aligned_alloc(align, size);
#else
#ifdef __APPLE__
// MacOS has a bug where posix_memalign is ridiculously slow on unaligned sizes
// This especially bad on M1s for some reason
size = (size + align - 1) & ~(align - 1);
#endif
void* result = 0;
posix_memalign(&result, align, size);
return result;

View File

@ -177,7 +177,7 @@ endif()
if(WIN32)
enable_language(ASM_MASM)
target_sources(common PRIVATE FastJmp.asm)
target_link_libraries(common PUBLIC WIL::WIL D3D12MemAlloc Winmm.lib)
target_link_libraries(common PUBLIC WIL::WIL D3D12MemAlloc winmm)
target_sources(common PRIVATE
CrashHandler.cpp
CrashHandler.h

View File

@ -1065,7 +1065,7 @@ bool FileSystem::StatFile(const char* path, struct stat* st)
return false;
struct _stat64 st64;
if (_wstati64(wpath.c_str(), &st64) != 0)
if (_wstat64(wpath.c_str(), &st64) != 0)
return false;
TranslateStat64(st, st64);
@ -1079,7 +1079,7 @@ bool FileSystem::StatFile(std::FILE* fp, struct stat* st)
return false;
struct _stat64 st64;
if (_fstati64(fd, &st64) != 0)
if (_fstat64(fd, &st64) != 0)
return false;
TranslateStat64(st, st64);
@ -1145,7 +1145,7 @@ bool FileSystem::StatFile(std::FILE* fp, FILESYSTEM_STAT_DATA* sd)
return false;
struct _stat64 st;
if (_fstati64(fd, &st) != 0)
if (_fstat64(fd, &st) != 0)
return false;
// parse attributes

View File

@ -25,12 +25,11 @@
#endif
// We require Windows 10+.
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0A00 // Windows 10
#include <windows.h>
#include <VersionHelpers.h>
#include <ShTypes.h>
#include <timeapi.h>
#include <tchar.h>
#include <Windows.h>
#endif

View File

@ -483,6 +483,7 @@ namespace Vulkan
m_device_features.wideLines = available_features.wideLines;
m_device_features.fragmentStoresAndAtomics = available_features.fragmentStoresAndAtomics;
m_device_features.textureCompressionBC = available_features.textureCompressionBC;
m_device_features.samplerAnisotropy = available_features.samplerAnisotropy;
return true;
}

View File

@ -369,14 +369,14 @@ namespace Vulkan
}
void Texture::UpdateFromBuffer(VkCommandBuffer cmdbuf, u32 level, u32 layer, u32 x, u32 y, u32 width, u32 height,
u32 row_length, VkBuffer buffer, u32 buffer_offset)
u32 buffer_height, u32 row_length, VkBuffer buffer, u32 buffer_offset)
{
const VkImageLayout old_layout = m_layout;
if (old_layout != VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL)
TransitionSubresourcesToLayout(
cmdbuf, level, 1, layer, 1, old_layout, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
const VkBufferImageCopy bic = {static_cast<VkDeviceSize>(buffer_offset), row_length, height,
const VkBufferImageCopy bic = {static_cast<VkDeviceSize>(buffer_offset), row_length, buffer_height,
{VK_IMAGE_ASPECT_COLOR_BIT, level, layer, 1u}, {static_cast<int32_t>(x), static_cast<int32_t>(y), 0},
{width, height, 1u}};

View File

@ -72,7 +72,7 @@ namespace Vulkan
VkFramebuffer CreateFramebuffer(VkRenderPass render_pass);
void UpdateFromBuffer(VkCommandBuffer cmdbuf, u32 level, u32 layer, u32 x, u32 y, u32 width, u32 height,
u32 row_length, VkBuffer buffer, u32 buffer_offset);
u32 buffer_height, u32 row_length, VkBuffer buffer, u32 buffer_offset);
private:
u32 m_width = 0;

View File

@ -25,8 +25,8 @@
#include "fmt/core.h"
#include <mmsystem.h>
#pragma comment(lib, "User32.lib")
#include <timeapi.h>
#include <VersionHelpers.h>
alignas(16) static LARGE_INTEGER lfreq;
@ -67,7 +67,7 @@ std::string GetOSVersionString()
if (IsWindows10OrGreater())
{
retval = "Microsoft ";
retval += IsWindowsServer() ? "Windows Server 2016" : "Windows 10";
retval += IsWindowsServer() ? "Windows Server 2016+" : "Windows 10+";
}
else

View File

@ -19,7 +19,9 @@
#include "common/Assertions.h"
#include "common/emitter/tools.h"
#include "common/RedtapeWindows.h"
#include <mmsystem.h>
#include <process.h>
#include <timeapi.h>
__fi void Threading::Sleep(int ms)
{

View File

@ -6,7 +6,7 @@
:: The git.exe program is part of the msysgit installation.
::
:: MsysGit can be downloaded from http://msysgit.github.io/
::
::
:: Usage: preBuild.cmd ProjectSrcDir VspropsDir
::
:: ProjectSrcDir - $(ProjectDir)\.. - Top-level Directory of project source code.

View File

@ -5,10 +5,10 @@ Decriptions of Provided .vsprops Sheets
* plugin_svnroot - Provides a set of semi-standard user macros for plugins that
conform to an expected folder layout. Each user macro can be optionally overridden
by the plugin using its own property sheet, if needed.
See the contents of plugin_svnroot for explanations of the User Macros used by all
other properties sheets lested below.
* 3rdPartyDeps - Adds the /deps folder to the linker search path. Does not add
any actual dependencies. You must add those manually.
@ -20,11 +20,10 @@ Decriptions of Provided .vsprops Sheets
struct alignment, and other settings required for Pcsx2 and its libs to link in
a workable fashion. Adds standard preprocessor defines for:
__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE
* IncrementalLinking - Enables incremental linking, for use in devel/debug modes only.
Incremental linking force-disables Whole Program Optimization, but builds the result
.exe/.dll much quicker usually.
* GlobalLinking - Enables full support for Whole Program Optimization, and force-
disables any conflicting incremental link settings.

View File

@ -51,7 +51,7 @@ then
return 1 # warning exit will kill current terminal
fi
# Allow to ship .so library with the build to avoid version issue
# Allow to ship .so library with the build to avoid version issue
MY_LD_LIBRARY_PATH=${MY_LD_LIBRARY_PATH:+$MY_LD_LIBRARY_PATH:}$DIR/3rdPartyLibs
# openSUSE don't follow FHS !!!!

View File

@ -75,7 +75,7 @@ sub check_c_format {
if ($line =~ /^#:\s*(.*)/) {
my $old_index = $index;
$index = $1; # help for debug
if (scalar(@c_symbol) > 0 and not $is_empty) {
print "$old_index\n";
print "Error: translation miss some c format\n";

View File

@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License along with PCSX2.
# If not, see <http://www.gnu.org/licenses/>.
# This basic script convert an jpeg/png image to a .h include file
# This basic script convert an jpeg/png image to a .h include file
# compatible with PCSX2 gui
use File::Basename;

View File

@ -1,64 +0,0 @@
@ECHO OFF
REM PCSX2 - PS2 Emulator for PCs
REM Copyright (C) 2002-2015 PCSX2 Dev Team
REM
REM PCSX2 is free software: you can redistribute it and/or modify it under the terms
REM of the GNU Lesser General Public License as published by the Free Software Found-
REM ation, either version 3 of the License, or (at your option) any later version.
REM
REM PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
REM without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
REM PURPOSE. See the GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License along with PCSX2.
REM If not, see <http://www.gnu.org/licenses/>.
CLS
ECHO Select your Visual Studio version:
ECHO 1. Microsoft Visual Studio 2019
ECHO Q. Exit the script.
CHOICE /C 1Q /T 10 /D 1 /M "Visual Studio version: "
IF ERRORLEVEL 2 GOTO END
IF ERRORLEVEL 1 SET "VCVARPATH=%VS160COMNTOOLS%..\..\VC\Auxiliary\Build\vcvarsall.bat"
ECHO.
ECHO Select the desired configuration:
ECHO 1. Release 32bit (default)
ECHO 2. Devel 32bit
ECHO 3. Debug 32bit
ECHO 4. Release 64bit (WIP)
ECHO 5. Devel 64bit (WIP)
ECHO 6. Debug 64bit (WIP)
ECHO Q. Exit the script.
CHOICE /C 123456Q /T 10 /D 1 /M "Configuration: "
IF ERRORLEVEL 7 GOTO END
IF ERRORLEVEL 6 SET "SELARCH=x64" && SET "SELCONF=DebugAll"
IF ERRORLEVEL 5 SET "SELARCH=x64" && SET "SELCONF=DevelAll"
IF ERRORLEVEL 4 SET "SELARCH=x64" && SET "SELCONF=ReleaseAll"
IF ERRORLEVEL 3 SET "SELARCH=x86" && SET "SELCONF=DebugAll"
IF ERRORLEVEL 2 SET "SELARCH=x86" && SET "SELCONF=DevelAll"
IF ERRORLEVEL 1 SET "SELARCH=x86" && SET "SELCONF=ReleaseAll"
IF EXIST "%VCVARPATH%" (call "%VCVARPATH%" %SELARCH%) ELSE GOTO ERRORVS
cl > NUL 2>&1
if %ERRORLEVEL% NEQ 0 GOTO ERRORVS
ECHO.
ECHO Using:
cl 2>&1 | findstr "Version"
ECHO.
SET Platform=
SET "LOGOPTIONS=/v:m /fl1 /fl2 /flp1:logfile="%~dpn0-%SELARCH%-%SELCONF%-errors.log";errorsonly /flp2:logfile="%~dpn0-%SELARCH%-%SELCONF%-warnings.log";warningsonly"
msbuild "%~dp0\buildbot.xml" /m %LOGOPTIONS% /t:%SELCONF%
GOTO END
:ERRORVS
ECHO.
ECHO The selected Visual Studio version was not found.
:END
ECHO.
ECHO Bye!
ECHO.
timeout /t 10

View File

@ -59,7 +59,7 @@ def check_regression_test(baselinedir, testdir, name):
continue
framenum = int(matches[1])
path1 = os.path.join(dir1, imagename)
path2 = os.path.join(dir2, imagename)
if not os.path.isfile(path2):
@ -92,7 +92,7 @@ def check_regression_test(baselinedir, testdir, name):
def check_regression_tests(baselinedir, testdir):
gamedirs = glob.glob(baselinedir + "/*", recursive=False)
success = 0
failure = 0

View File

@ -43,9 +43,9 @@ target_sources(pcsx2-qt PRIVATE
GameList/GameListRefreshThread.h
GameList/GameListWidget.cpp
GameList/GameListWidget.h
Settings/AdvancedSystemSettingsWidget.cpp
Settings/AdvancedSystemSettingsWidget.h
Settings/AdvancedSystemSettingsWidget.ui
Settings/AdvancedSettingsWidget.cpp
Settings/AdvancedSettingsWidget.h
Settings/AdvancedSettingsWidget.ui
Settings/AudioSettingsWidget.cpp
Settings/AudioSettingsWidget.h
Settings/AudioSettingsWidget.ui
@ -123,12 +123,12 @@ target_sources(pcsx2-qt PRIVATE
Settings/SettingsDialog.cpp
Settings/SettingsDialog.h
Settings/SettingsDialog.ui
Settings/SystemSettingsWidget.cpp
Settings/SystemSettingsWidget.h
Settings/SystemSettingsWidget.ui
Tools/InputRecording/NewInputRecordingDlg.cpp
Tools/InputRecording/NewInputRecordingDlg.h
Tools/InputRecording/NewInputRecordingDlg.ui
Tools/InputRecording/InputRecordingViewer.cpp
Tools/InputRecording/InputRecordingViewer.h
Tools/InputRecording/InputRecordingViewer.ui
resources/resources.qrc
)

View File

@ -39,6 +39,7 @@
#include "pcsx2/INISettingsInterface.h"
#include "pcsx2/PerformanceMetrics.h"
#include "pcsx2/Recording/InputRecording.h"
#include "pcsx2/Recording/InputRecordingControls.h"
#include "AboutDialog.h"
#include "AutoUpdaterDialog.h"
@ -54,6 +55,7 @@
#include "Settings/InterfaceSettingsWidget.h"
#include "SettingWidgetBinder.h"
#include "svnrev.h"
#include "Tools/InputRecording/InputRecordingViewer.h"
#include "Tools/InputRecording/NewInputRecordingDlg.h"
#ifdef _WIN32
@ -188,9 +190,13 @@ QWidget* MainWindow::getContentParent()
void MainWindow::setupAdditionalUi()
{
const bool show_advanced_settings = QtHost::ShouldShowAdvancedSettings();
setWindowIcon(QIcon(QStringLiteral("%1/icons/AppIconLarge.png").arg(QtHost::GetResourcesBasePath())));
makeIconsMasks(menuBar());
m_ui.menuDebug->menuAction()->setVisible(show_advanced_settings);
const bool toolbar_visible = Host::GetBaseBoolSettingValue("UI", "ShowToolbar", false);
m_ui.actionViewToolbar->setChecked(toolbar_visible);
m_ui.toolBar->setVisible(toolbar_visible);
@ -259,7 +265,7 @@ void MainWindow::setupAdditionalUi()
#ifdef ENABLE_RAINTEGRATION
if (Achievements::IsUsingRAIntegration())
{
QMenu* raMenu = new QMenu(QStringLiteral("RAIntegration"), m_ui.menuDebug);
QMenu* raMenu = new QMenu(QStringLiteral("RAIntegration"), m_ui.menu_Tools);
connect(raMenu, &QMenu::aboutToShow, this, [this, raMenu]() {
raMenu->clear();
@ -284,7 +290,7 @@ void MainWindow::setupAdditionalUi()
});
}
});
m_ui.menuDebug->insertMenu(m_ui.actionToggleSoftwareRendering, raMenu);
m_ui.menu_Tools->insertMenu(m_ui.menuInput_Recording->menuAction(), raMenu);
}
#endif
}
@ -314,7 +320,6 @@ void MainWindow::connectSignals()
connect(m_ui.actionGameListSettings, &QAction::triggered, [this]() { doSettings("Game List"); });
connect(m_ui.actionEmulationSettings, &QAction::triggered, [this]() { doSettings("Emulation"); });
connect(m_ui.actionBIOSSettings, &QAction::triggered, [this]() { doSettings("BIOS"); });
connect(m_ui.actionSystemSettings, &QAction::triggered, [this]() { doSettings("System"); });
connect(m_ui.actionGraphicsSettings, &QAction::triggered, [this]() { doSettings("Graphics"); });
connect(m_ui.actionAudioSettings, &QAction::triggered, [this]() { doSettings("Audio"); });
connect(m_ui.actionMemoryCardSettings, &QAction::triggered, [this]() { doSettings("Memory Cards"); });
@ -374,8 +379,9 @@ void MainWindow::connectSignals()
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionEnableLogTimestamps, "Logging", "EnableTimestamps", true);
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionEnableCDVDVerboseReads, "EmuCore", "CdvdVerboseReads", false);
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionSaveBlockDump, "EmuCore", "CdvdDumpBlocks", false);
m_ui.actionShowAdvancedSettings->setChecked(QtHost::ShouldShowAdvancedSettings());
connect(m_ui.actionSaveBlockDump, &QAction::toggled, this, &MainWindow::onBlockDumpActionToggled);
connect(m_ui.actionShowAdvancedSettings, &QAction::toggled, this, &MainWindow::onShowAdvancedSettingsToggled);
connect(m_ui.actionSaveGSDump, &QAction::triggered, this, &MainWindow::onSaveGSDumpActionTriggered);
// Input Recording
@ -384,6 +390,7 @@ void MainWindow::connectSignals()
connect(m_ui.actionInputRecStop, &QAction::triggered, this, &MainWindow::onInputRecStopActionTriggered);
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionInputRecConsoleLogs, "Logging", "EnableInputRecordingLogs", false);
SettingWidgetBinder::BindWidgetToBoolSetting(nullptr, m_ui.actionInputRecControllerLogs, "Logging", "EnableControllerLogs", false);
connect(m_ui.actionInputRecOpenViewer, &QAction::triggered, this, &MainWindow::onInputRecOpenViewer);
// These need to be queued connections to stop crashing due to menus opening/closing and switching focus.
connect(m_game_list_widget, &GameListWidget::refreshProgress, this, &MainWindow::onGameListRefreshProgress);
@ -456,10 +463,15 @@ void MainWindow::recreateSettings()
QString current_category;
if (m_settings_dialog)
{
const bool was_visible = m_settings_dialog->isVisible();
current_category = m_settings_dialog->getCategory();
m_settings_dialog->hide();
m_settings_dialog->deleteLater();
m_settings_dialog = nullptr;
if (!was_visible)
return;
}
doSettings(current_category.toUtf8().constData());
@ -822,6 +834,48 @@ void MainWindow::onBlockDumpActionToggled(bool checked)
g_emu_thread->applySettings();
}
void MainWindow::onShowAdvancedSettingsToggled(bool checked)
{
if (checked && !Host::GetBaseBoolSettingValue("UI", "AdvancedSettingsWarningShown", false))
{
QCheckBox* cb = new QCheckBox(tr("Do not show again"));
QMessageBox mb(this);
mb.setWindowTitle(tr("Show Advanced Settings"));
mb.setText(
tr("Changing advanced settings can have unpredictable effects on games, including graphical glitches, lock-ups, and even corrupted save files. "
"We do not recommend changing advanced settings unless you know what you are doing, and the implications of changing each setting.\n\n"
"The PCSX2 team will not provide any support for configurations that modify these settings, you are on your own.\n\n"
"Are you sure you want to continue?"));
mb.setIcon(QMessageBox::Warning);
mb.addButton(QMessageBox::Yes);
mb.addButton(QMessageBox::No);
mb.setDefaultButton(QMessageBox::No);
mb.setCheckBox(cb);
if (mb.exec() == QMessageBox::No)
{
QSignalBlocker sb(m_ui.actionShowAdvancedSettings);
m_ui.actionShowAdvancedSettings->setChecked(false);
return;
}
if (cb->isChecked())
{
Host::SetBaseBoolSettingValue("UI", "AdvancedSettingsWarningShown", true);
Host::CommitBaseSettingChanges();
}
}
Host::SetBaseBoolSettingValue("UI", "ShowAdvancedSettings", checked);
Host::CommitBaseSettingChanges();
m_ui.menuDebug->menuAction()->setVisible(checked);
// just recreate the entire settings window, it's easier.
if (m_settings_dialog)
recreateSettings();
}
void MainWindow::saveStateToConfig()
{
if (!isVisible())
@ -1586,7 +1640,7 @@ void MainWindow::onInputRecNewActionTriggered()
const bool wasRunning = s_vm_valid;
if (wasRunning && !wasPaused)
{
VMManager::SetPaused(true);
g_emu_thread->setVMPaused(true);
}
NewInputRecordingDlg dlg(this);
@ -1594,29 +1648,37 @@ void MainWindow::onInputRecNewActionTriggered()
if (result == QDialog::Accepted)
{
if (g_InputRecording.Create(
dlg.getFilePath(),
dlg.getInputRecType() == InputRecording::Type::FROM_SAVESTATE,
dlg.getAuthorName()))
{
return;
}
Host::RunOnCPUThread([&, filePath = dlg.getFilePath(),
fromSavestate = dlg.getInputRecType() == InputRecording::Type::FROM_SAVESTATE,
authorName = dlg.getAuthorName()]() {
if (g_InputRecording.create(
filePath,
fromSavestate,
authorName))
{
QtHost::RunOnUIThread([&]() {
m_ui.actionInputRecNew->setEnabled(false);
m_ui.actionInputRecStop->setEnabled(true);
m_ui.actionReset->setEnabled(!g_InputRecording.isTypeSavestate());
});
}
});
}
if (wasRunning && !wasPaused)
{
VMManager::SetPaused(false);
g_emu_thread->setVMPaused(false);
}
}
#include "pcsx2/Recording/InputRecordingControls.h"
void MainWindow::onInputRecPlayActionTriggered()
{
const bool wasPaused = s_vm_paused;
if (!wasPaused)
g_InputRecordingControls.PauseImmediately();
{
g_emu_thread->setVMPaused(true);
}
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::ExistingFile);
@ -1627,30 +1689,49 @@ void MainWindow::onInputRecPlayActionTriggered()
{
fileNames = dialog.selectedFiles();
}
if (fileNames.length() > 0)
else
{
if (g_InputRecording.IsActive())
{
g_InputRecording.Stop();
}
if (g_InputRecording.Play(fileNames.first().toStdString()))
if (!wasPaused)
{
g_emu_thread->setVMPaused(false);
return;
}
}
if (!wasPaused)
if (fileNames.length() > 0)
{
g_InputRecordingControls.Resume();
if (g_InputRecording.isActive())
{
Host::RunOnCPUThread([]() {
g_InputRecording.stop();
});
m_ui.actionInputRecStop->setEnabled(false);
}
Host::RunOnCPUThread([&, filename = fileNames.first().toStdString()]() {
if (g_InputRecording.play(filename))
{
QtHost::RunOnUIThread([&]() {
m_ui.actionInputRecNew->setEnabled(false);
m_ui.actionInputRecStop->setEnabled(true);
m_ui.actionReset->setEnabled(!g_InputRecording.isTypeSavestate());
});
}
});
}
}
void MainWindow::onInputRecStopActionTriggered()
{
if (g_InputRecording.IsActive())
if (g_InputRecording.isActive())
{
g_InputRecording.Stop();
Host::RunOnCPUThread([&]() {
g_InputRecording.stop();
QtHost::RunOnUIThread([&]() {
m_ui.actionInputRecNew->setEnabled(true);
m_ui.actionInputRecStop->setEnabled(false);
m_ui.actionReset->setEnabled(true);
});
});
}
}
@ -1659,6 +1740,32 @@ void MainWindow::onInputRecOpenSettingsTriggered()
// TODO - Vaser - Implement
}
InputRecordingViewer* MainWindow::getInputRecordingViewer()
{
if (!m_input_recording_viewer)
{
m_input_recording_viewer = new InputRecordingViewer(this);
}
return m_input_recording_viewer;
}
void MainWindow::updateInputRecordingActions(bool started)
{
m_ui.actionInputRecNew->setEnabled(started);
m_ui.actionInputRecPlay->setEnabled(started);
}
void MainWindow::onInputRecOpenViewer()
{
InputRecordingViewer* viewer = getInputRecordingViewer();
if (!viewer->isVisible())
{
viewer->show();
}
}
void MainWindow::onVMStarting()
{
s_vm_valid = true;
@ -1676,6 +1783,7 @@ void MainWindow::onVMStarted()
updateEmulationActions(true, true);
updateWindowTitle();
updateStatusBarWidgetVisibility();
updateInputRecordingActions(true);
}
void MainWindow::onVMPaused()
@ -1729,6 +1837,7 @@ void MainWindow::onVMStopped()
updateWindowTitle();
updateWindowState();
updateStatusBarWidgetVisibility();
updateInputRecordingActions(false);
if (m_display_widget)
{
@ -2387,8 +2496,8 @@ void MainWindow::setGameListEntryCoverImage(const GameList::Entry* entry)
void MainWindow::clearGameListEntryPlayTime(const GameList::Entry* entry)
{
if (QMessageBox::question(this, tr("Confirm Reset"),
tr("Are you sure you want to reset the play time for '%1'?\n\nThis action cannot be undone.")
.arg(QString::fromStdString(entry->title))) != QMessageBox::Yes)
tr("Are you sure you want to reset the play time for '%1'?\n\nThis action cannot be undone.")
.arg(QString::fromStdString(entry->title))) != QMessageBox::Yes)
{
return;
}

View File

@ -22,6 +22,7 @@
#include <functional>
#include <optional>
#include "Tools/InputRecording/InputRecordingViewer.h"
#include "Settings/ControllerSettingsDialog.h"
#include "Settings/SettingsDialog.h"
#include "ui_MainWindow.h"
@ -156,12 +157,14 @@ private Q_SLOTS:
void onScreenshotActionTriggered();
void onSaveGSDumpActionTriggered();
void onBlockDumpActionToggled(bool checked);
void onShowAdvancedSettingsToggled(bool checked);
// Input Recording
void onInputRecNewActionTriggered();
void onInputRecPlayActionTriggered();
void onInputRecStopActionTriggered();
void onInputRecOpenSettingsTriggered();
void onInputRecOpenViewer();
void onVMStarting();
void onVMStarted();
@ -223,6 +226,9 @@ private:
SettingsDialog* getSettingsDialog();
void doSettings(const char* category = nullptr);
InputRecordingViewer* getInputRecordingViewer();
void updateInputRecordingActions(bool started);
ControllerSettingsDialog* getControllerSettingsDialog();
void doControllerSettings(ControllerSettingsDialog::Category category = ControllerSettingsDialog::Category::Count);
@ -250,6 +256,7 @@ private:
DisplayContainer* m_display_container = nullptr;
SettingsDialog* m_settings_dialog = nullptr;
InputRecordingViewer* m_input_recording_viewer = nullptr;
ControllerSettingsDialog* m_controller_settings_dialog = nullptr;
AutoUpdaterDialog* m_auto_updater_dialog = nullptr;

View File

@ -16,7 +16,7 @@
<property name="windowTitle">
<string>PCSX2</string>
</property>
<widget class="QStackedWidget" name="mainContainer" />
<widget class="QStackedWidget" name="mainContainer"/>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
@ -90,7 +90,6 @@
<addaction name="actionGameListSettings"/>
<addaction name="actionBIOSSettings"/>
<addaction name="actionEmulationSettings"/>
<addaction name="actionSystemSettings"/>
<addaction name="actionGraphicsSettings"/>
<addaction name="actionAudioSettings"/>
<addaction name="actionMemoryCardSettings"/>
@ -126,18 +125,8 @@
<string>Switch Renderer</string>
</property>
</widget>
<addaction name="separator"/>
<addaction name="menuDebugSwitchRenderer"/>
<addaction name="actionToggleSoftwareRendering"/>
<addaction name="separator"/>
<addaction name="actionSaveBlockDump"/>
<addaction name="actionSaveGSDump"/>
<addaction name="separator"/>
<addaction name="actionReloadPatches"/>
<addaction name="separator"/>
<addaction name="actionEnableSystemConsole"/>
<addaction name="actionEnableFileLogging"/>
<addaction name="actionEnableVerboseLogging"/>
<addaction name="actionEnableLogTimestamps"/>
<addaction name="separator"/>
<addaction name="actionEnableEEConsoleLogging"/>
@ -187,6 +176,7 @@
<addaction name="actionInputRecPlay"/>
<addaction name="actionInputRecStop"/>
<addaction name="separator"/>
<addaction name="actionInputRecOpenViewer"/>
<addaction name="actionInputRecOpenSettings"/>
<addaction name="separator"/>
<addaction name="actionInputRecConsoleLogs"/>
@ -194,7 +184,18 @@
</widget>
<addaction name="actionOpenDataDirectory"/>
<addaction name="actionCoverDownloader"/>
<addaction name="separator"/>
<addaction name="actionToggleSoftwareRendering"/>
<addaction name="actionReloadPatches"/>
<addaction name="menuInput_Recording"/>
<addaction name="separator"/>
<addaction name="actionEnableSystemConsole"/>
<addaction name="actionEnableFileLogging"/>
<addaction name="actionEnableVerboseLogging"/>
<addaction name="separator"/>
<addaction name="actionShowAdvancedSettings"/>
<addaction name="actionSaveBlockDump"/>
<addaction name="actionSaveGSDump"/>
</widget>
<addaction name="menuSystem"/>
<addaction name="menuSettings"/>
@ -365,15 +366,6 @@
<string>&amp;BIOS</string>
</property>
</action>
<action name="actionSystemSettings">
<property name="icon">
<iconset theme="artboard-2-line">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>System</string>
</property>
</action>
<action name="actionEmulationSettings">
<property name="icon">
<iconset theme="dashboard-line">
@ -770,21 +762,33 @@
</property>
</action>
<action name="actionInputRecNew">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>New</string>
</property>
</action>
<action name="actionInputRecPlay">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Play</string>
</property>
</action>
<action name="actionInputRecStop">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Stop</string>
</property>
</action>
<action name="actionInputRecOpenSettings">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Settings</string>
</property>
@ -865,6 +869,19 @@
<string>Cover Downloader...</string>
</property>
</action>
<action name="actionShowAdvancedSettings">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show Advanced Settings</string>
</property>
</action>
<action name="actionInputRecOpenViewer">
<property name="text">
<string>Recording Viewer</string>
</property>
</action>
</widget>
<resources>
<include location="resources/resources.qrc"/>

View File

@ -826,7 +826,7 @@ void EmuThread::redrawDisplayWindow()
if (!VMManager::HasValidVM() || VMManager::GetState() == VMState::Running)
return;
GetMTGS().RunOnGSThread([]() { GetMTGS().PresentCurrentFrame(); });
GetMTGS().PresentCurrentFrame();
}
void EmuThread::runOnCPUThread(const std::function<void()>& func)
@ -979,10 +979,6 @@ void Host::ResizeHostDisplay(u32 new_window_width, u32 new_window_height, float
{
g_host_display->ResizeWindow(new_window_width, new_window_height, new_window_scale);
ImGuiManager::WindowResized();
// if we're paused, re-present the current frame at the new window size.
if (VMManager::GetState() == VMState::Paused)
GetMTGS().PresentCurrentFrame();
}
void Host::RequestResizeHostDisplay(s32 width, s32 height)
@ -994,10 +990,6 @@ void Host::UpdateHostDisplay()
{
g_emu_thread->updateDisplay();
ImGuiManager::WindowResized();
// if we're paused, re-present the current frame at the new window size.
if (VMManager::GetState() == VMState::Paused)
GetMTGS().PresentCurrentFrame();
}
void Host::OnVMStarting()
@ -1359,6 +1351,11 @@ bool QtHost::IsOnUIThread()
return (QThread::currentThread() == ui_thread);
}
bool QtHost::ShouldShowAdvancedSettings()
{
return Host::GetBaseBoolSettingValue("UI", "ShowAdvancedSettings", false);
}
void QtHost::RunOnUIThread(const std::function<void()>& func, bool block /*= false*/)
{
// main window always exists, so it's fine to attach it to that.

View File

@ -220,6 +220,9 @@ namespace QtHost
/// Returns true if the calling thread is the UI thread.
bool IsOnUIThread();
/// Returns true if advanced settings should be shown.
bool ShouldShowAdvancedSettings();
/// Executes a function on the UI thread.
void RunOnUIThread(const std::function<void()>& func, bool block = false);

View File

@ -18,14 +18,14 @@
#include <QtWidgets/QMessageBox>
#include <algorithm>
#include "AdvancedSystemSettingsWidget.h"
#include "AdvancedSettingsWidget.h"
#include "QtHost.h"
#include "QtUtils.h"
#include "SettingWidgetBinder.h"
#include "SettingsDialog.h"
AdvancedSystemSettingsWidget::AdvancedSystemSettingsWidget(SettingsDialog* dialog, QWidget* parent)
: QWidget(parent)
AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* parent)
: QWidget(parent), m_dialog(dialog)
{
SettingsInterface* sif = dialog->getSettingsInterface();
@ -41,6 +41,18 @@ AdvancedSystemSettingsWidget::AdvancedSystemSettingsWidget(SettingsDialog* dialo
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.vu1Recompiler, "EmuCore/CPU/Recompiler", "EnableVU1", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.vuFlagHack, "EmuCore/Speedhacks", "vuFlagHack", true);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeRoundingMode, "EmuCore/CPU", "FPU.Roundmode", 3);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vuRoundingMode, "EmuCore/CPU", "VU.Roundmode", 3);
if (m_dialog->isPerGameSettings())
{
m_ui.eeClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.eeClampMode->itemText(getGlobalClampingModeIndex(false))));
m_ui.vuClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.vuClampMode->itemText(getGlobalClampingModeIndex(true))));
}
m_ui.eeClampMode->setCurrentIndex(getClampingModeIndex(false));
m_ui.vuClampMode->setCurrentIndex(getClampingModeIndex(true));
connect(m_ui.eeClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(false, index); });
connect(m_ui.vuClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(true, index); });
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.iopRecompiler, "EmuCore/CPU/Recompiler", "EnableIOP", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.gameFixes, "EmuCore", "EnableGameFixes", true);
@ -83,4 +95,58 @@ AdvancedSystemSettingsWidget::AdvancedSystemSettingsWidget(SettingsDialog* dialo
tr("Automatically loads and applies compatibility patches to known problematic games."));
}
AdvancedSystemSettingsWidget::~AdvancedSystemSettingsWidget() = default;
AdvancedSettingsWidget::~AdvancedSettingsWidget() = default;
int AdvancedSettingsWidget::getGlobalClampingModeIndex(bool vu) const
{
if (Host::GetBaseBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuSignOverflow" : "fpuFullMode", false))
return 3;
if (Host::GetBaseBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuExtraOverflow" : "fpuExtraOverflow", false))
return 2;
if (Host::GetBaseBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuOverflow" : "fpuOverflow", true))
return 1;
return 0;
}
int AdvancedSettingsWidget::getClampingModeIndex(bool vu) 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);
std::optional<bool> third = m_dialog->getBoolValue("EmuCore/CPU/Recompiler", vu ? "vuSignOverflow" : "fpuFullMode", default_false);
std::optional<bool> second = m_dialog->getBoolValue("EmuCore/CPU/Recompiler", vu ? "vuExtraOverflow" : "fpuExtraOverflow", default_false);
std::optional<bool> first = m_dialog->getBoolValue("EmuCore/CPU/Recompiler", vu ? "vuOverflow" : "fpuOverflow", default_true);
if (third.has_value() && third.value())
return base + 3;
if (second.has_value() && second.value())
return base + 2;
if (first.has_value() && first.value())
return base + 1;
else if (first.has_value())
return base + 0; // none
else
return 0; // no per game override
}
void AdvancedSettingsWidget::setClampingMode(bool vu, int index)
{
std::optional<bool> first, second, third;
if (!m_dialog->isPerGameSettings() || index > 0)
{
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
third = (index >= (base + 3));
second = (index >= (base + 2));
first = (index >= (base + 1));
}
m_dialog->setBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuSignOverflow" : "fpuFullMode", third);
m_dialog->setBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuExtraOverflow" : "fpuExtraOverflow", second);
m_dialog->setBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuOverflow" : "fpuOverflow", first);
}

View File

@ -17,17 +17,17 @@
#include <QtWidgets/QWidget>
#include "ui_SystemSettingsWidget.h"
#include "ui_AdvancedSettingsWidget.h"
class SettingsDialog;
class SystemSettingsWidget : public QWidget
class AdvancedSettingsWidget : public QWidget
{
Q_OBJECT
public:
SystemSettingsWidget(SettingsDialog* dialog, QWidget* parent);
~SystemSettingsWidget();
AdvancedSettingsWidget(SettingsDialog* dialog, QWidget* parent);
~AdvancedSettingsWidget();
private:
int getGlobalClampingModeIndex(bool vu) const;
@ -36,5 +36,5 @@ private:
SettingsDialog* m_dialog;
Ui::SystemSettingsWidget m_ui;
Ui::AdvancedSystemSettingsWidget m_ui;
};

View File

@ -0,0 +1,374 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AdvancedSystemSettingsWidget</class>
<widget class="QWidget" name="AdvancedSystemSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>628</width>
<height>375</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</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="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>609</width>
<height>569</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Changing these options may cause games to become non-functional. Modify at your own risk, the PCSX2 team will not provide support for configurations with these settings changed.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>EmotionEngine (MIPS-IV)</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Rounding Mode:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="eeRoundingMode">
<item>
<property name="text">
<string>Nearest</string>
</property>
</item>
<item>
<property name="text">
<string>Negative</string>
</property>
</item>
<item>
<property name="text">
<string>Positive</string>
</property>
</item>
<item>
<property name="text">
<string>Chop / Zero (Default)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Clamping Mode:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="eeClampMode">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Normal (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Extra + Preserve Sign</string>
</property>
</item>
<item>
<property name="text">
<string>Full</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="0">
<widget class="QCheckBox" name="eeWaitLoopDetection">
<property name="text">
<string>Wait Loop Detection</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="eeRecompiler">
<property name="text">
<string>Enable Recompiler</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="eeFastmem">
<property name="text">
<string>Enable Fast Memory Access</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="eeCache">
<property name="text">
<string>Enable Cache (Slow)</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="eeINTCSpinDetection">
<property name="text">
<string>INTC Spin Detection</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Vector Units (VU)</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QCheckBox" name="vu0Recompiler">
<property name="text">
<string>Enable VU0 Recompiler (Micro Mode)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="vu1Recompiler">
<property name="text">
<string>Enable VU1 Recompiler</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="vuFlagHack">
<property name="text">
<string>mVU Flag Hack</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Clamping Mode:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Rounding Mode:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="vuRoundingMode">
<item>
<property name="text">
<string>Nearest</string>
</property>
</item>
<item>
<property name="text">
<string>Negative</string>
</property>
</item>
<item>
<property name="text">
<string>Positive</string>
</property>
</item>
<item>
<property name="text">
<string>Chop / Zero (Default)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="vuClampMode">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Normal (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Extra</string>
</property>
</item>
<item>
<property name="text">
<string>Extra + Preserve Sign</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>I/O Processor (IOP, MIPS-I)</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="iopRecompiler">
<property name="text">
<string>Enable Recompiler</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Game Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="gameFixes">
<property name="text">
<string>Enable Game Fixes</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="patches">
<property name="text">
<string>Enable Compatibility Patches</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="basicGroupBox">
<property name="title">
<string>Frame Rate Control</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="palFrameRate">
<property name="suffix">
<string> hz</string>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ntscFrameRate">
<property name="suffix">
<string> hz</string>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>PAL Frame Rate:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>NTSC Frame Rate:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../resources/resources.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -1,204 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AdvancedSystemSettingsWidget</class>
<widget class="QWidget" name="AdvancedSystemSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>648</width>
<height>481</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</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>EmotionEngine (MIPS-IV)</string>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="2" column="0">
<widget class="QCheckBox" name="eeWaitLoopDetection">
<property name="text">
<string>Wait Loop Detection</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="eeINTCSpinDetection">
<property name="text">
<string>INTC Spin Detection</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="eeRecompiler">
<property name="text">
<string>Enable Recompiler</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="eeCache">
<property name="text">
<string>Enable Cache (Slow)</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="eeFastmem">
<property name="text">
<string>Enable Fast Memory Access</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Vector Units (VU)</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QCheckBox" name="vuFlagHack">
<property name="text">
<string>mVU Flag Hack</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="vu0Recompiler">
<property name="text">
<string>Enable VU0 Recompiler (Micro Mode)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="vu1Recompiler">
<property name="text">
<string>Enable VU1 Recompiler</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>I/O Processor (IOP, MIPS-I)</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="iopRecompiler">
<property name="text">
<string>Enable Recompiler</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Game Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="gameFixes">
<property name="text">
<string>Enable Game Fixes</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="patches">
<property name="text">
<string>Enable Compatibility Patches</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="basicGroupBox">
<property name="title">
<string>Frame Rate Control</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="palFrameRate">
<property name="suffix">
<string> hz</string>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="ntscFrameRate">
<property name="suffix">
<string> hz</string>
</property>
<property name="singleStep">
<double>0.010000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>PAL Frame Rate:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>NTSC Frame Rate:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../resources/resources.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -26,6 +26,10 @@
#include "SettingWidgetBinder.h"
#include "SettingsDialog.h"
static constexpr int MINIMUM_EE_CYCLE_RATE = -3;
static constexpr int MAXIMUM_EE_CYCLE_RATE = 3;
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(SettingsDialog* dialog, QWidget* parent)
@ -46,33 +50,78 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget
connect(m_ui.optimalFramePacing, &QCheckBox::stateChanged, this, &EmulationSettingsWidget::onOptimalFramePacingChanged);
m_ui.optimalFramePacing->setTristate(dialog->isPerGameSettings());
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.cheats, "EmuCore", "EnableCheats", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.widescreenPatches, "EmuCore", "EnableWideScreenPatches", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.noInterlacingPatches, "EmuCore", "EnableNoInterlacingPatches", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hostFilesystem, "EmuCore", "HostFs", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.warnAboutUnsafeSettings, "EmuCore", "WarnAboutUnsafeSettings", true);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeCycleSkipping, "EmuCore/Speedhacks", "EECycleSkip", DEFAULT_EE_CYCLE_SKIP);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.affinityControl, "EmuCore/CPU", "AffinityControlMode", 0);
// Per-game settings is special, we don't want to bind it if we're editing per-game settings.
m_ui.perGameSettings->setEnabled(!dialog->isPerGameSettings());
if (!dialog->isPerGameSettings())
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.MTVU, "EmuCore/Speedhacks", "vuThread", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.instantVU1, "EmuCore/Speedhacks", "vu1Instant", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastCDVD, "EmuCore/Speedhacks", "fastCDVD", false);
if (m_dialog->isPerGameSettings())
{
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.perGameSettings, "EmuCore", "EnablePerGameSettings", true);
connect(m_ui.perGameSettings, &QCheckBox::stateChanged, g_emu_thread, &EmuThread::reloadGameSettings);
m_ui.eeCycleRate->insertItem(
0, tr("Use Global Setting [%1]")
.arg(m_ui.eeCycleRate->itemText(
std::clamp(Host::GetBaseIntSettingValue("EmuCore/Speedhacks", "EECycleRate", DEFAULT_EE_CYCLE_RATE) - MINIMUM_EE_CYCLE_RATE,
0, MAXIMUM_EE_CYCLE_RATE - MINIMUM_EE_CYCLE_RATE))));
}
else
{
// Allow for FastCDVD for per-game settings only
m_ui.systemSettingsLayout->removeWidget(m_ui.fastCDVD);
m_ui.fastCDVD->deleteLater();
}
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) {
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);
});
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.cheats, "EmuCore", "EnableCheats", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.hostFilesystem, "EmuCore", "HostFs", false);
dialog->registerWidgetHelp(m_ui.normalSpeed, tr("Normal Speed"), "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."));
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."));
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.speedLimiter, tr("Speed Limiter"), tr("Checked"),
tr("Limits the emulation to the appropriate framerate for the currently running game."));
dialog->registerWidgetHelp(m_ui.eeCycleRate, tr("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("Cycle Skip"), tr("None"),
tr("Makes the emulated Emotion Engine skip cycles. "
"Helps a small subset of games like SOTC. Most of the time it's harmful to performance."));
dialog->registerWidgetHelp(m_ui.MTVU, tr("MTVU (Multi-threaded VU1)"), tr("Checked"),
tr("Generally a speedup on CPUs with 3 or more threads. "
"Safe for most games, but a few are incompatible and may hang."));
dialog->registerWidgetHelp(m_ui.instantVU1, tr("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."));
dialog->registerWidgetHelp(m_ui.fastCDVD, tr("Enable Fast CDVD"), tr("Unchecked"),
tr("Fast disc access, less loading times. Check HDLoader compatibility lists for known games that have issues with this."));
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"),
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"),
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"),
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 add additional input lag."));
dialog->registerWidgetHelp(m_ui.syncToHostRefreshRate, tr("Scale To Host Refresh Rate"), tr("Unchecked"),
tr("Adjusts the emulation speed so the console's refresh rate matches the host's refresh rate when both VSync and "
"Audio Resampling settings are enabled. This results in the smoothest animations possible, at the cost of "
@ -80,33 +129,6 @@ EmulationSettingsWidget::EmulationSettingsWidget(SettingsDialog* dialog, QWidget
"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.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"),
tr("Allows games and homebrew to access files / folders directly on the host computer."));
dialog->registerWidgetHelp(m_ui.widescreenPatches, tr("Enable Widescreen Patches"), tr("Unchecked"),
tr("Automatically loads and applies widescreen patches on game start. Can cause issues."));
dialog->registerWidgetHelp(m_ui.noInterlacingPatches, tr("Enable No-Interlacing Patches"), tr("Unchecked"),
tr("Automatically loads and applies no-interlacing patches on game start. Can cause issues."));
dialog->registerWidgetHelp(m_ui.perGameSettings, tr("Enable Per-Game Settings"), tr("Checked"),
tr("When enabled, per-game settings will be applied, and incompatible enhancements will be disabled. You should "
"leave this option enabled except when testing enhancements with incompatible games."));
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"),
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 add additional input lag."));
dialog->registerWidgetHelp(m_ui.warnAboutUnsafeSettings, tr("Warn About Unsafe Settings"),
tr("Checked"), tr("Displays warnings when settings are enabled which may break games."));
updateOptimalFramePacing();
}

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>672</width>
<height>518</height>
<height>431</height>
</rect>
</property>
<property name="windowTitle">
@ -72,13 +72,184 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="systemSettingsGroup">
<property name="title">
<string>System Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="systemSettingsLayout">
<item row="0" column="1">
<widget class="QCheckBox" name="instantVU1">
<property name="text">
<string>Enable Instant VU1</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="cheats">
<property name="text">
<string>Enable Cheats</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="MTVU">
<property name="text">
<string>Enable Multi-Threaded VU1 (MTVU)</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="hostFilesystem">
<property name="text">
<string>Enable Host Filesystem</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="fastCDVD">
<property name="text">
<string>Enable Fast CDVD</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>EE Cycle Skipping:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="eeCycleSkipping">
<item>
<property name="text">
<string>Disabled</string>
</property>
</item>
<item>
<property name="text">
<string>Mild Underclock</string>
</property>
</item>
<item>
<property name="text">
<string>Moderate Underclock</string>
</property>
</item>
<item>
<property name="text">
<string>Maximum Underclock</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>EE Cycle Rate:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="eeCycleRate">
<item>
<property name="text">
<string>50% (Underclock)</string>
</property>
</item>
<item>
<property name="text">
<string>60% (Underclock)</string>
</property>
</item>
<item>
<property name="text">
<string>75% (Underclock)</string>
</property>
</item>
<item>
<property name="text">
<string>100% (Normal Speed)</string>
</property>
</item>
<item>
<property name="text">
<string>130% (Overclock)</string>
</property>
</item>
<item>
<property name="text">
<string>180% (Overclock)</string>
</property>
</item>
<item>
<property name="text">
<string>300% (Overclock)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Affinity Control:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="affinityControl">
<item>
<property name="text">
<string>Disabled</string>
</property>
</item>
<item>
<property name="text">
<string>EE &gt; VU &gt; GS</string>
</property>
</item>
<item>
<property name="text">
<string>EE &gt; GS &gt; VU</string>
</property>
</item>
<item>
<property name="text">
<string>VU &gt; EE &gt; GS</string>
</property>
</item>
<item>
<property name="text">
<string>VU &gt; GS &gt; EE</string>
</property>
</item>
<item>
<property name="text">
<string>GS &gt; EE &gt; VU</string>
</property>
</item>
<item>
<property name="text">
<string>GS &gt; VU &gt; EE</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="basicGroupBox">
<property name="title">
<string>Frame Pacing / Latency Control</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<item row="1" column="1">
<widget class="QSpinBox" name="maxFrameLatency">
<property name="suffix">
<string> frames</string>
@ -91,14 +262,14 @@
</property>
</widget>
</item>
<item row="0" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Maximum Frame Latency:</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<layout class="QGridLayout" name="basicCheckboxGridLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="optimalFramePacing">
@ -119,57 +290,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Game Settings</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QCheckBox" name="perGameSettings">
<property name="text">
<string>Enable Per-Game Settings</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="widescreenPatches">
<property name="text">
<string>Enable Widescreen Patches</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="cheats">
<property name="text">
<string>Enable Cheats</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="hostFilesystem">
<property name="text">
<string>Enable Host Filesystem</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="noInterlacingPatches">
<property name="text">
<string>Enable No-Interlacing Patches</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<property name="text">
<string>Warn About Unsafe Settings</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
@ -23,161 +23,195 @@
<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 (NOT recommended to change globally)</string>
<widget class="QScrollArea" name="scrollArea">
<property name="widgetResizable">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="FpuNegDivHack">
<property name="text">
<string>FPU Negative Divide Hack (For Gundam Games)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="FpuMulHack">
<property name="text">
<string>FPU Multiply Hack (For Tales of Destiny)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SoftwareRendererFMVHack">
<property name="text">
<string>Use Software Renderer For FMVs</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SkipMPEGHack">
<property name="text">
<string>Skip MPEG Hack (Skips Videos/FMVs)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GoemonTlbHack">
<property name="text">
<string>Preload TLB Hack (For Goemon)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="EETimingHack">
<property name="text">
<string>EE Timing Hack (General Purpose Timing Hack)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="InstantDMAHack">
<property name="text">
<string>Instant DMA Hack (Good for cache emulation problems)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="OPHFlagHack">
<property name="text">
<string>OPH Flag Hack (For Bleach Blade Battlers)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GIFFIFOHack">
<property name="text">
<string>Emulate GIF FIFO (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="DMABusyHack">
<property name="text">
<string>DMA Busy Hack (Deny Writes When Busy)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIF1StallHack">
<property name="text">
<string>Delay VIF1 Stalls (For SOCOM 2 HUD/Spy Hunter)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIFFIFOHack">
<property name="text">
<string>Emulate VIF FIFO (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="FullVU0SyncHack">
<property name="text">
<string>Full VU0 Synchronization (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="IbitHack">
<property name="text">
<string>VU I Bit Hack (For Scarface The World is Yours/Crash Tag Team Racing)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VuAddSubHack">
<property name="text">
<string>VU Add Hack (For Tri-Ace Games)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUOverflowHack">
<property name="text">
<string>VU Overflow Hack (Superman Returns)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUSyncHack">
<property name="text">
<string>VU Sync (Run Behind, M-Bit games)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="XgKickHack">
<property name="text">
<string>VU XGKick Sync (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="BlitInternalFPSHack">
<property name="text">
<string>Force Blit Internal FPS Detection (When auto-detection fails)</string>
</property>
</widget>
</item>
</layout>
<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 (NOT recommended to change globally)</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="FpuNegDivHack">
<property name="text">
<string>FPU Negative Divide Hack (For Gundam Games)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="FpuMulHack">
<property name="text">
<string>FPU Multiply Hack (For Tales of Destiny)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SoftwareRendererFMVHack">
<property name="text">
<string>Use Software Renderer For FMVs</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="SkipMPEGHack">
<property name="text">
<string>Skip MPEG Hack (Skips Videos/FMVs)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GoemonTlbHack">
<property name="text">
<string>Preload TLB Hack (For Goemon)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="EETimingHack">
<property name="text">
<string>EE Timing Hack (General Purpose Timing Hack)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="InstantDMAHack">
<property name="text">
<string>Instant DMA Hack (Good for cache emulation problems)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="OPHFlagHack">
<property name="text">
<string>OPH Flag Hack (For Bleach Blade Battlers)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="GIFFIFOHack">
<property name="text">
<string>Emulate GIF FIFO (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="DMABusyHack">
<property name="text">
<string>DMA Busy Hack (Deny Writes When Busy)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIF1StallHack">
<property name="text">
<string>Delay VIF1 Stalls (For SOCOM 2 HUD/Spy Hunter)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VIFFIFOHack">
<property name="text">
<string>Emulate VIF FIFO (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="FullVU0SyncHack">
<property name="text">
<string>Full VU0 Synchronization (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="IbitHack">
<property name="text">
<string>VU I Bit Hack (For Scarface The World is Yours/Crash Tag Team Racing)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VuAddSubHack">
<property name="text">
<string>VU Add Hack (For Tri-Ace Games)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUOverflowHack">
<property name="text">
<string>VU Overflow Hack (Superman Returns)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="VUSyncHack">
<property name="text">
<string>VU Sync (Run Behind, M-Bit games)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="XgKickHack">
<property name="text">
<string>VU XGKick Sync (Correct But Slower)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="BlitInternalFPSHack">
<property name="text">
<string>Force Blit Internal FPS Detection (When auto-detection fails)</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>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>

View File

@ -105,6 +105,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
Pcsx2Config::GSOptions::FMVAspectRatioSwitchNames, FMVAspectRatioSwitchType::Off);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.interlacing, "EmuCore/GS", "deinterlace_mode", DEFAULT_INTERLACE_MODE);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.bilinearFiltering, "EmuCore/GS", "linear_present_mode", static_cast<int>(GSPostBilinearMode::BilinearSmooth));
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.widescreenPatches, "EmuCore", "EnableWideScreenPatches", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.noInterlacingPatches, "EmuCore", "EnableNoInterlacingPatches", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.integerScaling, "EmuCore/GS", "IntegerScaling", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOffsets, "EmuCore/GS", "pcrtc_offsets", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.PCRTCOverscan, "EmuCore/GS", "pcrtc_overscan", false);
@ -117,6 +119,12 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cropRight, "EmuCore/GS", "CropRight", 0);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.cropBottom, "EmuCore/GS", "CropBottom", 0);
dialog->registerWidgetHelp(m_ui.widescreenPatches, tr("Enable Widescreen Patches"), tr("Unchecked"),
tr("Automatically loads and applies widescreen patches on game start. Can cause issues."));
dialog->registerWidgetHelp(m_ui.noInterlacingPatches, tr("Enable No-Interlacing Patches"), tr("Unchecked"),
tr("Automatically loads and applies no-interlacing patches on game start. Can cause issues."));
connect(m_ui.integerScaling, &QCheckBox::stateChanged, this, &GraphicsSettingsWidget::onIntegerScalingChanged);
onIntegerScalingChanged();
@ -136,6 +144,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowIndicators, "EmuCore/GS", "OsdShowIndicators", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowSettings, "EmuCore/GS", "OsdShowSettings", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.osdShowInputs, "EmuCore/GS", "OsdShowInputs", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.warnAboutUnsafeSettings, "EmuCore", "WarnAboutUnsafeSettings", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fxaa, "EmuCore/GS", "fxaa", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.shadeBoost, "EmuCore/GS", "ShadeBoost", false);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.shadeBoostBrightness, "EmuCore/GS", "ShadeBoost_Brightness", false);
@ -165,6 +174,8 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsDialog* dialog, QWidget*
tr("Shows counters for internal graphical utilization, useful for debugging."));
dialog->registerWidgetHelp(m_ui.osdShowIndicators, tr("Show Indicators"), tr("Unchecked"),
tr("Shows OSD icon indicators for emulation states such as Pausing, Turbo, Fast Forward, and Slow Motion."));
dialog->registerWidgetHelp(m_ui.warnAboutUnsafeSettings, tr("Warn About Unsafe Settings"),
tr("Checked"), tr("Displays warnings when settings are enabled which may break games."));
dialog->registerWidgetHelp(m_ui.shadeBoost, tr("Shade Boost"), tr("Unchecked"),
tr("Enables saturation, contrast, and brightness to be adjusted. Values of brightness, saturation, and contrast are at default 50."));

View File

@ -322,42 +322,49 @@
</item>
<item row="8" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="1">
<widget class="QCheckBox" name="DisableInterlaceOffset">
<property name="text">
<string>Disable Interlace Offset</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="vsync">
<property name="text">
<string>VSync</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="integerScaling">
<property name="text">
<string>Integer Upscaling</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="PCRTCOverscan">
<property name="text">
<string>Show Overscan</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QCheckBox" name="PCRTCOffsets">
<property name="text">
<string>Screen Offsets</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="integerScaling">
<property name="text">
<string>Integer Upscaling</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="vsync">
<property name="text">
<string>VSync</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="PCRTCOverscan">
<property name="text">
<string>Show Overscan</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="widescreenPatches">
<property name="text">
<string>Enable Widescreen Patches</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="noInterlacingPatches">
<property name="text">
<string>Enable No-Interlacing Patches</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="PCRTCAntiBlur">
<property name="text">
<string>Anti-Blur</string>
@ -367,12 +374,19 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="DisableInterlaceOffset">
<property name="text">
<string>Disable Interlace Offset</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_17">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Bilinear Filtering</string>
<string>Bilinear Filtering:</string>
</property>
</widget>
</item>
@ -1482,38 +1496,10 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="osdShowSpeed">
<item row="4" column="1">
<widget class="QCheckBox" name="osdShowInputs">
<property name="text">
<string>Show Speed</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="osdShowCPU">
<property name="text">
<string>Show CPU Usage</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="osdShowGSStats">
<property name="text">
<string>Show Statistics</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowMessages">
<property name="text">
<string>Show Notifications</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="osdShowFPS">
<property name="text">
<string>Show FPS</string>
<string>Show Inputs</string>
</property>
</widget>
</item>
@ -1531,10 +1517,45 @@
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="osdShowInputs">
<item row="1" column="0">
<widget class="QCheckBox" name="osdShowFPS">
<property name="text">
<string>Show Inputs</string>
<string>Show FPS</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="osdShowMessages">
<property name="text">
<string>Show Notifications</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="osdShowGSStats">
<property name="text">
<string>Show Statistics</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="osdShowCPU">
<property name="text">
<string>Show CPU Usage</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="osdShowSpeed">
<property name="text">
<string>Show Speed</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QCheckBox" name="warnAboutUnsafeSettings">
<property name="text">
<string>Warn About Unsafe Settings</string>
</property>
</widget>
</item>

View File

@ -57,7 +57,6 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsDialog* dialog, QWidget
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.inhibitScreensaver, "EmuCore", "InhibitScreensaver", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.confirmShutdown, "UI", "ConfirmShutdown", true);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveStateOnShutdown, "EmuCore", "SaveStateOnShutdown", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pauseOnStart, "UI", "StartPaused", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pauseOnFocusLoss, "UI", "PauseOnFocusLoss", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.backupSaveStates, "EmuCore", "BackupSavestate", false);
@ -74,9 +73,14 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsDialog* dialog, QWidget
MainWindow::DEFAULT_THEME_NAME);
connect(m_ui.theme, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { emit themeChanged(); });
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."));
// Per-game settings is special, we don't want to bind it if we're editing per-game settings.
m_ui.perGameSettings->setEnabled(!dialog->isPerGameSettings());
if (!dialog->isPerGameSettings())
{
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pauseOnStart, "UI", "StartPaused", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.perGameSettings, "EmuCore", "EnablePerGameSettings", true);
connect(m_ui.perGameSettings, &QCheckBox::stateChanged, g_emu_thread, &EmuThread::reloadGameSettings);
}
if (!dialog->isPerGameSettings() && AutoUpdaterDialog::isSupported())
{
@ -114,6 +118,9 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsDialog* dialog, QWidget
m_ui.pauseOnStart->setEnabled(false);
}
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(
m_ui.confirmShutdown, tr("Confirm Shutdown"), tr("Checked"),
tr("Determines whether a prompt will be displayed to confirm shutting down the virtual machine "
@ -138,6 +145,8 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsDialog* dialog, QWidget
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(m_ui.perGameSettings, tr("Enable Per-Game Settings"), tr("Checked"),
tr("When enabled, custom per-game settings will be appled. Disable to always use the global configuration."));
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."));

View File

@ -74,13 +74,20 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="4" column="1">
<widget class="QCheckBox" name="discordPresence">
<property name="text">
<string>Enable Discord Presence</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="perGameSettings">
<property name="text">
<string>Enable Per-Game Settings</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -89,52 +96,48 @@
<property name="title">
<string>Game Display</string>
</property>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="0">
<widget class="QCheckBox" name="disableWindowResizing">
<property name="text">
<string>Disable Window Resizing</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="startFullscreen">
<property name="text">
<string>Start Fullscreen</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="doubleClickTogglesFullscreen">
<property name="text">
<string>Double-Click Toggles Fullscreen</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="renderToSeparateWindow">
<property name="text">
<string>Render To Separate Window</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="hideMouseCursor">
<property name="text">
<string>Hide Cursor In Fullscreen</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="hideMainWindow">
<property name="text">
<string>Hide Main Window When Running</string>
</property>
</widget>
</item>
</layout>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QCheckBox" name="startFullscreen">
<property name="text">
<string>Start Fullscreen</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="doubleClickTogglesFullscreen">
<property name="text">
<string>Double-Click Toggles Fullscreen</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="renderToSeparateWindow">
<property name="text">
<string>Render To Separate Window</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="hideMainWindow">
<property name="text">
<string>Hide Main Window When Running</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="disableWindowResizing">
<property name="text">
<string>Disable Window Resizing</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="hideMouseCursor">
<property name="text">
<string>Hide Cursor In Fullscreen</string>
</property>
</widget>
</item>
</layout>
</widget>

View File

@ -28,7 +28,7 @@
#include "QtUtils.h"
#include "SettingsDialog.h"
#include "AdvancedSystemSettingsWidget.h"
#include "AdvancedSettingsWidget.h"
#include "AudioSettingsWidget.h"
#include "BIOSSettingsWidget.h"
#include "EmulationSettingsWidget.h"
@ -41,7 +41,6 @@
#include "HotkeySettingsWidget.h"
#include "InterfaceSettingsWidget.h"
#include "MemoryCardSettingsWidget.h"
#include "SystemSettingsWidget.h"
#include "Python2SettingsWidget.h"
#ifdef ENABLE_ACHIEVEMENTS
@ -73,7 +72,7 @@ SettingsDialog::SettingsDialog(QWidget* parent, std::unique_ptr<SettingsInterfac
void SettingsDialog::setupUi(const GameList::Entry* game)
{
const bool show_advanced_settings = true;
const bool show_advanced_settings = QtHost::ShouldShowAdvancedSettings();
m_ui.setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
@ -108,20 +107,12 @@ void SettingsDialog::setupUi(const GameList::Entry* game)
// Common to both per-game and global settings.
addWidget(m_emulation_settings = new EmulationSettingsWidget(this, m_ui.settingsContainer), tr("Emulation"), QStringLiteral("dashboard-line"),
tr("<strong>Emulation Settings</strong><hr>These options determine the configuration of frame pacing and game settings.<br><br>Mouse over an option for additional information."));
addWidget(m_system_settings = new SystemSettingsWidget(this, m_ui.settingsContainer), tr("System"), QStringLiteral("artboard-2-line"),
tr("<strong>System Settings</strong><hr>These options determine the configuration of the simulated console.<br><br>Mouse over an option for additional information."));
if (show_advanced_settings)
// Only show the game fixes for per-game settings, there's really no reason to be setting them globally.
if (show_advanced_settings && isPerGameSettings())
{
addWidget(m_advanced_system_settings = new AdvancedSystemSettingsWidget(this, m_ui.settingsContainer), tr("Advanced System"),
QStringLiteral("artboard-2-line"), tr("<strong>Advanced System Settings</strong><hr>These are Advanced options to determine the configuration of the simulated console.<br><br>Mouse over an option for additional information."));
// Only show the game fixes for per-game settings, there's really no reason to be setting them globally.
if (isPerGameSettings())
{
addWidget(m_game_fix_settings_widget = new GameFixSettingsWidget(this, m_ui.settingsContainer), tr("Game Fix"),
QStringLiteral("close-line"), tr("<strong>Game Fix Settings</strong><hr>Gamefixes can work around incorrect emulation in some titles<br>however they can also cause problems in games if used incorrectly.<br>It is best to leave them all disabled unless advised otherwise."));
}
addWidget(m_game_fix_settings_widget = new GameFixSettingsWidget(this, m_ui.settingsContainer), tr("Game Fix"),
QStringLiteral("close-line"), tr("<strong>Game Fix Settings</strong><hr>Gamefixes can work around incorrect emulation in some titles<br>however they can also cause problems in games if used incorrectly.<br>It is best to leave them all disabled unless advised otherwise."));
}
addWidget(m_graphics_settings = new GraphicsSettingsWidget(this, m_ui.settingsContainer), tr("Graphics"), QStringLiteral("brush-line"),
@ -180,6 +171,12 @@ void SettingsDialog::setupUi(const GameList::Entry* game)
#endif
}
if (show_advanced_settings)
{
addWidget(m_advanced_settings = new AdvancedSettingsWidget(this, m_ui.settingsContainer), tr("Advanced"),
QStringLiteral("artboard-2-line"), tr("<strong>Advanced Settings</strong><hr>These are advanced options to determine the configuration of the simulated console.<br><br>Mouse over an option for additional information."));
}
m_ui.settingsCategory->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
m_ui.settingsCategory->setCurrentRow(0);
m_ui.settingsContainer->setCurrentIndex(0);

View File

@ -33,8 +33,6 @@ class InterfaceSettingsWidget;
class GameListSettingsWidget;
class EmulationSettingsWidget;
class BIOSSettingsWidget;
class SystemSettingsWidget;
class AdvancedSystemSettingsWidget;
class GameFixSettingsWidget;
class GraphicsSettingsWidget;
class AudioSettingsWidget;
@ -43,6 +41,7 @@ class FolderSettingsWidget;
class DEV9SettingsWidget;
class Python2SettingsWidget;
class AchievementSettingsWidget;
class AdvancedSettingsWidget;
class SettingsDialog final : public QDialog
{
@ -62,8 +61,6 @@ public:
__fi GameListSettingsWidget* getGameListSettingsWidget() const { return m_game_list_settings; }
__fi BIOSSettingsWidget* getBIOSSettingsWidget() const { return m_bios_settings; }
__fi EmulationSettingsWidget* getEmulationSettingsWidget() const { return m_emulation_settings; }
__fi SystemSettingsWidget* getSystemSettingsWidget() const { return m_system_settings; }
__fi AdvancedSystemSettingsWidget* getAdvancedSystemSettingsWidget() const { return m_advanced_system_settings; }
__fi GameFixSettingsWidget* getGameFixSettingsWidget() const { return m_game_fix_settings_widget; }
__fi GraphicsSettingsWidget* getGraphicsSettingsWidget() const { return m_graphics_settings; }
__fi AudioSettingsWidget* getAudioSettingsWidget() const { return m_audio_settings; }
@ -72,6 +69,7 @@ public:
__fi DEV9SettingsWidget* getDEV9SettingsWidget() const { return m_dev9_settings; }
__fi Python2SettingsWidget* getPython2SettingsWidget() const { return m_python2_settings; }
__fi AchievementSettingsWidget* getAchievementSettingsWidget() const { return m_achievement_settings; }
__fi AdvancedSettingsWidget* getAdvancedSettingsWidget() const { return m_advanced_settings; }
void registerWidgetHelp(QObject* object, QString title, QString recommended_value, QString text);
bool eventFilter(QObject* object, QEvent* event) override;
@ -123,8 +121,6 @@ private:
GameListSettingsWidget* m_game_list_settings = nullptr;
BIOSSettingsWidget* m_bios_settings = nullptr;
EmulationSettingsWidget* m_emulation_settings = nullptr;
SystemSettingsWidget* m_system_settings = nullptr;
AdvancedSystemSettingsWidget* m_advanced_system_settings = nullptr;
GameFixSettingsWidget* m_game_fix_settings_widget = nullptr;
GraphicsSettingsWidget* m_graphics_settings = nullptr;
AudioSettingsWidget* m_audio_settings = nullptr;
@ -133,6 +129,7 @@ private:
DEV9SettingsWidget* m_dev9_settings = nullptr;
Python2SettingsWidget* m_python2_settings = nullptr;
AchievementSettingsWidget* m_achievement_settings = nullptr;
AdvancedSettingsWidget* m_advanced_settings = nullptr;
std::array<QString, MAX_SETTINGS_WIDGETS> m_category_help_text;

View File

@ -33,13 +33,13 @@
</property>
<property name="minimumSize">
<size>
<width>150</width>
<width>160</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>150</width>
<width>160</width>
<height>16777215</height>
</size>
</property>

View File

@ -1,156 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2022 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include <QtWidgets/QMessageBox>
#include <algorithm>
#include "pcsx2/HostSettings.h"
#include "QtHost.h"
#include "QtUtils.h"
#include "SettingWidgetBinder.h"
#include "SettingsDialog.h"
#include "SystemSettingsWidget.h"
static constexpr int MINIMUM_EE_CYCLE_RATE = -3;
static constexpr int MAXIMUM_EE_CYCLE_RATE = 3;
static constexpr int DEFAULT_EE_CYCLE_RATE = 0;
static constexpr int DEFAULT_EE_CYCLE_SKIP = 0;
SystemSettingsWidget::SystemSettingsWidget(SettingsDialog* dialog, QWidget* parent)
: QWidget(parent)
, m_dialog(dialog)
{
SettingsInterface* sif = dialog->getSettingsInterface();
m_ui.setupUi(this);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeCycleSkipping, "EmuCore/Speedhacks", "EECycleSkip", DEFAULT_EE_CYCLE_SKIP);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.affinityControl, "EmuCore/CPU", "AffinityControlMode", 0);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.MTVU, "EmuCore/Speedhacks", "vuThread", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.instantVU1, "EmuCore/Speedhacks", "vu1Instant", true);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.eeRoundingMode, "EmuCore/CPU", "FPU.Roundmode", 3);
SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.vuRoundingMode, "EmuCore/CPU", "VU.Roundmode", 3);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.fastCDVD, "EmuCore/Speedhacks", "fastCDVD", false);
// Allow for FastCDVD for per-game settings only
m_ui.fastCDVD->setEnabled(m_dialog->isPerGameSettings());
if (m_dialog->isPerGameSettings())
{
m_ui.eeCycleRate->insertItem(
0, tr("Use Global Setting [%1]")
.arg(m_ui.eeCycleRate->itemText(
std::clamp(Host::GetBaseIntSettingValue("EmuCore/Speedhacks", "EECycleRate", DEFAULT_EE_CYCLE_RATE) - MINIMUM_EE_CYCLE_RATE,
0, MAXIMUM_EE_CYCLE_RATE - MINIMUM_EE_CYCLE_RATE))));
m_ui.eeClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.eeClampMode->itemText(getGlobalClampingModeIndex(false))));
m_ui.vuClampMode->insertItem(0, tr("Use Global Setting [%1]").arg(m_ui.vuClampMode->itemText(getGlobalClampingModeIndex(true))));
}
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) {
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);
});
m_ui.eeClampMode->setCurrentIndex(getClampingModeIndex(false));
m_ui.vuClampMode->setCurrentIndex(getClampingModeIndex(true));
connect(m_ui.eeClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(false, index); });
connect(m_ui.vuClampMode, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) { setClampingMode(true, index); });
dialog->registerWidgetHelp(m_ui.eeCycleRate, tr("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("Cycle Skip"), tr("None"),
tr("Makes the emulated Emotion Engine skip cycles. "
"Helps a small subset of games like SOTC. Most of the time it's harmful to performance."));
dialog->registerWidgetHelp(m_ui.MTVU, tr("MTVU (Multi-threaded VU1)"), tr("Checked"),
tr("Generally a speedup on CPUs with 3 or more threads. "
"Safe for most games, but a few are incompatible and may hang."));
dialog->registerWidgetHelp(m_ui.instantVU1, tr("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."));
dialog->registerWidgetHelp(m_ui.fastCDVD, tr("Enable Fast CDVD"), tr("Unchecked"),
tr("Fast disc access, less loading times. Check HDLoader compatibility lists for known games that have issues with this."));
}
SystemSettingsWidget::~SystemSettingsWidget() = default;
int SystemSettingsWidget::getGlobalClampingModeIndex(bool vu) const
{
if (Host::GetBaseBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuSignOverflow" : "fpuFullMode", false))
return 3;
if (Host::GetBaseBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuExtraOverflow" : "fpuExtraOverflow", false))
return 2;
if (Host::GetBaseBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuOverflow" : "fpuOverflow", true))
return 1;
return 0;
}
int SystemSettingsWidget::getClampingModeIndex(bool vu) 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);
std::optional<bool> third = m_dialog->getBoolValue("EmuCore/CPU/Recompiler", vu ? "vuSignOverflow" : "fpuFullMode", default_false);
std::optional<bool> second = m_dialog->getBoolValue("EmuCore/CPU/Recompiler", vu ? "vuExtraOverflow" : "fpuExtraOverflow", default_false);
std::optional<bool> first = m_dialog->getBoolValue("EmuCore/CPU/Recompiler", vu ? "vuOverflow" : "fpuOverflow", default_true);
if (third.has_value() && third.value())
return base + 3;
if (second.has_value() && second.value())
return base + 2;
if (first.has_value() && first.value())
return base + 1;
else if (first.has_value())
return base + 0; // none
else
return 0; // no per game override
}
void SystemSettingsWidget::setClampingMode(bool vu, int index)
{
std::optional<bool> first, second, third;
if (!m_dialog->isPerGameSettings() || index > 0)
{
const bool base = m_dialog->isPerGameSettings() ? 1 : 0;
third = (index >= (base + 3));
second = (index >= (base + 2));
first = (index >= (base + 1));
}
m_dialog->setBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuSignOverflow" : "fpuFullMode", third);
m_dialog->setBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuExtraOverflow" : "fpuExtraOverflow", second);
m_dialog->setBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuOverflow" : "fpuOverflow", first);
}

View File

@ -1,347 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SystemSettingsWidget</class>
<widget class="QWidget" name="SystemSettingsWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>648</width>
<height>454</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,0,1">
<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>EmotionEngine (EE, MIPS-IV)</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Cycle Rate:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="eeCycleRate">
<item>
<property name="text">
<string>50% Speed</string>
</property>
</item>
<item>
<property name="text">
<string>60% Speed</string>
</property>
</item>
<item>
<property name="text">
<string>75% Speed</string>
</property>
</item>
<item>
<property name="text">
<string>100% (Normal Speed)</string>
</property>
</item>
<item>
<property name="text">
<string>130% Speed</string>
</property>
</item>
<item>
<property name="text">
<string>180% Speed</string>
</property>
</item>
<item>
<property name="text">
<string>300% Speed</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>Cycle Skip:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="eeCycleSkipping">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Mild Underclock</string>
</property>
</item>
<item>
<property name="text">
<string>Moderate Underclock</string>
</property>
</item>
<item>
<property name="text">
<string>Maximum Underclock</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Rounding Mode:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="eeRoundingMode">
<item>
<property name="text">
<string>Nearest</string>
</property>
</item>
<item>
<property name="text">
<string>Negative</string>
</property>
</item>
<item>
<property name="text">
<string>Positive</string>
</property>
</item>
<item>
<property name="text">
<string>Chop / Zero (Default)</string>
</property>
</item>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>Clamping Mode:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="eeClampMode">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Normal (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Extra + Preserve Sign</string>
</property>
</item>
<item>
<property name="text">
<string>Full</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Affinity Control:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="affinityControl">
<item>
<property name="text">
<string>Disabled</string>
</property>
</item>
<item>
<property name="text">
<string>EE &gt; VU &gt; GS</string>
</property>
</item>
<item>
<property name="text">
<string>EE &gt; GS &gt; VU</string>
</property>
</item>
<item>
<property name="text">
<string>VU &gt; EE &gt; GS</string>
</property>
</item>
<item>
<property name="text">
<string>VU &gt; GS &gt; EE</string>
</property>
</item>
<item>
<property name="text">
<string>GS &gt; EE &gt; VU</string>
</property>
</item>
<item>
<property name="text">
<string>GS &gt; VU &gt; EE</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Vector Units (VU)</string>
</property>
<layout class="QFormLayout" name="formLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Rounding Mode:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="vuRoundingMode">
<item>
<property name="text">
<string>Nearest</string>
</property>
</item>
<item>
<property name="text">
<string>Negative</string>
</property>
</item>
<item>
<property name="text">
<string>Positive</string>
</property>
</item>
<item>
<property name="text">
<string>Chop / Zero (Default)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Clamping Mode:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="vuClampMode">
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Normal (Default)</string>
</property>
</item>
<item>
<property name="text">
<string>Extra</string>
</property>
</item>
<item>
<property name="text">
<string>Extra + Preserve Sign</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QCheckBox" name="MTVU">
<property name="text">
<string>MTVU (Multi-Threaded VU1)</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="instantVU1">
<property name="text">
<string>Instant VU1</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>I/O Processor (IOP, MIPS-I)</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
<widget class="QCheckBox" name="fastCDVD">
<property name="text">
<string>Enable Fast CDVD</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../resources/resources.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -0,0 +1,128 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2022 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include "InputRecordingViewer.h"
#include "QtUtils.h"
#include <QtCore/QString>
#include <QtWidgets/QDialog>
#include <QtWidgets/qfiledialog.h>
// TODO - for now this uses a very naive implementation that fills the entire table
// this needs to be replaced with a lazy-loading QTableView implementation
//
// For now, especially for just debugging input recording issues, its good enough!
InputRecordingViewer::InputRecordingViewer(QWidget* parent)
: QMainWindow(parent)
{
m_ui.setupUi(this);
m_ui.tableWidget->setSelectionMode(QAbstractItemView::NoSelection);
connect(m_ui.actionOpen, &QAction::triggered, this, &InputRecordingViewer::openFile);
connect(m_ui.actionClose, &QAction::triggered, this, &InputRecordingViewer::closeFile);
}
QTableWidgetItem* InputRecordingViewer::createRowItem(std::tuple<u8, u8> analog)
{
const auto [left, right] = analog;
return new QTableWidgetItem(tr("%1 %2").arg(left).arg(right));
}
QTableWidgetItem* InputRecordingViewer::createRowItem(bool pressed)
{
return new QTableWidgetItem(tr("%1").arg(pressed));
}
QTableWidgetItem* InputRecordingViewer::createRowItem(std::tuple<bool, u8> buttonInfo)
{
const auto [isPressed, pressure] = buttonInfo;
return new QTableWidgetItem(tr("%1 [%2]").arg(isPressed).arg(pressure));
}
void InputRecordingViewer::loadTable()
{
static const auto headers = QStringList({"Left Analog", "Right Analog", "Cross", "Square", "Triangle", "Circle", "L1", "R1", "L2", "R2", "⬇️", "➡️", "⬆️", "⬅️", "L3", "R3", "Select", "Start"});
m_ui.tableWidget->setColumnCount(headers.length());
m_ui.tableWidget->setHorizontalHeaderLabels(headers);
// TODO - only port 1 for now
auto dataColl = m_file.bulkReadPadData(0, m_file.getTotalFrames(), 0);
m_ui.tableWidget->setRowCount(dataColl.size());
int frameNum = 0;
for (const auto& frameData : dataColl)
{
m_ui.tableWidget->setItem(frameNum, 0, createRowItem(frameData.m_leftAnalog));
m_ui.tableWidget->setItem(frameNum, 1, createRowItem(frameData.m_rightAnalog));
m_ui.tableWidget->setItem(frameNum, 2, createRowItem(frameData.m_cross));
m_ui.tableWidget->setItem(frameNum, 3, createRowItem(frameData.m_square));
m_ui.tableWidget->setItem(frameNum, 4, createRowItem(frameData.m_triangle));
m_ui.tableWidget->setItem(frameNum, 5, createRowItem(frameData.m_circle));
m_ui.tableWidget->setItem(frameNum, 6, createRowItem(frameData.m_l1));
m_ui.tableWidget->setItem(frameNum, 7, createRowItem(frameData.m_l2));
m_ui.tableWidget->setItem(frameNum, 8, createRowItem(frameData.m_r1));
m_ui.tableWidget->setItem(frameNum, 9, createRowItem(frameData.m_r2));
m_ui.tableWidget->setItem(frameNum, 10, createRowItem(frameData.m_down));
m_ui.tableWidget->setItem(frameNum, 11, createRowItem(frameData.m_right));
m_ui.tableWidget->setItem(frameNum, 12, createRowItem(frameData.m_up));
m_ui.tableWidget->setItem(frameNum, 13, createRowItem(frameData.m_left));
m_ui.tableWidget->setItem(frameNum, 14, createRowItem(frameData.m_l3));
m_ui.tableWidget->setItem(frameNum, 15, createRowItem(frameData.m_r3));
m_ui.tableWidget->setItem(frameNum, 16, createRowItem(frameData.m_select));
m_ui.tableWidget->setItem(frameNum, 17, createRowItem(frameData.m_select));
frameNum++;
}
}
void InputRecordingViewer::openFile()
{
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.setWindowTitle("Select a File");
dialog.setNameFilter(tr("Input Recording Files (*.p2m2)"));
QStringList fileNames;
if (dialog.exec())
{
fileNames = dialog.selectedFiles();
}
if (!fileNames.isEmpty())
{
const std::string fileName = fileNames.first().toStdString();
m_file_open = m_file.openExisting(fileName);
m_ui.actionClose->setEnabled(m_file_open);
if (m_file_open)
{
loadTable();
} // TODO else error
}
}
void InputRecordingViewer::closeFile()
{
if (m_file_open)
{
m_file_open = !m_file.close();
if (!m_file_open)
{
m_ui.tableWidget->clearContents();
m_ui.tableWidget->setRowCount(0);
}
} // TODO else error
m_ui.actionClose->setEnabled(m_file_open);
}

View File

@ -15,20 +15,30 @@
#pragma once
#include <QtWidgets/QWidget>
#include "ui_InputRecordingViewer.h"
#include "ui_AdvancedSystemSettingsWidget.h"
#include "pcsx2/Recording/InputRecordingFile.h"
class SettingsDialog;
class AdvancedSystemSettingsWidget : public QWidget
class InputRecordingViewer final : public QMainWindow
{
Q_OBJECT
public:
AdvancedSystemSettingsWidget(SettingsDialog* dialog, QWidget* parent);
~AdvancedSystemSettingsWidget();
explicit InputRecordingViewer(QWidget* parent = nullptr);
~InputRecordingViewer() = default;
private Q_SLOTS:
void openFile();
void closeFile();
private:
Ui::AdvancedSystemSettingsWidget m_ui;
Ui::InputRecordingViewer m_ui;
InputRecordingFile m_file;
bool m_file_open;
void loadTable();
QTableWidgetItem* createRowItem(std::tuple<u8, u8> analog);
QTableWidgetItem* createRowItem(bool pressed);
QTableWidgetItem* createRowItem(std::tuple<bool, u8> buttonInfo);
};

View File

@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>InputRecordingViewer</class>
<widget class="QMainWindow" name="InputRecordingViewer">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>Input Recording Viewer</string>
</property>
<widget class="QWidget" name="centralwidget">
<property name="enabled">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTableWidget" name="tableWidget"/>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
<addaction name="actionOpen"/>
<addaction name="actionClose"/>
</widget>
<widget class="QMenu" name="menuTest">
<property name="title">
<string>Edit</string>
</property>
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
<string>View</string>
</property>
</widget>
<addaction name="menuFile"/>
<addaction name="menuTest"/>
<addaction name="menuView"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
<action name="actionOpen">
<property name="text">
<string>Open</string>
</property>
</action>
<action name="actionClose">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Close</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="9"/>
<resources/>
<connections/>
</ui>

View File

@ -141,6 +141,7 @@
<ClCompile Include="QtProgressCallback.cpp" />
<ClCompile Include="Settings\FolderSettingsWidget.cpp" />
<ClCompile Include="Settings\MemoryCardConvertWorker.cpp" />
<ClCompile Include="Tools\InputRecording\InputRecordingViewer.cpp" />
<ClCompile Include="Tools\InputRecording\NewInputRecordingDlg.cpp" />
<ClCompile Include="Settings\BIOSSettingsWidget.cpp" />
<ClCompile Include="Settings\ControllerBindingWidgets.cpp" />
@ -150,9 +151,8 @@
<ClCompile Include="Settings\GameListSettingsWidget.cpp" />
<ClCompile Include="Settings\GraphicsSettingsWidget.cpp" />
<ClCompile Include="Settings\InterfaceSettingsWidget.cpp" />
<ClCompile Include="Settings\SystemSettingsWidget.cpp" />
<ClCompile Include="Settings\SettingsDialog.cpp" />
<ClCompile Include="Settings\AdvancedSystemSettingsWidget.cpp" />
<ClCompile Include="Settings\AdvancedSettingsWidget.cpp" />
<ClCompile Include="Settings\GameFixSettingsWidget.cpp" />
<ClCompile Include="Settings\HotkeySettingsWidget.cpp" />
<ClCompile Include="Settings\InputBindingDialog.cpp" />
@ -186,14 +186,13 @@
<ClCompile Include="QtUtils.cpp" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="Settings\SystemSettingsWidget.h" />
<QtMoc Include="Settings\InterfaceSettingsWidget.h" />
<QtMoc Include="Settings\GameListSettingsWidget.h" />
<QtMoc Include="Settings\BIOSSettingsWidget.h" />
<QtMoc Include="Settings\EmulationSettingsWidget.h" />
<QtMoc Include="Settings\GraphicsSettingsWidget.h" />
<QtMoc Include="Settings\SettingsDialog.h" />
<QtMoc Include="Settings\AdvancedSystemSettingsWidget.h" />
<QtMoc Include="Settings\AdvancedSettingsWidget.h" />
<QtMoc Include="Settings\GameFixSettingsWidget.h" />
<QtMoc Include="Settings\HotkeySettingsWidget.h" />
<QtMoc Include="Settings\InputBindingDialog.h" />
@ -219,6 +218,7 @@
<QtMoc Include="GameList\GameListWidget.h" />
<QtMoc Include="GameList\GameListRefreshThread.h" />
<QtMoc Include="Tools\InputRecording\NewInputRecordingDlg.h" />
<QtMoc Include="Tools\InputRecording\InputRecordingViewer.h" />
<ClInclude Include="QtUtils.h" />
<QtMoc Include="Settings\ControllerBindingWidgets.h" />
<QtMoc Include="Settings\ControllerGlobalSettingsWidget.h" />
@ -247,9 +247,8 @@
<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_SystemSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_SettingsDialog.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_AdvancedSystemSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_AdvancedSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_GameFixSettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_HotkeySettingsWidget.cpp" />
<ClCompile Include="$(IntDir)Settings\moc_InputBindingDialog.cpp" />
@ -277,6 +276,7 @@
<ClCompile Include="$(IntDir)moc_QtHost.cpp" />
<ClCompile Include="$(IntDir)moc_QtProgressCallback.cpp" />
<ClCompile Include="$(IntDir)Tools\InputRecording\moc_NewInputRecordingDlg.cpp" />
<ClCompile Include="$(IntDir)Tools\InputRecording\moc_InputRecordingViewer.cpp" />
<ClCompile Include="$(IntDir)qrc_resources.cpp">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
@ -294,9 +294,6 @@
<QtUi Include="Settings\SettingsDialog.ui">
<FileType>Document</FileType>
</QtUi>
<QtUi Include="Settings\SystemSettingsWidget.ui">
<FileType>Document</FileType>
</QtUi>
<QtUi Include="Settings\GameListSettingsWidget.ui">
<FileType>Document</FileType>
</QtUi>
@ -312,7 +309,7 @@
<QtUi Include="Settings\InterfaceSettingsWidget.ui">
<FileType>Document</FileType>
</QtUi>
<QtUi Include="Settings\AdvancedSystemSettingsWidget.ui">
<QtUi Include="Settings\AdvancedSettingsWidget.ui">
<FileType>Document</FileType>
</QtUi>
<QtUi Include="Settings\GameFixSettingsWidget.ui">
@ -375,6 +372,9 @@
<QtUi Include="Settings\AchievementSettingsWidget.ui">
<FileType>Document</FileType>
</QtUi>
<QtUi Include="Tools\InputRecording\InputRecordingViewer.ui">
<FileType>Document</FileType>
</QtUi>
</ItemGroup>
<ItemGroup>
<QtUi Include="Settings\ControllerMacroEditWidget.ui">
@ -388,4 +388,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="$(SolutionDir)common\vsprops\QtCompile.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
</Project>

View File

@ -65,9 +65,6 @@
<ClCompile Include="Settings\SettingsDialog.cpp">
<Filter>Settings</Filter>
</ClCompile>
<ClCompile Include="Settings\SystemSettingsWidget.cpp">
<Filter>Settings</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_BIOSSettingsWidget.cpp">
<Filter>moc</Filter>
</ClCompile>
@ -86,13 +83,10 @@
<ClCompile Include="$(IntDir)Settings\moc_SettingsDialog.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_SystemSettingsWidget.cpp">
<ClCompile Include="$(IntDir)Settings\moc_AdvancedSettingsWidget.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_AdvancedSystemSettingsWidget.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="Settings\AdvancedSystemSettingsWidget.cpp">
<ClCompile Include="Settings\AdvancedSettingsWidget.cpp">
<Filter>Settings</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Settings\moc_GameFixSettingsWidget.cpp">
@ -223,6 +217,9 @@
<ClCompile Include="$(IntDir)Tools\InputRecording\moc_NewInputRecordingDlg.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Tools\InputRecording\moc_InputRecordingViewer.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="Tools\InputRecording\NewInputRecordingDlg.cpp">
<Filter>Tools\Input Recording</Filter>
</ClCompile>
@ -256,6 +253,9 @@
<ClCompile Include="Settings\MemoryCardConvertWorker.cpp">
<Filter>Settings</Filter>
</ClCompile>
<ClCompile Include="Tools\InputRecording\InputRecordingViewer.cpp">
<Filter>Tools\Input Recording</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="..\pcsx2\windows\PCSX2.manifest">
@ -281,6 +281,9 @@
<ClInclude Include="Settings\MemoryCardConvertWorker.h">
<Filter>Settings</Filter>
</ClInclude>
<ClInclude Include="Tools\InputRecording\InputRecordingViewer.h">
<Filter>Tools\Input Recording</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<QtMoc Include="MainWindow.h" />
@ -303,10 +306,7 @@
<QtMoc Include="Settings\SettingsDialog.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="Settings\SystemSettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="Settings\AdvancedSystemSettingsWidget.h">
<QtMoc Include="Settings\AdvancedSettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="Settings\GameFixSettingsWidget.h">
@ -403,13 +403,10 @@
<QtUi Include="Settings\InterfaceSettingsWidget.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\SystemSettingsWidget.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\SettingsDialog.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\AdvancedSystemSettingsWidget.ui">
<QtUi Include="Settings\AdvancedSettingsWidget.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Settings\GameFixSettingsWidget.ui">
@ -480,6 +477,9 @@
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="CoverDownloadDialog.ui" />
<QtUi Include="Tools\InputRecording\InputRecordingViewer.ui">
<Filter>Tools\Input Recording</Filter>
</QtUi>
</ItemGroup>
<ItemGroup>
<None Include="Settings\FolderSettingsWidget.ui">

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zM4.003 9L4 20h11V9H4.003z" fill="#000000"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zM4.003 9L4 20h11V9H4.003z" fill="#000000"/></svg>

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 396 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M21 4v2h-1l-5 7.5V22H9v-8.5L4 6H3V4h18zM6.404 6L11 12.894V20h2v-7.106L17.596 6H6.404z" fill="#000000"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M21 4v2h-1l-5 7.5V22H9v-8.5L4 6H3V4h18zM6.404 6L11 12.894V20h2v-7.106L17.596 6H6.404z" fill="#000000"/></svg>

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 239 B

View File

@ -6,4 +6,4 @@ Comment=White Icon Theme
Size=64
Type=Scalable
MinSize=64
MaxSize=1024
MaxSize=1024

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.05 12.05L21 17l-4.95 4.95-1.414-1.414 2.536-2.537L4 18v-2h13.172l-2.536-2.536 1.414-1.414zm-8.1-10l1.414 1.414L6.828 6 20 6v2H6.828l2.536 2.536L7.95 11.95 3 7l4.95-4.95z" fill="#ffffff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.05 12.05L21 17l-4.95 4.95-1.414-1.414 2.536-2.537L4 18v-2h13.172l-2.536-2.536 1.414-1.414zm-8.1-10l1.414 1.414L6.828 6 20 6v2H6.828l2.536 2.536L7.95 11.95 3 7l4.95-4.95z" fill="#ffffff"/></svg>

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 327 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zM4.003 9L4 20h11V9H4.003z" fill="#ffffff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M7 7V3a1 1 0 0 1 1-1h13a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-4v3.993c0 .556-.449 1.007-1.007 1.007H3.007A1.006 1.006 0 0 1 2 20.993l.003-12.986C2.003 7.451 2.452 7 3.01 7H7zm2 0h6.993C16.549 7 17 7.449 17 8.007V15h3V4H9v3zM4.003 9L4 20h11V9H4.003z" fill="#ffffff"/></svg>

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 396 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M21 4v2h-1l-5 7.5V22H9v-8.5L4 6H3V4h18zM6.404 6L11 12.894V20h2v-7.106L17.596 6H6.404z" fill="#ffffff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0H24V24H0z"/><path d="M21 4v2h-1l-5 7.5V22H9v-8.5L4 6H3V4h18zM6.404 6L11 12.894V20h2v-7.106L17.596 6H6.404z" fill="#ffffff"/></svg>

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 239 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M13 9h8L11 24v-9H4l9-15v9zm-2 2V7.22L7.532 13H13v4.394L17.263 11H11z" fill="#ffffff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M13 9h8L11 24v-9H4l9-15v9zm-2 2V7.22L7.532 13H13v4.394L17.263 11H11z" fill="#ffffff"/></svg>

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 222 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.008 8.008 0 0 0 5.648 6.667zM10.03 13c.151 2.439.848 4.73 1.97 6.752A15.905 15.905 0 0 0 13.97 13h-3.94zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.008 8.008 0 0 0 19.938 13zM4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333 8.008 8.008 0 0 0 4.062 11zm5.969 0h3.938A15.905 15.905 0 0 0 12 4.248 15.905 15.905 0 0 0 10.03 11zm4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.008 8.008 0 0 0-5.648-6.667z" fill="#ffffff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm-2.29-2.333A17.9 17.9 0 0 1 8.027 13H4.062a8.008 8.008 0 0 0 5.648 6.667zM10.03 13c.151 2.439.848 4.73 1.97 6.752A15.905 15.905 0 0 0 13.97 13h-3.94zm9.908 0h-3.965a17.9 17.9 0 0 1-1.683 6.667A8.008 8.008 0 0 0 19.938 13zM4.062 11h3.965A17.9 17.9 0 0 1 9.71 4.333 8.008 8.008 0 0 0 4.062 11zm5.969 0h3.938A15.905 15.905 0 0 0 12 4.248 15.905 15.905 0 0 0 10.03 11zm4.259-6.667A17.9 17.9 0 0 1 15.973 11h3.965a8.008 8.008 0 0 0-5.648-6.667z" fill="#ffffff"/></svg>

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 667 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M20 5H4v14l9.292-9.294a1 1 0 0 1 1.414 0L20 15.01V5zM2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" fill="#ffffff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M20 5H4v14l9.292-9.294a1 1 0 0 1 1.414 0L20 15.01V5zM2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM8 11a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" fill="#ffffff"/></svg>

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 360 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10.9 2.1l9.899 1.415 1.414 9.9-9.192 9.192a1 1 0 0 1-1.414 0l-9.9-9.9a1 1 0 0 1 0-1.414L10.9 2.1zm.707 2.122L3.828 12l8.486 8.485 7.778-7.778-1.06-7.425-7.425-1.06zm2.12 6.364a2 2 0 1 1 2.83-2.829 2 2 0 0 1-2.83 2.829z" fill="#ffffff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10.9 2.1l9.899 1.415 1.414 9.9-9.192 9.192a1 1 0 0 1-1.414 0l-9.9-9.9a1 1 0 0 1 0-1.414L10.9 2.1zm.707 2.122L3.828 12l8.486 8.485 7.778-7.778-1.06-7.425-7.425-1.06zm2.12 6.364a2 2 0 1 1 2.83-2.829 2 2 0 0 1-2.83 2.829z" fill="#ffffff"/></svg>

Before

Width:  |  Height:  |  Size: 372 B

After

Width:  |  Height:  |  Size: 373 B

View File

@ -1099,8 +1099,11 @@ void cdvdReset()
// If we are recording, always use the same RTC setting
// for games that use the RTC to seed their RNG -- this is very important to be the same everytime!
#ifndef DISABLE_RECORDING
if (g_InputRecording.IsActive())
bool input_recording_active = false;
#ifdef PCSX2_CORE
input_recording_active = g_InputRecording.isActive();
#endif
if (input_recording_active)
{
Console.WriteLn("Input Recording Active - Using Constant RTC of 04-03-2020 (DD-MM-YYYY)");
// Why not just 0 everything? Some games apparently require the date to be valid in terms of when
@ -1113,7 +1116,6 @@ void cdvdReset()
cdvd.RTC.year = 20;
}
else
#endif
{
// CDVD internally uses GMT+9. If you think the time's wrong, you're wrong.
// Set up your time zone and winter/summer in the BIOS. No PS2 BIOS I know of features automatic DST.
@ -1658,13 +1660,18 @@ static uint cdvdStartSeek(uint newsector, CDVD_MODE_TYPE mode)
}
else
{
psxRegs.interrupt &= ~(1 << IopEvt_CdvdSectorReady);
cdvd.nextSectorsBuffered = 0;
if (delta >= cdvd.nextSectorsBuffered)
{
psxRegs.interrupt &= ~(1 << IopEvt_CdvdSectorReady);
cdvd.nextSectorsBuffered = 0;
}
else
cdvd.nextSectorsBuffered -= delta;
}
}
// Only do this on reads, the seek kind of accounts for this and then it reads the sectors after
if ((delta || cdvd.Action == cdvdAction_Seek) && !isSeeking)
if ((delta || cdvd.Action == cdvdAction_Seek) && !isSeeking && !cdvd.nextSectorsBuffered)
{
const u32 rotationalLatency = cdvdRotationalLatency((CDVD_MODE_TYPE)cdvdIsDVD());
//DevCon.Warning("%s rotational latency at sector %d is %d cycles", (cdvd.SpindlCtrl & CDVD_SPINDLE_CAV) ? "CAV" : "CLV", cdvd.SeekToSector, rotationalLatency);
@ -1672,8 +1679,19 @@ static uint cdvdStartSeek(uint newsector, CDVD_MODE_TYPE mode)
CDVDSECTORREADY_INT(seektime);
seektime += (cdvd.BlockSize / 4) * 12;
}
else
else if (!isSeeking) // Not seeking but we have buffered stuff, need to just account for DMA time (and kick the read DMA if it's not running for some reason.
{
if (!(psxRegs.interrupt & (1 << IopEvt_CdvdSectorReady)))
{
seektime += cdvd.ReadTime;
CDVDSECTORREADY_INT(seektime);
}
seektime += (cdvd.BlockSize / 4) * 12;
}
else // We're seeking, so kick off the buffering after the seek finishes.
{
CDVDSECTORREADY_INT(seektime);
}
// Clear the action on the following command, so we can rotate after seek.
if (cdvd.nCommand != N_CD_SEEK)

View File

@ -15,9 +15,8 @@
#pragma once
#if defined(_WIN32)
#define NOMINMAX
#include <windows.h>
#ifdef _WIN32
#include "common/RedtapeWindows.h"
#endif
#include <mutex>

View File

@ -1483,12 +1483,8 @@ set(pcsx2RecordingSources
${rec_src}/InputRecording.cpp
${rec_src}/InputRecordingControls.cpp
${rec_src}/InputRecordingFile.cpp
${rec_src}/NewRecordingFrame.cpp
${rec_src}/PadData.cpp
${rec_src}/Utilities/InputRecordingLogger.cpp
${rec_vp_src}/VirtualPad.cpp
${rec_vp_src}/VirtualPadData.cpp
${rec_vp_src}/VirtualPadResources.cpp
)
# Recording headers
@ -1496,38 +1492,8 @@ set(pcsx2RecordingHeaders
${rec_src}/InputRecording.h
${rec_src}/InputRecordingControls.h
${rec_src}/InputRecordingFile.h
${rec_src}/NewRecordingFrame.h
${rec_src}/PadData.h
${rec_src}/Utilities/InputRecordingLogger.h
${rec_vp_src}/VirtualPad.h
${rec_vp_src}/VirtualPadData.h
${rec_vp_src}/VirtualPadResources.h
)
# Warning: the declaration of the .h are mandatory in case of resources files. It will ensure the creation
# from the bin2cpp tools at the right moment (ie .h must be created before the pcsx2 compilation)
# Recording - VirtualPad resources headers
set(res_rec_vp_src "${CMAKE_SOURCE_DIR}/pcsx2/Recording/VirtualPad/img")
set(pcsx2RecordingVirtualPadResources
${res_rec_vp_src}/circlePressed.h
${res_rec_vp_src}/controllerFull.h
${res_rec_vp_src}/controllerHalf.h
${res_rec_vp_src}/controllerThreeQuarters.h
${res_rec_vp_src}/crossPressed.h
${res_rec_vp_src}/downPressed.h
${res_rec_vp_src}/l1Pressed.h
${res_rec_vp_src}/l2Pressed.h
${res_rec_vp_src}/l3Pressed.h
${res_rec_vp_src}/leftPressed.h
${res_rec_vp_src}/r1Pressed.h
${res_rec_vp_src}/r2Pressed.h
${res_rec_vp_src}/r3Pressed.h
${res_rec_vp_src}/rightPressed.h
${res_rec_vp_src}/selectPressed.h
${res_rec_vp_src}/squarePressed.h
${res_rec_vp_src}/startPressed.h
${res_rec_vp_src}/trianglePressed.h
${res_rec_vp_src}/upPressed.h
)
# System headers
@ -1832,18 +1798,6 @@ if(NOT PCSX2_CORE)
COMMAND ${BIN2CPP} "${res_src}/${res_file}.png" "${res_bin}/${res_file}"
)
endforeach()
### Generate Recording resource files
### Drop them into the folder alongside the png files
foreach(res_file IN ITEMS
circlePressed controllerFull controllerHalf controllerThreeQuarters crossPressed downPressed l1Pressed l2Pressed l3Pressed leftPressed
r1Pressed r2Pressed r3Pressed rightPressed selectPressed squarePressed startPressed trianglePressed upPressed)
add_custom_command(
OUTPUT "${res_rec_vp_src}/${res_file}.h"
DEPENDS ${BIN2CPPDEP} "${res_rec_vp_src}/${res_file}.png"
COMMAND ${BIN2CPP} "${res_rec_vp_src}/${res_file}.png" "${res_rec_vp_src}/${res_file}"
)
endforeach()
endif()
# additonal include directories

View File

@ -531,9 +531,6 @@ struct Pcsx2Config
UserHacks_TextureInsideRt : 1,
FXAA : 1,
ShadeBoost : 1,
#ifndef PCSX2_CORE
ShaderFX : 1,
#endif
DumpGSData : 1,
SaveRT : 1,
SaveFrame : 1,
@ -616,8 +613,6 @@ struct Pcsx2Config
int SaveN{0};
int SaveL{5000};
std::string Adapter;
std::string ShaderFX_Conf;
std::string ShaderFX_GLSL;
GSOptions();

View File

@ -36,13 +36,13 @@
#ifndef PCSX2_CORE
#include "gui/App.h"
#include "Recording/InputRecordingControls.h"
#else
#include "PAD/Host/PAD.h"
#include "Recording/InputRecording.h"
#include "VMManager.h"
#endif
#include "Recording/InputRecordingControls.h"
using namespace Threading;
extern u8 psxhblankgate;
@ -608,13 +608,6 @@ static __fi void frameLimit()
static __fi void VSyncStart(u32 sCycle)
{
if (EmuConfig.EnableRecordingTools)
{
// It is imperative that any frame locking that must happen occurs before Vsync is started
// Not doing so would sacrifice a frame of a savestate-based recording when loading any savestate
g_InputRecordingControls.HandlePausingAndLocking();
}
#ifdef PCSX2_CORE
// Update vibration at the end of a frame.
PAD::Update();
@ -674,11 +667,6 @@ static __fi void GSVSync()
static __fi void VSyncEnd(u32 sCycle)
{
if (EmuConfig.EnableRecordingTools)
{
g_InputRecordingControls.CheckPauseStatus();
}
if(EmuConfig.Trace.Enabled && EmuConfig.Trace.EE.m_EnableAll)
SysTrace.EE.Counters.Write( " ================ EE COUNTER VSYNC END (frame: %d) ================", g_FrameCount );

View File

@ -21,8 +21,7 @@
#ifdef _WIN32
#include "common/RedtapeWindows.h"
#include <Winioctl.h>
#include <windows.h>
#include <winioctl.h>
#else
#include <sys/types.h>
#include <sys/mman.h>

View File

@ -31,7 +31,7 @@
#ifdef _WIN32
#define usleep(x) Sleep(x / 1000)
#include <windows.h>
#include "common/RedtapeWindows.h"
#include <windowsx.h>
#include <winioctl.h>

View File

@ -21,9 +21,8 @@
#include "fmt/core.h"
#include <stdio.h>
#include <windows.h>
#include <winsock2.h>
#include <ws2ipdef.h>
#include <WinSock2.h>
#include <WS2tcpip.h>
#include <iphlpapi.h>
#include <Netcfgx.h>

View File

@ -19,12 +19,10 @@
#include <memory>
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <iphlpapi.h>
//#include <ws2tcpip.h>
//#include <comdef.h>
#include "common/RedtapeWindows.h"
#include "common/StringUtil.h"
#include <WinSock2.h>
#include <iphlpapi.h>
#elif defined(__linux__)
#include <sys/ioctl.h>
#include <net/if.h>

View File

@ -1 +1 @@
*.pdf
*.pdf

View File

@ -141,7 +141,7 @@ The clamp modes are also numerically based.
### GS Hardware General Fixes
* conservativeFramebuffer
[`0` or `1`]
[`0` or `1`]
{Off or On}
Default: On (`1`)
* texturePreloading

View File

@ -17,4 +17,3 @@
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/

View File

@ -198,4 +198,4 @@ For Linux users, PCSX2 will automatically detect and bind controls to any recogn
* [The original guide, outdated](https://forums.pcsx2.net/Thread-How-pnach-files-work).
### PCSX2 with Netplay Support
* [The latest Netplay fork of PCSX2](https://forums.pcsx2.net/Thread-PCSX2-Online-Plus).
* [The latest Netplay fork of PCSX2](https://forums.pcsx2.net/Thread-PCSX2-Online-Plus).

View File

@ -22,4 +22,4 @@ We thank everybody for their contributions to the project, but we would like to
- noigeaR
- xTVaser
- And 1 anonymous donator!
- And 1 anonymous donator!

View File

@ -24,7 +24,7 @@
#include "Host.h"
#include "HostDisplay.h"
#include "IconsFontAwesome5.h"
#include "Recording/InputRecordingControls.h"
#include "Recording/InputRecording.h"
#include "VMManager.h"
#ifdef ENABLE_ACHIEVEMENTS
@ -202,7 +202,7 @@ DEFINE_HOTKEY("ResetVM", "System", "Reset Virtual Machine", [](s32 pressed) {
})
DEFINE_HOTKEY("InputRecToggleMode", "System", "Toggle Input Recording Mode", [](s32 pressed) {
if (!pressed && VMManager::HasValidVM())
g_InputRecordingControls.RecordModeToggle();
g_InputRecording.getControls().toggleRecordMode();
})
DEFINE_HOTKEY("PreviousSaveStateSlot", "Save States", "Select Previous Save Slot", [](s32 pressed) {

View File

@ -472,26 +472,26 @@ static std::string GetDriverVersionFromLUID(const LUID& luid)
std::string ret;
HKEY hKey;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\DirectX"), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectX", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
DWORD max_key_len = 0, adapter_count = 0;
if (RegQueryInfoKey(hKey, nullptr, nullptr, nullptr, &adapter_count, &max_key_len,
if (RegQueryInfoKeyW(hKey, nullptr, nullptr, nullptr, &adapter_count, &max_key_len,
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr) == ERROR_SUCCESS)
{
std::vector<TCHAR> current_name(max_key_len + 1);
for (DWORD i = 0; i < adapter_count; ++i)
{
DWORD subKeyLength = static_cast<DWORD>(current_name.size());
if (RegEnumKeyEx(hKey, i, current_name.data(), &subKeyLength, nullptr, nullptr, nullptr, nullptr) == ERROR_SUCCESS)
if (RegEnumKeyExW(hKey, i, current_name.data(), &subKeyLength, nullptr, nullptr, nullptr, nullptr) == ERROR_SUCCESS)
{
LUID current_luid = {};
DWORD current_luid_size = sizeof(uint64_t);
if (RegGetValue(hKey, current_name.data(), _T("AdapterLuid"), RRF_RT_QWORD, nullptr, &current_luid, &current_luid_size) == ERROR_SUCCESS &&
if (RegGetValueW(hKey, current_name.data(), L"AdapterLuid", RRF_RT_QWORD, nullptr, &current_luid, &current_luid_size) == ERROR_SUCCESS &&
current_luid.HighPart == luid.HighPart && current_luid.LowPart == luid.LowPart)
{
LARGE_INTEGER driver_version = {};
DWORD driver_version_size = sizeof(driver_version);
if (RegGetValue(hKey, current_name.data(), _T("DriverVersion"), RRF_RT_QWORD, nullptr, &driver_version, &driver_version_size) == ERROR_SUCCESS)
if (RegGetValueW(hKey, current_name.data(), L"DriverVersion", RRF_RT_QWORD, nullptr, &driver_version, &driver_version_size) == ERROR_SUCCESS)
{
WORD nProduct = HIWORD(driver_version.HighPart);
WORD nVersion = LOWORD(driver_version.HighPart);

View File

@ -348,7 +348,7 @@ static std::string GetDriverVersionFromLUID(const LUID& luid)
std::string ret;
HKEY hKey;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\DirectX"), 0, KEY_READ, &hKey) == ERROR_SUCCESS)
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\DirectX", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
{
DWORD max_key_len = 0, adapter_count = 0;
if (RegQueryInfoKey(hKey, nullptr, nullptr, nullptr, &adapter_count, &max_key_len,
@ -358,16 +358,16 @@ static std::string GetDriverVersionFromLUID(const LUID& luid)
for (DWORD i = 0; i < adapter_count; ++i)
{
DWORD subKeyLength = static_cast<DWORD>(current_name.size());
if (RegEnumKeyEx(hKey, i, current_name.data(), &subKeyLength, nullptr, nullptr, nullptr, nullptr) == ERROR_SUCCESS)
if (RegEnumKeyExW(hKey, i, current_name.data(), &subKeyLength, nullptr, nullptr, nullptr, nullptr) == ERROR_SUCCESS)
{
LUID current_luid = {};
DWORD current_luid_size = sizeof(uint64_t);
if (RegGetValue(hKey, current_name.data(), _T("AdapterLuid"), RRF_RT_QWORD, nullptr, &current_luid, &current_luid_size) == ERROR_SUCCESS &&
if (RegGetValueW(hKey, current_name.data(), L"AdapterLuid", RRF_RT_QWORD, nullptr, &current_luid, &current_luid_size) == ERROR_SUCCESS &&
current_luid.HighPart == luid.HighPart && current_luid.LowPart == luid.LowPart)
{
LARGE_INTEGER driver_version = {};
DWORD driver_version_size = sizeof(driver_version);
if (RegGetValue(hKey, current_name.data(), _T("DriverVersion"), RRF_RT_QWORD, nullptr, &driver_version, &driver_version_size) == ERROR_SUCCESS)
if (RegGetValueW(hKey, current_name.data(), L"DriverVersion", RRF_RT_QWORD, nullptr, &driver_version, &driver_version_size) == ERROR_SUCCESS)
{
WORD nProduct = HIWORD(driver_version.HighPart);
WORD nVersion = LOWORD(driver_version.HighPart);

View File

@ -170,7 +170,6 @@ namespace FullscreenUI
Interface,
BIOS,
Emulation,
System,
Graphics,
Audio,
MemoryCard,
@ -287,7 +286,6 @@ namespace FullscreenUI
static void DrawCoverDownloaderWindow();
static void DrawBIOSSettingsPage();
static void DrawEmulationSettingsPage();
static void DrawSystemSettingsPage();
static void DrawGraphicsSettingsPage();
static void DrawAudioSettingsPage();
static void DrawMemoryCardSettingsPage();
@ -303,6 +301,7 @@ namespace FullscreenUI
static bool IsEditingGameSettings(SettingsInterface* bsi);
static SettingsInterface* GetEditingSettingsInterface();
static SettingsInterface* GetEditingSettingsInterface(bool game_settings);
static bool ShouldShowAdvancedSettings(SettingsInterface* bsi);
static void SetSettingsChanged(SettingsInterface* bsi);
static bool GetEffectiveBoolSetting(SettingsInterface* bsi, const char* section, const char* key, bool default_value);
static s32 GetEffectiveIntSetting(SettingsInterface* bsi, const char* section, const char* key, s32 default_value);
@ -1169,6 +1168,12 @@ SettingsInterface* FullscreenUI::GetEditingSettingsInterface(bool game_settings)
return (game_settings && s_game_settings_interface) ? s_game_settings_interface.get() : Host::Internal::GetBaseSettingsLayer();
}
bool FullscreenUI::ShouldShowAdvancedSettings(SettingsInterface* bsi)
{
return IsEditingGameSettings(bsi) ? Host::GetBaseBoolSettingValue("UI", "ShowAdvancedSettings", false) :
bsi->GetBoolValue("UI", "ShowAdvancedSettings", false);
}
void FullscreenUI::SetSettingsChanged(SettingsInterface* bsi)
{
if (bsi && bsi == s_game_settings_interface.get())
@ -2229,22 +2234,24 @@ void FullscreenUI::DrawSettingsWindow()
{
static constexpr float ITEM_WIDTH = 25.0f;
static constexpr const char* global_icons[] = {ICON_FA_WINDOW_MAXIMIZE, ICON_FA_MICROCHIP, ICON_FA_SLIDERS_H, ICON_FA_HDD,
ICON_FA_MAGIC, ICON_FA_HEADPHONES, ICON_FA_SD_CARD, ICON_FA_GAMEPAD, ICON_FA_KEYBOARD, ICON_FA_TROPHY, ICON_FA_FOLDER_OPEN,
ICON_FA_COGS};
static constexpr const char* per_game_icons[] = {ICON_FA_PARAGRAPH, ICON_FA_SLIDERS_H, ICON_FA_HDD, ICON_FA_MAGIC,
ICON_FA_HEADPHONES, ICON_FA_SD_CARD, ICON_FA_GAMEPAD, ICON_FA_BAN};
static constexpr const char* global_icons[] = {ICON_FA_WINDOW_MAXIMIZE, ICON_FA_MICROCHIP, ICON_FA_SLIDERS_H, ICON_FA_MAGIC,
ICON_FA_HEADPHONES, ICON_FA_SD_CARD, ICON_FA_GAMEPAD, ICON_FA_KEYBOARD, ICON_FA_TROPHY, ICON_FA_FOLDER_OPEN, ICON_FA_COGS};
static constexpr const char* per_game_icons[] = {
ICON_FA_PARAGRAPH, ICON_FA_SLIDERS_H, ICON_FA_MAGIC, ICON_FA_HEADPHONES, ICON_FA_SD_CARD, ICON_FA_GAMEPAD, ICON_FA_BAN};
static constexpr SettingsPage global_pages[] = {SettingsPage::Interface, SettingsPage::BIOS, SettingsPage::Emulation,
SettingsPage::System, SettingsPage::Graphics, SettingsPage::Audio, SettingsPage::MemoryCard, SettingsPage::Controller,
SettingsPage::Hotkey, SettingsPage::Achievements, SettingsPage::Folders, SettingsPage::Advanced};
static constexpr SettingsPage per_game_pages[] = {SettingsPage::Summary, SettingsPage::Emulation, SettingsPage::System,
SettingsPage::Graphics, SettingsPage::Audio, SettingsPage::MemoryCard, SettingsPage::Controller, SettingsPage::GameFixes};
static constexpr const char* titles[] = {"Summary", "Interface Settings", "BIOS Settings", "Emulation Settings", "System Settings",
SettingsPage::Graphics, SettingsPage::Audio, SettingsPage::MemoryCard, SettingsPage::Controller, SettingsPage::Hotkey,
SettingsPage::Achievements, SettingsPage::Folders, SettingsPage::Advanced};
static constexpr SettingsPage per_game_pages[] = {SettingsPage::Summary, SettingsPage::Emulation, SettingsPage::Graphics,
SettingsPage::Audio, SettingsPage::MemoryCard, SettingsPage::Controller, SettingsPage::GameFixes};
static constexpr const char* titles[] = {"Summary", "Interface Settings", "BIOS Settings", "Emulation Settings",
"Graphics Settings", "Audio Settings", "Memory Card Settings", "Controller Settings", "Hotkey Settings",
"Achievements Settings", "Folder Settings", "Advanced Settings", "Game Fixes"};
const bool game_settings = IsEditingGameSettings(GetEditingSettingsInterface());
const u32 count = game_settings ? std::size(per_game_pages) : std::size(global_pages);
SettingsInterface* bsi = GetEditingSettingsInterface();
const bool game_settings = IsEditingGameSettings(bsi);
const u32 count = game_settings ? (ShouldShowAdvancedSettings(bsi) ? std::size(per_game_pages) : (std::size(per_game_pages) - 1)) :
std::size(global_pages);
const char* const* icons = game_settings ? per_game_icons : global_icons;
const SettingsPage* pages = game_settings ? per_game_pages : global_pages;
u32 index = 0;
@ -2327,10 +2334,6 @@ void FullscreenUI::DrawSettingsWindow()
DrawEmulationSettingsPage();
break;
case SettingsPage::System:
DrawSystemSettingsPage();
break;
case SettingsPage::Graphics:
DrawGraphicsSettingsPage();
break;
@ -2445,6 +2448,12 @@ void FullscreenUI::DrawInterfaceSettingsPage()
"Automatically saves the emulator state when powering down or exiting. You can then resume directly from where you left off next "
"time.",
"EmuCore", "SaveStateOnShutdown", false);
if (DrawToggleSetting(bsi, ICON_FA_WRENCH " Enable Per-Game Settings",
"Enables loading ini overlays from gamesettings, or custom settings per-game.", "EmuCore", "EnablePerGameSettings",
IsEditingGameSettings(bsi)))
{
Host::RunOnCPUThread(&VMManager::ReloadGameSettings);
}
if (DrawToggleSetting(bsi, ICON_FA_PAINT_BRUSH " Use Light Theme", "Uses a light coloured theme instead of the default dark theme.",
"UI", "UseLightFullscreenUITheme", false))
{
@ -2486,6 +2495,8 @@ void FullscreenUI::DrawInterfaceSettingsPage()
"EmuCore/GS", "OsdShowSettings", false);
DrawToggleSetting(bsi, ICON_FA_GAMEPAD " Show Inputs",
"Shows the current controller state of the system in the bottom-left corner of the display.", "EmuCore/GS", "OsdShowInputs", false);
DrawToggleSetting(bsi, ICON_FA_EXCLAMATION_CIRCLE " Warn About Unsafe Settings",
"Displays warnings when settings are enabled which may break games.", "EmuCore", "WarnAboutUnsafeSettings", true);
MenuHeading("Operations");
if (MenuButton(ICON_FA_FOLDER_MINUS " Reset Settings", "Resets configuration to defaults (excluding controller settings).",
@ -2591,6 +2602,12 @@ void FullscreenUI::DrawEmulationSettingsPage()
5.00f,
10.00f,
};
static constexpr const char* ee_cycle_rate_settings[] = {
"50% Speed", "60% Speed", "75% Speed", "100% Speed (Default)", "130% Speed", "180% Speed", "300% Speed"};
static constexpr const char* ee_cycle_skip_settings[] = {
"Normal (Default)", "Mild Underclock", "Moderate Underclock", "Maximum Underclock"};
static constexpr const char* affinity_control_settings[] = {
"Disabled", "EE > VU > GS", "EE > GS > VU", "VU > EE > GS", "VU > GS > EE", "GS > EE > VU", "GS > VU > EE"};
static constexpr const char* queue_entries[] = {"0 Frames (Hard Sync)", "1 Frame", "2 Frames", "3 Frames"};
SettingsInterface* bsi = GetEditingSettingsInterface();
@ -2608,6 +2625,30 @@ void FullscreenUI::DrawEmulationSettingsPage()
DrawToggleSetting(
bsi, "Enable Speed Limiter", "When disabled, the game will run as fast as possible.", "EmuCore/GS", "FrameLimitEnable", true);
MenuHeading("System Settings");
DrawIntListSetting(bsi, "EE Cycle Rate", "Underclocks or overclocks the emulated Emotion Engine CPU.", "EmuCore/Speedhacks",
"EECycleRate", 0, ee_cycle_rate_settings, std::size(ee_cycle_rate_settings), -3);
DrawIntListSetting(bsi, "EE Cycle Skipping", "Adds a penalty to the Emulated Emotion Engine for executing VU programs.",
"EmuCore/Speedhacks", "EECycleSkip", 0, ee_cycle_skip_settings, std::size(ee_cycle_skip_settings));
DrawIntListSetting(bsi, "Affinity Control Mode",
"Pins emulation threads to CPU cores to potentially improve performance/frame time variance.", "EmuCore/CPU", "AffinityControlMode",
0, affinity_control_settings, std::size(affinity_control_settings), 0);
DrawToggleSetting(bsi, "Enable MTVU (Multi-Threaded VU1)", "Uses a second thread for VU1 micro programs. Sizable speed boost.",
"EmuCore/Speedhacks", "vuThread", false);
DrawToggleSetting(bsi, "Enable Instant VU1",
"Reduces timeslicing between VU1 and EE recompilers, effectively running VU1 at an infinite clock speed.", "EmuCore/Speedhacks",
"vu1Instant", true);
DrawToggleSetting(bsi, "Enable Cheats", "Enables loading cheats from pnach files.", "EmuCore", "EnableCheats", false);
DrawToggleSetting(bsi, "Enable Host Filesystem", "Enables access to files from the host: namespace in the virtual machine.", "EmuCore",
"HostFs", false);
if (IsEditingGameSettings(bsi))
{
DrawToggleSetting(
bsi, "Enable Fast CDVD", "Fast disc access, less loading times. Not recommended.", "EmuCore/Speedhacks", "fastCDVD", false);
}
MenuHeading("Frame Pacing/Latency Control");
bool optimal_frame_pacing = (bsi->GetIntValue("EmuCore/GS", "VsyncQueueSize", DEFAULT_FRAME_LATENCY) == 0);
@ -2626,23 +2667,6 @@ void FullscreenUI::DrawEmulationSettingsPage()
DrawToggleSetting(bsi, "Adjust To Host Refresh Rate", "Speeds up emulation so that the guest refresh rate matches the host.",
"EmuCore/GS", "SyncToHostRefreshRate", false);
MenuHeading("Game Settings");
DrawToggleSetting(bsi, "Enable Cheats", "Enables loading cheats from pnach files.", "EmuCore", "EnableCheats", false);
DrawToggleSetting(bsi, "Enable Widescreen Patches", "Enables loading widescreen patches from pnach files.", "EmuCore",
"EnableWideScreenPatches", false);
DrawToggleSetting(bsi, "Enable No-Interlacing Patches", "Enables loading no-interlacing patches from pnach files.", "EmuCore",
"EnableNoInterlacingPatches", false);
if (DrawToggleSetting(bsi, "Enable Per-Game Settings", "Enables loading ini overlays from gamesettings, or custom settings per-game.",
"EmuCore", "EnablePerGameSettings", IsEditingGameSettings(bsi)))
{
Host::RunOnCPUThread(&VMManager::ReloadGameSettings);
}
DrawToggleSetting(bsi, "Enable Host Filesystem", "Enables access to files from the host: namespace in the virtual machine.", "EmuCore",
"HostFs", false);
DrawToggleSetting(bsi, "Warn About Unsafe Settings", "Displays warnings when settings are enabled which may break games.", "EmuCore",
"WarnAboutUnsafeSettings", true);
EndMenuButtons();
}
@ -2711,53 +2735,6 @@ void FullscreenUI::DrawClampingModeSetting(SettingsInterface* bsi, const char* t
}
}
void FullscreenUI::DrawSystemSettingsPage()
{
static constexpr const char* ee_cycle_rate_settings[] = {
"50% Speed", "60% Speed", "75% Speed", "100% Speed (Default)", "130% Speed", "180% Speed", "300% Speed"};
static constexpr const char* ee_cycle_skip_settings[] = {
"Normal (Default)", "Mild Underclock", "Moderate Underclock", "Maximum Underclock"};
static constexpr const char* ee_rounding_mode_settings[] = {"Nearest", "Negative", "Positive", "Chop/Zero (Default)"};
static constexpr const char* affinity_control_settings[] = {
"Disabled", "EE > VU > GS", "EE > GS > VU", "VU > EE > GS", "VU > GS > EE", "GS > EE > VU", "GS > VU > EE"};
SettingsInterface* bsi = GetEditingSettingsInterface();
BeginMenuButtons();
MenuHeading("Emotion Engine (MIPS-III/MIPS-IV)");
DrawIntListSetting(bsi, "Cycle Rate", "Underclocks or overclocks the emulated Emotion Engine CPU.", "EmuCore/Speedhacks", "EECycleRate",
0, ee_cycle_rate_settings, std::size(ee_cycle_rate_settings), -3);
DrawIntListSetting(bsi, "Cycle Skip", "Adds a penalty to the Emulated Emotion Engine for executing VU programs.", "EmuCore/Speedhacks",
"EECycleSkip", 0, ee_cycle_skip_settings, std::size(ee_cycle_skip_settings));
DrawIntListSetting(bsi, "Rounding Mode##ee_rounding_mode",
"Determines how the results of floating-point operations are rounded. Some games need specific settings.", "EmuCore/CPU",
"FPU.Roundmode", 3, ee_rounding_mode_settings, std::size(ee_rounding_mode_settings));
DrawClampingModeSetting(bsi, "Clamping Mode##ee_clamping_mode",
"Determines how out-of-range floating point numbers are handled. Some games need specific settings.", false);
DrawIntListSetting(bsi, "Affinity Control Mode",
"Pins emulation threads to CPU cores to potentially improve performance/frame time variance.", "EmuCore/CPU", "AffinityControlMode",
0, affinity_control_settings, std::size(affinity_control_settings), 0);
MenuHeading("Vector Units");
DrawIntListSetting(bsi, "Rounding Mode##vu_rounding_mode",
"Determines how the results of floating-point operations are rounded. Some games need specific settings.", "EmuCore/CPU",
"VU.Roundmode", 3, ee_rounding_mode_settings, std::size(ee_rounding_mode_settings));
DrawClampingModeSetting(bsi, "Clamping Mode##vu_clamping_mode",
"Determines how out-of-range floating point numbers are handled. Some games need specific settings.", true);
DrawToggleSetting(bsi, "Enable MTVU (Multi-Threaded VU1)", "Uses a second thread for VU1 micro programs. Sizable speed boost.",
"EmuCore/Speedhacks", "vuThread", false);
DrawToggleSetting(bsi, "Enable Instant VU1",
"Reduces timeslicing between VU1 and EE recompilers, effectively running VU1 at an infinite clock speed.", "EmuCore/Speedhacks",
"vu1Instant", true);
MenuHeading("I/O Processor (MIPS-I)");
DrawToggleSetting(
bsi, "Enable Fast CDVD", "Fast disc access, less loading times. Not recommended.", "EmuCore/Speedhacks", "fastCDVD", false);
EndMenuButtons();
}
void FullscreenUI::DrawGraphicsSettingsPage()
{
static constexpr const char* s_renderer_names[] = {"Automatic",
@ -2878,9 +2855,13 @@ void FullscreenUI::DrawGraphicsSettingsPage()
100, 10, 300, "%d%%");
DrawIntRectSetting(bsi, "Crop", "Crops the image, while respecting aspect ratio.", "EmuCore/GS", "CropLeft", 0, "CropTop", 0,
"CropRight", 0, "CropBottom", 0, 0, 720, "%dpx");
DrawIntListSetting(bsi, "Bilinear Upscaling",
"Smooths out the image when upscaling the console to the screen.", "EmuCore/GS", "linear_present_mode",
static_cast<int>(GSPostBilinearMode::BilinearSharp), s_bilinear_present_options, std::size(s_bilinear_present_options));
DrawToggleSetting(bsi, "Enable Widescreen Patches", "Enables loading widescreen patches from pnach files.", "EmuCore",
"EnableWideScreenPatches", false);
DrawToggleSetting(bsi, "Enable No-Interlacing Patches", "Enables loading no-interlacing patches from pnach files.", "EmuCore",
"EnableNoInterlacingPatches", false);
DrawIntListSetting(bsi, "Bilinear Upscaling", "Smooths out the image when upscaling the console to the screen.", "EmuCore/GS",
"linear_present_mode", static_cast<int>(GSPostBilinearMode::BilinearSharp), s_bilinear_present_options,
std::size(s_bilinear_present_options));
DrawToggleSetting(bsi, "Integer Upscaling",
"Adds padding to the display area to ensure that the ratio between pixels on the host to pixels in the console is an integer "
"number. May result in a sharper image in some 2D games.",
@ -3788,51 +3769,83 @@ void FullscreenUI::DrawAchievementsSettingsPage(std::unique_lock<std::mutex>& se
void FullscreenUI::DrawAdvancedSettingsPage()
{
static constexpr const char* ee_rounding_mode_settings[] = {"Nearest", "Negative", "Positive", "Chop/Zero (Default)"};
SettingsInterface* bsi = GetEditingSettingsInterface();
const bool show_advanced_settings = ShouldShowAdvancedSettings(bsi);
BeginMenuButtons();
if (!IsEditingGameSettings(bsi))
{
DrawToggleSetting(bsi, "Show Advanced Settings",
"Changing these options may cause games to become non-functional. Modify at your own risk, the PCSX2 team will not provide "
"support for configurations with these settings changed.",
"UI", "ShowAdvancedSettings", false);
}
MenuHeading("Logging");
DrawToggleSetting(bsi, "System Console", "Writes log messages to the system console (console window/standard output).", "Logging",
"EnableSystemConsole", false);
DrawToggleSetting(bsi, "File Logging", "Writes log messages to emulog.txt.", "Logging", "EnableFileLogging", false);
DrawToggleSetting(bsi, "Verbose Logging", "Writes dev log messages to log sinks.", "Logging", "EnableVerbose", false, !IsDevBuild);
DrawToggleSetting(bsi, "Log Timestamps", "Writes timestamps alongside log messages.", "Logging", "EnableTimestamps", true);
DrawToggleSetting(
bsi, "EE Console", "Writes debug messages from the game's EE code to the console.", "Logging", "EnableEEConsole", true);
DrawToggleSetting(
bsi, "IOP Console", "Writes debug messages from the game's IOP code to the console.", "Logging", "EnableIOPConsole", true);
DrawToggleSetting(bsi, "CDVD Verbose Reads", "Logs disc reads from games.", "EmuCore", "CdvdVerboseReads", false);
MenuHeading("Advanced System");
if (show_advanced_settings)
{
DrawToggleSetting(bsi, "Log Timestamps", "Writes timestamps alongside log messages.", "Logging", "EnableTimestamps", true);
DrawToggleSetting(
bsi, "EE Console", "Writes debug messages from the game's EE code to the console.", "Logging", "EnableEEConsole", true);
DrawToggleSetting(
bsi, "IOP Console", "Writes debug messages from the game's IOP code to the console.", "Logging", "EnableIOPConsole", true);
DrawToggleSetting(bsi, "CDVD Verbose Reads", "Logs disc reads from games.", "EmuCore", "CdvdVerboseReads", false);
}
DrawToggleSetting(bsi, "Enable EE Recompiler",
"Performs just-in-time binary translation of 64-bit MIPS-IV machine code to native code.", "EmuCore/CPU/Recompiler", "EnableEE",
true);
DrawToggleSetting(
bsi, "Enable EE Cache", "Enables simulation of the EE's cache. Slow.", "EmuCore/CPU/Recompiler", "EnableEECache", false);
DrawToggleSetting(bsi, "Enable INTC Spin Detection", "Huge speedup for some games, with almost no compatibility side effects.",
"EmuCore/Speedhacks", "IntcStat", true);
DrawToggleSetting(bsi, "Enable Wait Loop Detection", "Moderate speedup for some games, with no known side effects.",
"EmuCore/Speedhacks", "WaitLoop", true);
DrawToggleSetting(bsi, "Enable Fast Memory Access", "Uses backpatching to avoid register flushing on every memory access.",
"EmuCore/CPU/Recompiler", "EnableFastmem", true);
DrawToggleSetting(bsi, "Enable VU0 Recompiler (Micro Mode)",
"New Vector Unit recompiler with much improved compatibility. Recommended.", "EmuCore/CPU/Recompiler", "EnableVU0", true);
DrawToggleSetting(bsi, "Enable VU1 Recompiler", "New Vector Unit recompiler with much improved compatibility. Recommended.",
"EmuCore/CPU/Recompiler", "EnableVU1", true);
DrawToggleSetting(bsi, "Enable VU Flag Optimization", "Good speedup and high compatibility, may cause graphical errors.",
"EmuCore/Speedhacks", "vuFlagHack", true);
DrawToggleSetting(bsi, "Enable IOP Recompiler",
"Performs just-in-time binary translation of 32-bit MIPS-I machine code to native code.", "EmuCore/CPU/Recompiler", "EnableIOP",
true);
if (show_advanced_settings)
{
MenuHeading("Emotion Engine");
MenuHeading("Graphics");
DrawIntListSetting(bsi, "Rounding Mode##ee_rounding_mode",
"Determines how the results of floating-point operations are rounded. Some games need specific settings.", "EmuCore/CPU",
"FPU.Roundmode", 3, ee_rounding_mode_settings, std::size(ee_rounding_mode_settings));
DrawClampingModeSetting(bsi, "Clamping Mode##ee_clamping_mode",
"Determines how out-of-range floating point numbers are handled. Some games need specific settings.", false);
DrawToggleSetting(bsi, "Use Debug Device", "Enables API-level validation of graphics commands", "EmuCore/GS", "UseDebugDevice", false);
DrawToggleSetting(bsi, "Enable EE Recompiler",
"Performs just-in-time binary translation of 64-bit MIPS-IV machine code to native code.", "EmuCore/CPU/Recompiler", "EnableEE",
true);
DrawToggleSetting(
bsi, "Enable EE Cache", "Enables simulation of the EE's cache. Slow.", "EmuCore/CPU/Recompiler", "EnableEECache", false);
DrawToggleSetting(bsi, "Enable INTC Spin Detection", "Huge speedup for some games, with almost no compatibility side effects.",
"EmuCore/Speedhacks", "IntcStat", true);
DrawToggleSetting(bsi, "Enable Wait Loop Detection", "Moderate speedup for some games, with no known side effects.",
"EmuCore/Speedhacks", "WaitLoop", true);
DrawToggleSetting(bsi, "Enable Fast Memory Access", "Uses backpatching to avoid register flushing on every memory access.",
"EmuCore/CPU/Recompiler", "EnableFastmem", true);
MenuHeading("Vector Units");
DrawIntListSetting(bsi, "Rounding Mode##vu_rounding_mode",
"Determines how the results of floating-point operations are rounded. Some games need specific settings.", "EmuCore/CPU",
"VU.Roundmode", 3, ee_rounding_mode_settings, std::size(ee_rounding_mode_settings));
DrawClampingModeSetting(bsi, "Clamping Mode##vu_clamping_mode",
"Determines how out-of-range floating point numbers are handled. Some games need specific settings.", true);
DrawToggleSetting(bsi, "Enable VU0 Recompiler (Micro Mode)",
"New Vector Unit recompiler with much improved compatibility. Recommended.", "EmuCore/CPU/Recompiler", "EnableVU0", true);
DrawToggleSetting(bsi, "Enable VU1 Recompiler", "New Vector Unit recompiler with much improved compatibility. Recommended.",
"EmuCore/CPU/Recompiler", "EnableVU1", true);
DrawToggleSetting(bsi, "Enable VU Flag Optimization", "Good speedup and high compatibility, may cause graphical errors.",
"EmuCore/Speedhacks", "vuFlagHack", true);
MenuHeading("I/O Processor");
DrawToggleSetting(bsi, "Enable IOP Recompiler",
"Performs just-in-time binary translation of 32-bit MIPS-I machine code to native code.", "EmuCore/CPU/Recompiler", "EnableIOP",
true);
MenuHeading("Graphics");
DrawToggleSetting(
bsi, "Use Debug Device", "Enables API-level validation of graphics commands", "EmuCore/GS", "UseDebugDevice", false);
}
EndMenuButtons();
}

View File

@ -1584,8 +1584,8 @@ void ImGuiFullscreen::PopulateFileSelectorItems()
{
for (std::string& root_path : FileSystem::GetRootDirectoryList())
{
s_file_selector_items.emplace_back(
StringUtil::StdStringFromFormat(ICON_FA_FOLDER " %s", root_path.c_str()), std::move(root_path), false);
std::string title(fmt::format(ICON_FA_FOLDER " {}", root_path));
s_file_selector_items.emplace_back(std::move(title), std::move(root_path), false);
}
}
else
@ -1599,7 +1599,12 @@ void ImGuiFullscreen::PopulateFileSelectorItems()
if (sep_pos != std::string::npos)
{
parent_path = s_file_selector_current_directory.substr(0, sep_pos);
//FIXME FileSystem::CanonicalizePath(parent_path, true);
#ifndef _WIN32
// Special case for going to root list on Linux.
if (parent_path.empty() && s_file_selector_current_directory.size() > 1)
parent_path = "/";
#endif
}
s_file_selector_items.emplace_back(ICON_FA_FOLDER_OPEN " <Parent Directory>", std::move(parent_path), false);
@ -1607,19 +1612,16 @@ void ImGuiFullscreen::PopulateFileSelectorItems()
if ((lhs.Attributes & FILESYSTEM_FILE_ATTRIBUTE_DIRECTORY) != (rhs.Attributes & FILESYSTEM_FILE_ATTRIBUTE_DIRECTORY))
return (lhs.Attributes & FILESYSTEM_FILE_ATTRIBUTE_DIRECTORY) != 0;
// return std::lexicographical_compare(lhs.FileName.begin(), lhs.FileName.end(), rhs.FileName.begin(),
// rhs.FileName.end());
return (StringUtil::Strcasecmp(lhs.FileName.c_str(), rhs.FileName.c_str()) < 0);
return std::lexicographical_compare(lhs.FileName.begin(), lhs.FileName.end(), rhs.FileName.begin(), rhs.FileName.end());
});
for (const FILESYSTEM_FIND_DATA& fd : results)
{
std::string full_path(StringUtil::StdStringFromFormat(
"%s" FS_OSPATH_SEPARATOR_STR "%s", s_file_selector_current_directory.c_str(), fd.FileName.c_str()));
std::string full_path(Path::Combine(s_file_selector_current_directory, fd.FileName));
if (fd.Attributes & FILESYSTEM_FILE_ATTRIBUTE_DIRECTORY)
{
std::string title(StringUtil::StdStringFromFormat(ICON_FA_FOLDER " %s", fd.FileName.c_str()));
std::string title(fmt::format(ICON_FA_FOLDER " {}", fd.FileName));
s_file_selector_items.emplace_back(std::move(title), std::move(full_path), false);
}
else
@ -1631,7 +1633,7 @@ void ImGuiFullscreen::PopulateFileSelectorItems()
continue;
}
std::string title(StringUtil::StdStringFromFormat(ICON_FA_FILE " %s", fd.FileName.c_str()));
std::string title(fmt::format(ICON_FA_FILE " {}", fd.FileName));
s_file_selector_items.emplace_back(std::move(title), std::move(full_path), true);
}
}
@ -1640,7 +1642,7 @@ void ImGuiFullscreen::PopulateFileSelectorItems()
void ImGuiFullscreen::SetFileSelectorDirectory(std::string dir)
{
while (!dir.empty() && dir.back() == FS_OSPATH_SEPARATOR_CHARACTER)
while (dir.size() > 1 && dir.back() == FS_OSPATH_SEPARATOR_CHARACTER)
dir.erase(dir.size() - 1);
s_file_selector_current_directory = std::move(dir);

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