Compare commits

...

2726 Commits

Author SHA1 Message Date
refractionpcsx2
d2202a4e33 sadfs 2023-02-10 20:05:39 +00:00
Stenzek
9b1163f959 GS/HW: Use sampler for clamp/repeat when it's redundant
But only for local memory sources (not targets), it causes issues with
upscaling otherwise.
2023-02-10 11:20:37 +00:00
Stenzek
5b5edc506d Misc: Warning fixes 2023-02-10 11:20:37 +00:00
refractionpcsx2
b30b4375e7 GS: Detect 16bit source copy in to 32bit target shuffle 2023-02-10 11:19:41 +00:00
Stenzek
1b0c03d892 GS/HW: Fix fixed/invalid TEX0 case in TimeSplitters 2 2023-02-10 03:43:10 +00:00
Ziemas
bca49184e7 Debugger: Fix missing return path. (#8094) 2023-02-09 19:48:54 +00:00
Stenzek
26d6c33163 GSRunner: Clear bindings and disable game settings 2023-02-09 17:29:47 +01:00
Ziemas
9420615317 Implement thread listing for IOP
Abstracts away threads behind a common interface for both EE and IOP
2023-02-09 15:49:56 +00:00
Stenzek
7198c6b8c6 GS: Use u32 instead of size_t for index storage
These are never going to be greater than 2^32-1, and they're truncated
in a bunch of places anyway.
2023-02-09 14:54:42 +00:00
Stenzek
9513864851 GS: Make prim a template parameter for auto flush
It's force inlined into VertexKick(), which also has prim as a template
parameter.
2023-02-09 14:54:42 +00:00
Stenzek
f9b8aa1862 GS: Handle index swap case for auto flush
DirectX and OpenGL no longer have different draw splitting.
2023-02-09 14:54:42 +00:00
refractionpcsx2
34371c070c Mcd-Folder: Prevent crash trying to delete non-existent node. 2023-02-09 14:06:21 +00:00
Stenzek
d6099dd263 GS/Vulkan: Use Bresenham line rasterization when supported 2023-02-09 13:42:05 +00:00
Stenzek
a1bc39141e PAD: Fix trigger deadzone/scale setting 2023-02-09 12:30:20 +00:00
Connor McLaughlin
13ed41d077 GS/DX11: Disable multisampling in rasterizer state 2023-02-09 11:13:42 +00:00
Stenzek
8a0a8f718f GameDB: Remove preloading disable for a bunch of games
These are fine now.
2023-02-09 10:51:06 +00:00
Stenzek
7d08a54ad9 GS/HW: Optimize TC source size based on CLAMP 2023-02-09 10:51:06 +00:00
Stenzek
b9b47e3ec7 GS/OGL: Fix upload row length for texture Update() 2023-02-09 10:51:06 +00:00
refractionpcsx2
16989f2122 GS-HW: On overwrite of large incompatible format texture, erase old. 2023-02-09 10:50:40 +00:00
Berylskid
892d3a370d GameDB: Fix texture flickers of Armored Core Nexus 2023-02-09 09:37:17 +00:00
Stenzek
6af7ca9867 PAD: Fix invert in deadzone computation 2023-02-09 10:03:55 +01:00
Stenzek
c3c354f794 PAD: Add trigger deadzone/sensitivity settings 2023-02-09 10:03:55 +01:00
Stenzek
43572a1560 Qt: Mark widget binder functions as inline
Should also fix the unused warning without using [[maybe_unused]];
2023-02-09 10:03:55 +01:00
Stenzek
79daed63ee Qt: Handle multiplier in controller settings 2023-02-09 10:03:55 +01:00
Stenzek
21d3ad86d4 Qt: Make controller settings page scrollable 2023-02-09 10:03:55 +01:00
Stenzek
31ebe842e8 Qt: Add per-bind sensitivity/deadzone controls (shift-click) 2023-02-09 10:03:55 +01:00
eyfix
88487de72f USB: Add values to GunCon2 config. (#8078) 2023-02-09 09:55:23 +01:00
Haruka
616da8c99d CDVD: simplify code 2023-02-09 09:52:00 +01:00
Haruka
ec8712cceb CDVD: use DevCon logging instead of stdout / stderr 2023-02-09 09:52:00 +01:00
Haruka
3d6923b2a1 CDVD: implement SetSpindleSpeed on macOS 2023-02-09 09:52:00 +01:00
Haruka
f04337becf CDVD: fix macOS CD reading 2023-02-09 09:52:00 +01:00
Haruka
9a5dd4c19d CDVD: macOS physical disc support 2023-02-09 09:52:00 +01:00
lightningterror
643e0b1039 GameDB: Add Autoflush hw fix to MGS3 Subsistence.
Fixes lens flare.
2023-02-09 07:06:21 +01:00
Stenzek
330061a6e7 GS/OGL: Fix offseted downloads not being offset
Fixes background screen effect in Gradius V.
2023-02-09 07:04:50 +01:00
Stenzek
0a292715cf GS/OGL: Align texture uploads to 64 bytes
Fixes potential crash in some games with odd-sized targets
and preloading (e.g. Densha De Go).
2023-02-09 07:04:50 +01:00
Berylskid
52f034a513 GameDB: Add missing quatation marks in memcardFilters for Armored Core Last Raven 2023-02-08 17:32:49 +01:00
Stenzek
25e05388ba Qt: Open fullscreen window on same display as main 2023-02-08 17:29:59 +01:00
JordanTheToaster
7ad9a1af03 GameDB: Add Paltex to Gacharoku
Stops the hash cache from being silly and exploding.
2023-02-08 17:29:22 +01:00
refractionpcsx2
9346c69343 GS-HW: Iterate dirty rects in reverse to join existing ones. 2023-02-08 00:05:44 +00:00
refractionpcsx2
4a3f0ccf96 GS-HW: Process dirty rects separately, improved Tex in RT compatibility 2023-02-08 00:05:44 +00:00
refractionpcsx2
52a1396e29 GSDumpRunner: Fix new options, add missing Preload Frame 2023-02-07 23:40:01 +00:00
JordanTheToaster
f556dd2584 GameDB: Add missing The Godfather fixes
Adds missing fixes for other entry's of The Godfarther.
2023-02-07 23:26:04 +00:00
refractionpcsx2
aea5c09825 GSDumpRunner: Ability to enable manual hw hacks for testing 2023-02-07 22:31:36 +00:00
refractionpcsx2
8c3c9a1219 GSDumpRunner: Tweaks to reduce console messages and redundant frame dumps 2023-02-07 22:31:36 +00:00
eyfix
a4f1f383a7 USB/LightGun/GunCon2: Fix wrong code of GunCon2. (#8066)
240 is used for the default screen height elsewhere in the file.
BID_SHOOT_OFFSCREEN is already handled at line 295.
2023-02-07 06:21:48 +01:00
JordanTheToaster
ee73c5c1b5 GameDB: Various small fixes
Fixes for Transformers The Game to fix bloom and mipmapping issues and add missing db entrys.
2023-02-07 06:19:59 +01:00
refractionpcsx2
c2904a4633 GS-HW: Don't enable merge sprite in native resolution 2023-02-06 23:59:06 +00:00
JordanTheToaster
6faa2249f9 GameDB: Add Disable InstantVU to MGS 3 Subsistence
Disables InstantVU1 to fix missing letters in text such as the letter E also adds more fixes and missing fixes for Forever Kingdom / Evergrace 2.
2023-02-07 00:24:47 +01:00
lightningterror
119c3acfe7 GS-tc: Cleanup hw texturecache.
Initializations, constants, casts.
2023-02-07 00:22:46 +01:00
lightningterror
138a2683f2 USB: Fix Variable is assigned a value that is never used warning.
Codacy.
2023-02-07 00:22:46 +01:00
PCSX2 Bot
463637fa10 PAD: Update to latest controller database. 2023-02-07 00:19:55 +01:00
refractionpcsx2
d5aab926bf GameDB: Add Game Fix for Scandal 2023-02-05 17:40:02 +00:00
KamFretoZ
37ba04b770 GameDB: Fixes for "Toy Story 3" & "WALL-E" (#8045) 2023-02-05 14:53:09 +00:00
refractionpcsx2
3d0b7dee71 GameDB: Update K-1 Grand Prix fixes to use Instant DMA instead.
This seems to be more reliable in correcting the issue, and for some reason the old way is no longer working properly.
2023-02-05 14:50:36 +00:00
JordanTheToaster
a287c2caac GameDB: Add Align Sprite to Football Kingdom
Fixes vertical lines.
2023-02-05 14:42:58 +00:00
Stenzek
1b673d9dd0 GS/HW: Simplify m_vertex/m_index
Switches DX11 to a larger streaming buffer, adds missing texture copy
counter for colclip.
2023-02-04 12:30:24 +00:00
Stenzek
d10621c201 GS/DX11: Use annotations for debug messages 2023-02-04 12:30:24 +00:00
Ziemas
e1d6dfc324 Add command line boot and debug option 2023-02-04 12:30:07 +00:00
Stenzek
130ea2a7ca PAD: Fix pressure getting set to 1 after modifier 2023-02-04 12:29:53 +00:00
Stenzek
c8d53253d2 Qt: Defer application quit on window close
Fixes Mac builds crashing when the Metal renderer tries to clear the
layer on a non-existant window.
2023-02-04 12:29:44 +00:00
Stenzek
5c67438925 VMManager: Only exit CPU execution if we were running
Fixes crash if you were paused when you shut down the VM with the EE
interpreter enabled.
2023-02-04 12:29:44 +00:00
lightningterror
1012dba8d7 GameDB: Add basic mipmap to Narc and Tom & Jerry War of the Whiskers.
Fixes textures.
2023-02-03 23:51:05 +01:00
Mrlinkwii
e8d43f53d9 GameDB: fixes for 'Tom & Jerry - War of the Whiskers' & 'Brave - The Search for Spirit Dancer'' 2023-02-03 18:19:42 +00:00
RedDevilus
a0e8ce4b13 Qt: Fix compatibility string
Playable rating was missing which is the most common rating for PCSX2. There are some other issues like the images look bad for star rating and some other stuff. Also resize the compatibility table width a bit.
2023-02-03 16:09:46 +00:00
refractionpcsx2
0e35b3edcb GS: Extend things to handle the alpha blended clear in NARC/Brave 2023-02-03 15:17:10 +00:00
refractionpcsx2
25bb5851ec GS-HW: Fix special CLUT case that uses preloading. 2023-02-03 15:17:10 +00:00
refractionpcsx2
80b0bc0869 GS-HW: Adjust clear detection for clears with FBMSK 2023-02-03 15:17:10 +00:00
refractionpcsx2
c05743b7b9 GS-HW: Improve FBW=1 clear for Singstar games 2023-02-03 15:17:10 +00:00
Stenzek
7c2a1f0f37 GS: Vectorize CLUT rect update 2023-02-03 14:36:37 +00:00
Stenzek
0b8b9e75d1 GS: Don't do CLUT auto flush test on invalid PRIM
Fixes OOB array access in Xenosaga I's cutscenes.
2023-02-03 14:36:37 +00:00
refractionpcsx2
d65c343e91 GameDB: Add preload to Siren 2 2023-02-03 06:54:56 +00:00
refractionpcsx2
cd8e7cc947 GS-HW: Queue preloads from Local->Local moves on CPU also 2023-02-03 06:54:56 +00:00
refractionpcsx2
0df5cf2e91 GS-CLUT: Handle invalidation on wrapping writes 2023-02-03 01:55:25 +00:00
refractionpcsx2
412275e40d GS: Convert ee write list to vector, fix some bugs. 2023-02-03 00:09:54 +00:00
refractionpcsx2
4c7ad66bd7 GS-HW: Check for CLUT upload before invalidating or running on GPU.
Clean up some preload code and improve the detection.
2023-02-03 00:09:54 +00:00
refractionpcsx2
8ac21357c3 GS-HW: Force preload 1 frame after reset 2023-02-03 00:09:54 +00:00
refractionpcsx2
2fd88b901b GS-TC: Don't clear on reset, only invalidate frames.
Fixes bug with counting writes before flushing.
Track what textures are used as frames.

It's possible that further to this the PCRTC disables on CSR reset, but we need to test this first, but that would fix the logo at the bottom when booting through the bios in Software mode.
2023-02-03 00:09:54 +00:00
refractionpcsx2
5697759d9e GS-HW: Try to make Preload Frame Data slightly less gross.
These changes make sure there's a matching EE transfer to texture allocation in that frame, if not, then don't allocate anything. This should reduce bad data being loaded in to the Rt.

Preload replaced for Simple 2000 Series Vol. 114 - The Onna Okappichi Torimonochou, preload worked by chance (but no more), disable depth works.
2023-02-03 00:09:54 +00:00
refractionpcsx2
ee0042c768 GameDB: Remove no longer needed Preload Frame settings 2023-02-03 00:09:54 +00:00
refractionpcsx2
a6212f1388 GS-HW: Always preload new frames for PCRTC if none found. 2023-02-03 00:09:54 +00:00
refractionpcsx2
7bfea60b35 GS-TC: Tex In RT expand target match 2023-02-02 23:46:05 +00:00
refractionpcsx2
beee740dc8 GameDB: Add Mipmapping to Jak X, replace FMV fix on Snowboard Heaven 2023-02-02 23:46:05 +00:00
refractionpcsx2
e31387b8bc GS-TC: Don't Tex in RT on old targets/PCRTC only frames. 2023-02-02 23:46:05 +00:00
TheLastRar
3586a12c46 DEV9: Remove pcap dumper
Never worked in Qt
2023-02-02 21:13:52 +00:00
TheLastRar
bf21254b13 DEV9: Pcap loop instead of returning on invalid packet
Should improve pcap bridged performance when lots of unrelated network traffic is present.
2023-02-02 21:13:52 +00:00
TheLastRar
dc9f61e70a DEV9: Add classes for editing packets and make PCAP use them 2023-02-02 21:13:52 +00:00
TheLastRar
3028998a43 DEV9: Move most of the pcap methods into PCAPAdapter
Also includes the following changes;
pcap_io_running checks replaced with assets in send/recv
pcap_io_running checks replaces checks on hpcap being non null.
Don't cast header->len from unsigned to signed when checking for jumbo frames
Log dropping jumbo frames
Free pcap filter code
Check return value of GetMACAddress() and handle appropriately.
2023-02-02 21:13:52 +00:00
TheLastRar
42511ce8d8 DEV9: Remove unneeded headers
by providing a typedef for Adapter
2023-02-02 21:13:52 +00:00
RedDevilus
c245d2134f GameDB: Driver Parallel Lines + Godfather + ...
Godfather: remove on-screen garbage
Driver Parallel Lines: Reduce misaligned bloom issues
Simple 2000 Series Vol. 109 - The Taxi 2: name fix to be Chauffeur and not like train driver (Utenshi to Untenshu)
Rimococoron
2023-02-02 14:22:06 +00:00
JordanTheToaster
f01884537d GameDB: Assorted fixes
Fixes the name of GT-R 400 and adds round sprite to fix lines in menus and text and corrects the name of 40k Fire Warrior to correctly have a space.
2023-02-01 10:23:11 +00:00
Mrlinkwii
b48fb0d4da Misc : label & comment fixes
Misc : remove old comments
labeler: Add labels for Translations
2023-02-01 10:22:12 +00:00
RedDevilus
7a6470a19d CI: Add RetroAchievements/Rcheevos labels for PRs
Beats doing it manually labels for Rcheevos.
2023-02-01 09:39:30 +00:00
Silent
bfd8fc771a Qt: Clear the status text after gamelist scanning
Improves UI parity with DuckStation.
2023-02-01 09:38:46 +00:00
Connor McLaughlin
f96ca4ac1f GS/OGL: Fix syntax error in fragment shader 2023-02-01 09:04:52 +01:00
TheLastRar
937bfce68e DEV9: Better match HDD size per-game UI to rest of settings 2023-01-31 21:23:05 +00:00
TheLastRar
5869d35d85 DEV9: Consider placeholderText when opening File dialog
Per-game settings store the global setting as placeholderText.
If no per-game setting is present we can prefill the dialog with the global setting, before falling back to a default value
2023-01-31 21:23:05 +00:00
TheLastRar
8d3325e6cd DEV9: Fix HDD file overwrite check 2023-01-31 21:23:05 +00:00
TheLastRar
4badb5b975 DEV9: Fix HddEnable not enabling UI correctly in per-game settings 2023-01-31 21:23:05 +00:00
TheLastRar
7e4ff233ec DEV9: Fix Per-game HDD path
SettingWidgetBinder isn't capable of handling this yet
2023-01-31 21:23:05 +00:00
refractionpcsx2
0e3397239d GS: Correct GSIMR/GSCSR reg init, regression from previous release 2023-01-31 16:55:45 +00:00
refractionpcsx2
08bae3da2e GS: Fix h/vsync counters on mode change/sync. 2023-01-31 14:56:48 +00:00
refractionpcsx2
4b49c8bd6e GS: Correct CSR behaviour on mode change 2023-01-31 14:56:48 +00:00
refractionpcsx2
c1bd1fcbd4 GS: Clear Privilage registers on GS Reset via CSR 2023-01-31 14:56:48 +00:00
TheLastRar
1c3379f082 Qt: Connect close instead of accept for the close button 2023-01-31 02:06:09 +00:00
Mrlinkwii
86c97a8ba3 GameDB: fixes for Megaman X Command Mission 2023-01-30 20:55:18 +00:00
lightningterror
8e6c18d3f4 emitter: Ignore Wmissing-braces warnings on clang. 2023-01-30 20:32:33 +01:00
Goatman13
f1e80c466d IPU: Reset threshold on IPU reset. 2023-01-30 19:13:50 +00:00
Mrlinkwii
9a542bcb20 GameDB: fixes for Simple 2000 Series Vol. 48 2023-01-30 17:31:00 +00:00
JordanTheToaster
290c8ec420 GameDB: Various Tekken fixes
Disables preloading entirely on Tekken Tag Tournament and Tekken 4 and adds missing fix comments and missing db entry's for both games.
2023-01-30 14:03:58 +00:00
Mrlinkwii
517ccd5e40 GameDB:fixes for Dragon Quest VIII - Journey of the Cursed King 2023-01-29 17:14:17 +00:00
JordanTheToaster
bb7bbe0a60 GameDB: Add full Mipmapping to HP COS
Adds full mipmapping and trilinear (PS2) to harry potter and the chamber of secrets to fix blurry textures also adds a missing DB entry.
2023-01-29 16:17:35 +00:00
TellowKrinkle
ca25a31d79 GS: Display output ignores TEXA 2023-01-29 10:39:33 +00:00
RedDevilus
e804e99013 GameDB: Harry Potter and the Chamber of Secrets
No texture preloading for Harry Potter and the chamber of secrets to improve performance.
2023-01-28 22:56:12 +00:00
Stenzek
f447aded57 Qt: Better handle VM-requesting-shutdown case
This was a bit wonky in batch mode before. Now all possible exit paths
close the application at the same point.
2023-01-28 13:40:55 +00:00
Stenzek
c596a51593 VMManager: Exit the CPU rec immediately on stopping 2023-01-28 13:40:55 +00:00
Stenzek
ed26368a3a Achievements: Fix race in notifications
GS thread might not initialize fullscreen UI before data finishes
parsing.
2023-01-28 13:40:41 +00:00
Stenzek
1b40e4aaca Qt: Fix -nogui/-batch closing 2023-01-28 02:51:02 +00:00
Stenzek
84d7fe550b GSDumpReplayer: Fix frame limiting 2023-01-28 02:51:02 +00:00
TheLastRar
e68d507659 DEV9: Unify GetAdapter method definitions
by providing a typedef for Adapter
2023-01-27 18:52:29 +00:00
TheLastRar
2db1e8fb81 DEV9: Move logic for getting MAC address into AdapterUtils 2023-01-27 18:52:29 +00:00
JordanTheToaster
df674d4056 GameDB: Correct use of Norway PAL code
Uses the correct flag instead of a spooky question mark.
2023-01-27 18:51:54 +00:00
Silent
21dcda147c Host: Fix a context menu regression from #7960 2023-01-27 18:46:20 +00:00
JordanTheToaster
201d5ba219 Docs: Update sponsors in README 2023-01-27 17:59:01 +00:00
JordanTheToaster
2728462d77 GameDB: A variety of fixes
Fixes to names of games depth line fixes and misaligned bloom galore.
2023-01-27 17:59:01 +00:00
Silent
f73b497b67 Host/VMManager: Remove save state cache invalidation and just populate lists every time
Fixes issues where inexistant save states are listed in dropdowns
2023-01-27 13:52:58 +00:00
Silent
d2bdb85dc8 SaveState: Add a distinct error message when the file doesn't exist
It doesn't make sense to say that the file is not a valid archive,
because it doesn't exist in the first place.
2023-01-27 13:52:58 +00:00
Tyler Wilding
3572b4752e translations: initial run of lupdate for base english strings
lupdate.exe -recursive '.' -ts ./Translations/pcsx2-qt_en.ts -source-language en
2023-01-27 11:11:32 +00:00
Toastarrr
20de162a55 OSD: Fix invisible inputs
OSD: Show all button inputs and their pressure when available
2023-01-27 11:10:47 +00:00
TheLastRar
64a8e66bac DEV9: Sockets, Treat UDP connections with nearby src/dst ports as fixed
Only doing this for equal ports proved too strict for some games.
2023-01-27 11:02:29 +00:00
TheLastRar
ccc1874a4b DEV9: Correct a few socket logs 2023-01-27 11:02:29 +00:00
Stenzek
4fec896378 Qt: Make behavior between both update checks consistent 2023-01-27 10:37:00 +00:00
Stenzek
d485fcb3ee GameList: Fix double CDVD open 2023-01-26 18:26:32 +00:00
Stenzek
c9498c3cec CDVD: Don't report host error on iso detect fail
We don't want it popping up while scanning the game list.
2023-01-26 18:26:32 +00:00
Stenzek
62fffaf56f GzippedFileReader: Fix freeing potentially-invalid pointer 2023-01-26 18:26:32 +00:00
Stenzek
553a5cc455 CDVD: Remove exceptions 2023-01-26 11:11:36 +00:00
Stenzek
957ec1d3d3 VTLB: Add option to pause on TLB miss
Rather than making it contingent on dev builds.
2023-01-26 11:11:36 +00:00
Stenzek
00c158387b x86/iR5900: Use event test to break execution on exit
Particularly relevant for TLB misses, we want to stop execution as soon
as possible.
2023-01-26 11:11:36 +00:00
Stenzek
d12fa690c0 R5900: Remove exceptions 2023-01-26 11:11:36 +00:00
Stenzek
94226e83ba Common: Purge EventSource 2023-01-26 11:11:36 +00:00
Stenzek
4cf041f6cb Common: Move VirtualMemory related functionality to core
Also rewrites page fault handling to not use EventSource junk.
2023-01-26 11:11:36 +00:00
icup321
1b86a6e6f8 GameDB: Fixes for Incredibles - ROTU 2023-01-26 09:44:59 +00:00
Stenzek
6e907ae618 vtlb: Remove upper/lower 32-bit unmapped split
This was only necessary on 32-bit because the sign bit was abused for
representing handlers. Since we're 64-bit only, we use bit 63, which
won't clash with the guest's 32-bit virtual address.
2023-01-26 09:41:13 +00:00
Stenzek
39dde85d03 Qt: Fix -Wunused-lambda-capture warning 2023-01-26 09:28:13 +00:00
Stenzek
8bb9170865 Build: Enable RTTI for Clang debug builds
Qt tries to dynamic_cast as part of an assertion, which aborts at
runtime. When we next rebuild Qt, we'll disable RTTI in Qt, so this will
be a non-issue. But until then, this change makes debug clang builds
usable.
2023-01-26 09:28:13 +00:00
TellowKrinkle
2cd5ce6aea GHActions: Update release pipeline for MultiISA 2023-01-25 18:27:06 -06:00
Florin9doi
64fbaff82b DInput: Support for up to 128 buttons 2023-01-25 20:46:44 +00:00
Stenzek
15a38f5f9d x86/iR5900: Remove reset atomics
These only ever get changed on the EE thread now, this ain't no wx mess.
2023-01-25 15:51:53 +00:00
Stenzek
4c1d93a322 VMManager: Defer reset when running
Stops us resetting during the event test, which can leave things in a
pretty messed up state.
2023-01-25 15:51:53 +00:00
Silent
6a40959f3a DInputSource: Use wil on m_dinput_module 2023-01-25 13:21:51 +00:00
Mrlinkwii
c4bf297f42 GameDB: clean up comments 2023-01-25 13:15:58 +00:00
Stenzek
da1b408f97 GS: Remove config.h
It conflicts with the main PCSX2 Config.h, and the defines don't need to
be set in the global namespace anymore.
2023-01-25 13:15:17 +00:00
Stenzek
91c3e3b684 GS/SW: Use rip-relative addressing for constants 2023-01-25 13:15:17 +00:00
Stenzek
609a44aaf2 GS/SW: Move code buffer into main memory map 2023-01-25 13:15:17 +00:00
Stenzek
3d84443bcf GS/SW: Share JIT code between all threads 2023-01-25 13:15:17 +00:00
Stenzek
56046d4db8 GS/SW: Move scanline local data to rasterizer 2023-01-25 13:15:17 +00:00
Stenzek
90fc037833 GS/SW: Share global data between threads 2023-01-25 13:15:17 +00:00
Stenzek
ee4eadf7a6 GS/SW: Make local a function parameter to DrawScanline 2023-01-25 13:15:17 +00:00
Stenzek
3292121e67 GS/SW: Make local a function parameter to SetupPrim
.. and associated 32-bit removal.
2023-01-25 13:15:17 +00:00
Stenzek
c8416b820b GS/SW: Combine IDrawScanline and GSDrawScanline 2023-01-25 13:15:17 +00:00
Stenzek
c9d229e336 OpenGLHostDisplay: Set colour mask before drawing OSD
Fixes OSD getting messed up when the GS output is turned off.
2023-01-25 12:08:43 +00:00
pgert
bfbcd7a949 GameDB: Force English in Tomb Raider - The Angel of Darkness US (#7950)
Due to a game bug, the game will crash if your BIOS language is set to French or Spanish due to missing files on the disc.
2023-01-25 10:29:23 +00:00
JordanTheToaster
bf2ba3c4d1 GameDB: Add missing demos
Adds some missing PAL demos to the DB.
2023-01-24 18:31:36 +00:00
Stenzek
9d50d44c99 GS: Show VRAM usage in statistics 2023-01-24 10:38:03 +00:00
Stenzek
e76afee12d GS/TextureCache: Only expand target on write on TBW match 2023-01-24 10:20:42 +00:00
TheLastRar
06ef51db2e DEV9: Move NetLib functions into header and mark as inline 2023-01-23 18:47:28 +00:00
TheLastRar
a85a2a3cc5 DEV9: Make use of MAC_Address struct 2023-01-23 18:47:28 +00:00
TheLastRar
8fbecbcdd7 DEV9: Add MAC_Address struct 2023-01-23 18:47:28 +00:00
TheLastRar
b386f78d68 DEV9: Make use of WriteIPAddress 2023-01-23 18:47:28 +00:00
TheLastRar
095757044a DEV9: Add IP_Address helpers to NetLib 2023-01-23 18:47:28 +00:00
PCSX2 Bot
9b3b8aa4de PAD: Update to latest controller database. 2023-01-23 17:05:04 +01:00
Connor McLaughlin
4932834441 GSRunner: Release globals on shutdown 2023-01-23 16:49:24 +01:00
refractionpcsx2
8773ebf64b VM: Queue shutdown message when called from inside emulation. 2023-01-23 16:45:58 +01:00
Connor McLaughlin
f628795b3f GS/Vulkan: Don't apply TFX state on utility draw 2023-01-23 15:01:57 +01:00
lightningterror
0c78bda328 GS-hw: Fix texture shuffle assert which broke debug builds. 2023-01-23 14:48:40 +01:00
lightningterror
d9f4bc70fb common-ogl: Fix Shader compiled with warnings log spam on gl.
Observed on intel igpu.
2023-01-23 14:48:40 +01:00
lightningterror
ddd2ea5f4d GS-gl/vk: Cleanup some logs.
Instead of ifdefing the longs use Devcon, does the same thing.
Hide point expansion logs behind dev/debug build.
2023-01-23 14:48:40 +01:00
JordanTheToaster
a326303956 GameDB: Fixes for TC SC Pandora Tomorrow
Fixes for black loading screens and misaligned bloom.
2023-01-23 09:47:19 +00:00
refractionpcsx2
ba1eba98ea GS/Debug: Fix bitfield reading in fprintf for cross compatibility. 2023-01-22 23:49:40 +00:00
refractionpcsx2
8282ebce40 GS-HW: Don't optimise clamp on shuffle 2023-01-22 23:12:19 +00:00
Berylskid
4c3b7c45cf GameDB: Remove Preload Frame Data for AC Last Raven
On SLPS-25462, disabling Preload Frame Data no longer causes black screens during missions, so it seems no longer necessary.
2023-01-22 16:18:39 +00:00
JordanTheToaster
668251274a GameDB: Disable Instant VU in Kim Possible WTS
Disables Instant VU to dramatically decrease the load the game puts on the EE and VU for seemingly no reason.
2023-01-22 15:51:38 +00:00
KFZ
e79fc72950 GameDB: Fixes for SpongeBob - The Movie (#7936) 2023-01-22 15:51:22 +00:00
JordanTheToaster
bcda41120e GameDB: Add Autoflush to Dynasty Warriors 5 Xtreme
Autoflush fixes the missing sun luminosity.
2023-01-22 15:01:54 +00:00
Mrlinkwii
80fc00bb05 GameDB: fixes for 'Snowboard Heaven' 2023-01-21 18:39:45 +00:00
refractionpcsx2
f71ccab811 GameDB: Remove BFF deinterlacing from Alpine Racer 3, no longer required 2023-01-21 18:14:13 +00:00
refractionpcsx2
795951a2e8 Build: Fix some VS filers. 2023-01-21 18:14:13 +00:00
refractionpcsx2
d62999ed16 GS: Don't do fast clear if SCANMSK is enabled. 2023-01-21 18:14:13 +00:00
lightningterror
9b1699a5a4 GS-hw: Cleanup GS memory clear.
Create IsConstantDirectWriteMemClear function to reduce code duplication and making code cleaner.
2023-01-21 17:01:32 +00:00
Stenzek
88c1f00b62 GS: Add audio capture and custom resolution 2023-01-21 16:56:57 +00:00
Stenzek
6834367a3e GS: Move video capture encoding onto its own thread 2023-01-21 16:56:57 +00:00
Stenzek
dedcf21a37 GSCapture: Make readback for capture asynchronous 2023-01-21 16:56:57 +00:00
Stenzek
a747a5f9fa SPU2: Make SndOut.h compile in isolation 2023-01-21 16:56:57 +00:00
Stenzek
fcfb9865df GS: Add GSDownloadTexture (so we can download more than one at once) 2023-01-21 16:56:57 +00:00
JordanTheToaster
aa1e9cc9fa GameDB: Add AutoFlush to Battle For Volcano Island
Adds autoflush to fix texture corruptions.
2023-01-21 16:02:08 +00:00
Silent
9b7d21891d GameDB: Correct Colin McRae Rally 3 sun rendering 2023-01-21 14:18:17 +00:00
lightningterror
df19baed37 labeler: Add labels to shader files changes based on renderer. 2023-01-21 01:28:59 +01:00
Leyo
7848f6a1c5 GameDB: Syphon Filter: The Omega Strain Beta Speed Fix (#7926)
Co-authored-by: Leyo1 <71053461+Leyo1@users.noreply.github.com>
2023-01-20 22:57:25 +00:00
JordanTheToaster
14e128337d GameDB: Add missing Bratz The Movie fix
Adds a missing fix for the NTSC-U version of the game.
2023-01-20 22:56:31 +00:00
lightningterror
cb314f0a0b labeler: PAD labels are unified now. 2023-01-20 18:38:54 +01:00
Oymat
ddb313fd2b GameDB: Add Mipmapping and Trilinear to Parappa the Rapper 2 (#7924)
Closes https://github.com/PCSX2/pcsx2/issues/7922
2023-01-20 15:53:13 +00:00
lightningterror
8f183955a0 GS-vk: Fix sample_4_index shader.
Macro conditions conditions should return a value.

Fixes bad shader issues on games that trigger it.
Fixes Star Ocean shadows.
Fixes Keroro Gunsou - Mero Mero Battle Royale text.

Make the rounding consistent accross all renderers.
2023-01-20 10:18:03 +01:00
Mrlinkwii
536a4162c4 GameDB: upscaling fixes for 'TOCA Race Driver' 2023-01-19 21:47:36 +00:00
TheLastRar
41a47f99f7 DEV9: Use unique_ptr via typedef for ifadddrs buffer 2023-01-19 14:56:18 +01:00
TheLastRar
31fa1ea21e DEV9: AdapterUtils formatting 2023-01-19 14:56:18 +01:00
Stenzek
fb49c71118 SPU2: Clean up some unused/conditionally used functions 2023-01-19 11:02:13 +00:00
Stenzek
0b87cfc7d4 SPU2: Clamp output to 32767 instead of 32512
Another air-ism which doesn't make much sense.
2023-01-19 11:02:13 +00:00
Stenzek
76fa37019e SPU2: Use 16-bit samples for output
It's clamped to 16-bit in the output anyway.

Volume application is moved to the audio thread, so the stretcher has
higher precision if the user chooses a low volume.

Also vectorizes the int->float conversion (since it happens on the EE
thread, it's beneficial for performance).
2023-01-19 11:02:13 +00:00
Tokman5
d94e861a78 GS: Add video folder and support additional arguments for video dumping 2023-01-19 10:39:22 +00:00
Oymat
d9b537d334 GameDB: Add SoftwareRendererFMVHack to Onimusha: Warlords (#7916)
close https://github.com/PCSX2/pcsx2/issues/7787
2023-01-18 19:15:43 +00:00
Stenzek
93c2081d3f USB: Remove readerwriterqueue
Not used anymore, apparently forgot to remove this in the USB refactor.
2023-01-18 10:08:46 +00:00
Leyo
5ad8ed43fd GameDB: Syphon Filter: The Omega Strain PAL speed fix patch (#7806)
Co-authored-by: Leyo1 <71053461+Leyo1@users.noreply.github.com>
2023-01-17 20:21:13 +00:00
Mrlinkwii
1f4416a77a GameDB: upscale fixes for 'Lord of the Rings, The - The Two Towers' 2023-01-17 19:26:13 +00:00
Mrlinkwii
e9d4dba64b GameDB: fixes for 'Dreamworks Madagascar' 2023-01-17 11:15:42 +00:00
lightningterror
3a2307a5c6 GS-hw: Cleanup GSRendererHW.
Constants, initializations, casts, broken commented out logs and more.
Remove unused/duplicate function EmulateAtst.
2023-01-16 20:34:10 +00:00
Stenzek
d6c1af1a0c IPU: Combine source files to work around an LTO bug in clang 15
Works around an LTO bug which seems to occur in clang 15, but not in
clang 12. The entire else branch in the 0 case in get_non_intra_block()
was being removed...

Fixes Burnout 3 crashing in clang builds.
2023-01-16 20:13:46 +00:00
JordanTheToaster
f6cb7ca01d GameDB: Add HPO Normal to WWE 2008 and 2009
Fixes slight blur on people and depth bleed that happens on the right hand side.
2023-01-16 18:19:27 +00:00
PCSX2 Bot
bc0fdc49e0 PAD: Update to latest controller database. 2023-01-16 17:18:26 +01:00
Stenzek
43ccb63eb5 Qt: Add DS4/DS5 LED settings 2023-01-16 14:08:01 +01:00
Ty Lamontagne
a0000a8547 Debugger: Implement boot and debug
Creates a breakpoint automatically on the ELF entry point
2023-01-15 17:05:35 +00:00
Stenzek
a37ff0c4f2 GS/Vulkan: Fix incorrect clamp in CreateSurface() 2023-01-15 17:40:15 +01:00
Stenzek
e449ad7472 GS/TextureCache: Check PSM matches before expanding target
Mercenaries is doing a 128x4095 write in PSMT4, which when upscaling,
goes beyond the limits of most GPUs.
2023-01-15 17:40:15 +01:00
Stenzek
a718a785b3 GS/TextureCache: Don't recycle resized target textures
They're probably going to be oddly-sized.
2023-01-15 17:40:15 +01:00
Stenzek
ea7cc08832 GameDB: Remove preload frame from Burnout games
Doesn't appear to be needed with GPU CLUT?
2023-01-15 16:20:40 +00:00
Stenzek
a342f4c7e9 GS/HW: Adjust Burnout CRC hack to stop hash cache spiking 2023-01-15 16:20:40 +00:00
JordanTheToaster
0af2657bbc UI: More text descriptions for options
Adds more text descriptions for various options to help understand what a setting does better.
2023-01-15 14:49:05 +00:00
Stenzek
451c2a244f SPU2: Fix sound output
Regression from a603aed7db
2023-01-15 12:48:47 +01:00
lightningterror
a603aed7db SPU2: Update WriteSamples function commented out code to work properly when enabled. 2023-01-15 11:10:46 +01:00
lightningterror
f6bbf410f1 SPU2: Remove dynamic tuning commented out code.
No longer works as it relied on wx.
2023-01-15 11:10:46 +01:00
lightningterror
018692edd0 SPU2: Cleanup SndOut.cpp
const, casts, constexpr, initializations.
2023-01-15 11:10:46 +01:00
pgert
2740785df5 UI: Correct Error-messages: "SSE4.1" not "SSE4" (#7890) 2023-01-14 23:06:56 +00:00
Stenzek
613a9964a1 FullscreenUI: Fix descriptor use-after-free when deleting state 2023-01-14 14:07:30 +00:00
Ty Lamontagne
2ef2f5db1d Debugger: Fix step out 2023-01-14 12:51:14 +01:00
Ty Lamontagne
577e15a949 Debugger Expressions: Add 'target', 'load', and 'store' reference
target -> The evaluated target of the load or the store, 0 if the opcode is not a memory access
load -> The evaluated target of a load, is 0 if the opcode is not loading
store -> The evaluated target of a store, is 0 if the opcode is not storing

Fixes the disassembly widget mouse click handler
Fixes the breakpoint dialog not setting the breakpoint address or condition cpu (oops)
2023-01-14 01:58:04 +00:00
Mrlinkwii
58ff3e6c0d GameDB: add missing serial 2023-01-13 23:57:13 +00:00
Stenzek
80c471a939 Dmac: Fix incorrect condition for OPH flag hack
Fixes tutorial level in Naruto - Uzumaki Chronicles.
2023-01-13 12:20:12 +00:00
refractionpcsx2
b78fca7b91 GameDB: Add Half-Pixel Offset for Sega Superstars Tennis 2023-01-13 10:26:41 +00:00
Connor McLaughlin
be76092195 USB: Correct Keyboardmania binding list 2023-01-13 09:31:27 +00:00
Stenzek
771d3c3c9d CI: Retry downloading commands on Linux
The Azure Ubuntu package server, in particular, seems to be very
unreliable. Hopefully within 10 attempts it'll complete the package
download in such cases.
2023-01-13 09:30:46 +00:00
arcum42
8c21765c0f cmake: Turn back on some warnings that no longer need to be turned off. 2023-01-13 09:27:29 +00:00
TellowKrinkle
a2e3522862 GS:MTL: Implement clut shaders 2023-01-13 00:43:47 -04:00
Mrlinkwii
e20c2210f5 GameDB: fixes for Made Man 2023-01-12 20:56:51 +00:00
lightningterror
11f3fecd11 GS-d3d: Fix Wmissing-braces warnings. 2023-01-12 16:26:56 +01:00
lightningterror
1a5d7c1c5d Qt: Fix Wunused-const-variable and Wunused-function warnings. 2023-01-12 16:26:56 +01:00
Connor McLaughlin
0bca1aab74 Misc: Latest round of warning cleanups 2023-01-12 11:04:29 +01:00
Connor McLaughlin
95fa15f902 Vulkan: Use pool of semaphores instead of per-image
Some drivers apparently don't iterate images in the order you expect.
2023-01-12 11:03:21 +01:00
lightningterror
d586582489 GS: Purge leftover wx tooltips. 2023-01-12 01:38:35 +01:00
Stenzek
7ef46eaa29 GameDB: Swap some CPU CLUT games for GPU CLUT
Burnout series, NFS Most Wanted.
2023-01-11 23:37:43 +00:00
Stenzek
38957625ad GameDatabase: Add GPUTargetCLUT 2023-01-11 23:37:43 +00:00
Stenzek
d30e076dbd GS: Add GPU Target CLUT 2023-01-11 23:37:43 +00:00
Stenzek
0619555232 GS/HW: Use texel fetch/load instead of sampler for palettes
Saves a multiply in the shaders in some cases, and frees up one
descriptor slot.
2023-01-11 23:37:43 +00:00
Stenzek
3ffa5eb613 GS: Add const to GSDirtyRect functions 2023-01-11 23:37:43 +00:00
Mrlinkwii
c60583c6bb GameDB: fixes for Battle for Volcano Island 2023-01-11 23:10:14 +00:00
Stenzek
4cf7a1086d GS/HW: Adjust Barnyard fix for Jurassic Park and Nicktoons Unite
Draws its mipmaps at runtime in a very similar way, except with 24-bit
textures as well as 16/32-bit.
2023-01-11 22:40:04 +00:00
RedDevilus
fa75006ca9 VMManager: Increase software thread count on multicore (4+) CPUs
3 is a nice compromise if you have 4 core or more but for some games higher numbers like 8 or even higher would work, however for a lot of games it would perhaps even reduce the performance compared to 3 software rendering threads or in more likelihood have diminishing returns.

Keep in mind that this is just a general situation, in actual use it might be less extra performance (if at all) as you have expected.
2023-01-11 21:48:36 +00:00
RedDevilus
d28b2fa057 Qt: Lower audio ms + Tooltip (affinity+Cycle skip)
Lowering 100 ms audio latency to 60 ms.
Makes 100 mixing latency with 20 output latency (120) into a new default of 80 ms which is 50% lower but still is enough headroom as 40 ms even for less capable machines is too high.

Adding tooltip for Affinity Control
Changing tooltip for Cycle Skip from None to Disabled as that is a valid option.
2023-01-11 18:56:42 +00:00
arcum42
0a90765ed0 build: -Wno-maybe-uninitialized is a gcc only warning. 2023-01-11 00:55:21 +01:00
arcum42
2892f629f0 build/QT: Unmute the warnings for deprecation & overloading virtuals. Fix assorted warnings. Mute 'maybe initialized' warnings. Add a policy to take care of LTO warnings in cmake. 2023-01-11 00:55:21 +01:00
Mrlinkwii
5be05853c6 GameDB: fixes for Hawk Kawasaki Racing 2023-01-10 21:00:43 +00:00
JordanTheToaster
0f569ac5cb Format: Clang format System.cpp 2023-01-10 16:18:26 +01:00
JordanTheToaster
b725c1e8e0 System: Remove unused extensions
PCSX2 does not even boot on SSE2 or SSE3 systems and we do not use SSE4a so we should remove it SSE4.1 / 4.2 is a requirement so no use being here either.
2023-01-10 16:18:26 +01:00
JordanTheToaster
4d418d1bb5 Emitter: Remove old unused code
Irrelevant and outdated code that is no longer needed.
2023-01-10 16:18:26 +01:00
Ty Lamontagne
752594f69a Debugger Breakpoints: Implement the user data role in the model
Consistent with the other models, and saves some awkward usage in the cpu widget where we have to interpret the variant as a string, to then convert it to a uint. I like this better as it provides an easy interface to get the 'raw' breakpoint data out of the model.
2023-01-10 13:57:06 +01:00
Ty Lamontagne
b6125e97e9 Debugger Stack frames: (Refactor) Use model based widgets 2023-01-10 13:57:06 +01:00
Ty Lamontagne
c00caa886e Debugger Threads: (Refactor) Use model based widgets 2023-01-10 13:57:06 +01:00
Ty Lamontagne
37540d1c68 Debugger Breakpoints: (Refactor) Use some reflection and item models 2023-01-10 13:57:06 +01:00
lightningterror
8fca67f0d6 FullscreenUI: Cleanup remnants of spu2 interpolation mode. 2023-01-10 13:47:41 +01:00
PCSX2 Bot
13f891c34f PAD: Update to latest controller database. 2023-01-09 17:05:52 +01:00
JordanTheToaster
f924ab721a SPU2: Purge interpolation options
Removes the options menu for interpolation as all but gaussian will be removed.
2023-01-08 15:19:51 +00:00
JordanTheToaster
ae3708edc6 GameDB: Correct Blood Omen 2 name
Corrects Blood Omen 2s name to properly say "The Legacy of Kain".
2023-01-08 14:08:54 +00:00
Stenzek
4ef2574ae3 GS: Separate Cd output from Cs blend cases
Fixes white screen inbetween logos in FFX.
2023-01-08 12:44:17 +00:00
Stenzek
154171e01e x86/microVU: Don't assert clearing macro mode temps 2023-01-08 09:12:44 +01:00
refractionpcsx2
17732a0b8a VU: Fix out of bounds check for Q clamp 2023-01-07 23:18:33 +00:00
Stenzek
b6906d1edc FullscreenUI: Fix Threaded Presentation toggle title 2023-01-07 09:48:14 +00:00
Stenzek
26329765d1 SPU2: Apply volume on startup 2023-01-07 09:48:14 +00:00
arcum42
fab7424ebb x86regs: iCore.h cleanup. (#7769)
* VU: Make _x86regs.reg signed, as -1 is supposed to indicate that it is unassigned.

* VU: Convert a few defines to enums.

* microVU: Set bool to true rather than 1.

* xmm: Use std:array in a few spots, and make initializing some spots less verbose.

* iCore: Remove comment, as it's inaccurate. Leaving as s8 for consistency with xmm.
2023-01-06 21:40:09 -08:00
TellowKrinkle
e4c9416c4a 3rdparty: Update to gtest 1.12.1 2023-01-06 20:27:18 -04:00
Víctor "IlDucci
72c661e8f5 GameDB: Fix Terminator 3 Spain region, add Buzz Brain of Spain(#7813) 2023-01-06 21:53:22 +00:00
refractionpcsx2
d5acd98eb3 UI: Correct default tab for graphics settings.
Apparently Qt Designer thinks if you're renaming a checkbox, *obviously* that means you're wanting the default tab changing too...
2023-01-06 20:56:40 +00:00
Mrlinkwii
849c754ca2 GameDB:: fixes for 'Obscure II - The Aftermath' 2023-01-06 17:39:47 +00:00
refractionpcsx2
e6f6385173 GameDB: Add Disable Instant VU to Batman - Rise of Sin Tzu 2023-01-06 16:11:09 +00:00
refractionpcsx2
d3ca2bf58f GS: Make VK threaded presentation the default 2023-01-06 15:49:49 +00:00
Mrlinkwii
82f1dbca89 memory card: Remove commented out WX code. 2023-01-06 15:35:20 +00:00
Stenzek
c85b826978 PerformanceMetrics: Track min/avg/max frame time 2023-01-06 14:57:57 +00:00
Stenzek
f28c40aa8e Qt: Expose Threaded Presentation setting 2023-01-06 14:57:57 +00:00
Stenzek
3fa3bc1719 Vulkan/Context: Acquire swap chain image after presenting 2023-01-06 14:57:57 +00:00
Stenzek
93bd95f4bd Vulkan/Context: Pass swap chain through to submission
Simplifies things a bit.
2023-01-06 14:57:57 +00:00
Stenzek
7d572ff794 Vulkan/SwapChain: Use a separate semaphore for each image 2023-01-06 14:57:57 +00:00
JordanTheToaster
693278a87b GameDB: More BF2 MC Fixes
Adds Tex in RT and CPU CLUT to BF2 MC to fix lights shining through objects like the moon shining through buildings.
2023-01-06 14:25:09 +00:00
RedDevilus
b6bcbcac96 Qt: Fix light themes
I've given some love to dark themes, but doesn't mean light themes doesn't deserve it either. Making it better in contrast to make it more legible along with making it a bit more appealing.
2023-01-06 12:43:42 +00:00
Stenzek
4cfea01aa8 GS/HW: Add CRC hack for Battlefield 2: Modern Combat
Full blending is needed to render the terrain correctly.
2023-01-06 11:59:10 +00:00
Stenzek
9e301e1aec GS/HW: CRC hack for Barnyard 2023-01-06 11:59:10 +00:00
Stenzek
8502acffb7 GS/HW: Add mipmap support to SwPrimRender() 2023-01-06 11:59:10 +00:00
Stenzek
580b7c94fb GS/HW: Remove AfterDraw function
Not needed.
2023-01-06 11:59:10 +00:00
Stenzek
fe1e432f9e GS: Move HW hacks into game database 2023-01-06 11:59:10 +00:00
Stenzek
904ccc7a91 VMManager: Log when game changes 2023-01-06 11:59:10 +00:00
Stenzek
069196704e GS: Move HW hacks into their own file and remove from GSState 2023-01-06 11:59:10 +00:00
arcum42
2db6bf399e common: Remove pxUSE_SECURE_MALLOC. 2023-01-05 14:58:54 -08:00
Mrlinkwii
a5bc49ee4a Misc : remove missed wx vs filters 2023-01-05 20:54:16 +00:00
arcum42
949d455d2f cmake: Make the clang release build always lto. 2023-01-05 07:48:06 -08:00
arcum42
3254d27fc2 cmake: Changed the preset names, made clang always use lld, and added a new lto preset. 2023-01-05 07:48:06 -08:00
arcum42
4921afdb51 build: Cleanup. Fix a few names, and use cache variables for the compiler. 2023-01-05 07:48:06 -08:00
arcum42
54b653cc00 cmake: Add CMakePresets.json to project. 2023-01-05 07:48:06 -08:00
lightningterror
3066ab0d06 Qt: Fix Wunused-variable warning. 2023-01-05 15:02:17 +01:00
lightningterror
17c5acda3c microVU: Fix Wunused-function warning. 2023-01-05 15:02:17 +01:00
lightningterror
ee3cacffd7 SPU2: Fix class has a constructor with 1 argument that is not explicit warnings.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror
0cd5b9072c D3D12HostDisplay: Fix class has a constructor with 1 argument that is not explicit warning.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror
987fdd32fb Frontend-imgui: Fix scope of the variable can be reduced warning.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror
314143db7a Debugger: Fix clarify calculation precedence for '&' and '?' warnings.
Codacy.
2023-01-05 15:02:17 +01:00
lightningterror
10f468dd3f USB: Fix struct member is never used warning.
Codacy.
2023-01-05 15:02:17 +01:00
Mrlinkwii
c66881d4a6 gitignore: remove wx mentions 2023-01-05 14:53:10 +01:00
Mrlinkwii
45d42da528 GzippedFileReader: Remove commented out WX code. (#7796) 2023-01-05 14:31:04 +01:00
refractionpcsx2
c50e1800ec SPU2: Allow loop rewrite of LOOPSTART if block header already passed 2023-01-04 22:40:18 +00:00
Stenzek
06aa051162 UnitTests: Combine into core/common test suites
Should reduce CI run time.
2023-01-04 11:43:23 +00:00
Stenzek
33e7bcbdb8 UnitTests: Compile with PCSX2 core library
Instead of shoehorning GS source files into the unit tests, we link with
the full PCSX2 core library. We stub out all the Host functions, as,
well, there isn't one, and they may be indirectly referenced.
2023-01-04 11:43:23 +00:00
Connor McLaughlin
c44266eb82 MTVU: Fix hang on shutdown if thread never opened 2023-01-04 11:43:23 +00:00
Connor McLaughlin
dcbb1483b9 USB: Fix incorrect serialization of HIDKbdDevice. 2023-01-04 10:53:38 +01:00
Mrlinkwii
4620b566b9 GameDB: add fixes to Syphon Filter - The Omega Strain 2023-01-03 20:21:13 +00:00
JordanTheToaster
076b11a735 GameDB: Various fixes
Adds HPO Special Mipmapping Full and Trilinear PS2 to FIFA 06 to 10 and fixes the name and adds HPO Special to Conan.
2023-01-03 13:20:56 +00:00
Stenzek
246f783a64 CI: Generate Windows Clang builds 2023-01-03 12:16:50 +00:00
Stenzek
ac3e7fbf44 MSBuild: Support building with clang-cl 2023-01-03 12:16:50 +00:00
Stenzek
dda1665b9c USB: Support stereo input for Singstar Mic 2023-01-03 12:16:30 +00:00
Stenzek
db4d721b93 x86/iR5900: Always break rec blocks on SYSCALL/BREAK
In all cases except for GetOsdConfigParam/GetOsdConfigParam2 the HLE
syscall handler will raise the CPU exception, changing the PC.

So, there's no point compiling the rest of the block, especially when it
may contain garbage code. No point checking the PC either, as in almost
every case, it will have changed. So just go straight to the dispatcher.

Note this will have a slight behavioral change - both SYSCALL/BREAK will
check the cycle count for an event test now, whereas before only BREAK
did. But I doubt this'll cause any issues.
2023-01-03 12:16:06 +00:00
JordanTheToaster
f48824dec0 GameDB: Remove disable Instant VU from SoTC
Removes disable Instant VU1 from SoTC as it should be user choice to enable or disable it if needed.
2023-01-03 09:27:04 +00:00
Ty Lamontagne
eac90c6b42 Debugger Disassembly: Add 'NOP Instruction(s)' Context menu action 2023-01-03 04:38:14 +01:00
Ty Lamontagne
ec5a91b89a Debugger Breakpoints: Allow toggling from list / dialog. 2023-01-03 04:38:14 +01:00
Ty Lamontagne
a9a3342519 Debugger: Disable certain actions when the VM is not alive. 2023-01-03 04:38:14 +01:00
Ty Lamontagne
51f3e1b684 Debugger Disassembly: Page Up/Down hotkey for disassembly view 2023-01-03 04:38:14 +01:00
PCSX2 Bot
2459145dbf PAD: Update to latest controller database. 2023-01-02 18:03:24 +01:00
refractionpcsx2
d48abe03b0 GameDB: Comment all EE/VU fixes, add some missing ones, modify vu fixes 2023-01-02 16:11:02 +00:00
Stenzek
1e4e54eca0 GS: Silence ignored-qualifiers warning in GCC too 2023-01-02 14:13:42 +00:00
Stenzek
9d23da226f Misc: Remove linux_various subdirectory
Again, nothing in here has been used in a long time.
2023-01-02 14:13:42 +00:00
Stenzek
c911738b5c Misc: Remove build.sh
Majority of stuff in this file is deprecated, or hasn't been used
in a long time.
2023-01-02 14:13:42 +00:00
Stenzek
574e0a10e2 gitignore: WX cleanup and add build dir variants 2023-01-02 14:13:42 +00:00
Stenzek
f240660a6e CMake: Post-WX cleanup
- Remove unused build options

 - Disable setcap by default
    Applications should not need to call sudo as part of the build process.

 - Rename XDG_STD to USE_LEGACY_USER_DIRECTORY
    By default, we use ~/.config/PCSX2 now.

 - Default Wayland support to on
    I don't think there's any systems worth supporting that don't have it.

 - Rework "install" logic
    Linux no longer installs to GIT_ROOT/bin, it builds direct to BUILD/bin.
    Saves a file copy, and running make install before running your developer
    build was always silly.

 - Don't require install target to build appimage
    AppImage creator now just adds the entire bin directory as-is.
    Everything needed is in there.
2023-01-02 14:13:42 +00:00
Connor McLaughlin
b2416c6466 GS/DX12: Remove undefined functions from header 2023-01-02 13:02:36 +00:00
Stenzek
3ed489f35c Qt: Only apply non-visible window info rule for X11
Again, DInput needs the main window, even if it's not visible.
2023-01-02 08:31:55 +00:00
Stenzek
f96ad8ff6e Qt: Return main window info when not running
Needed for DInput.
2023-01-02 08:31:55 +00:00
Stenzek
2d7289a248 DInputSource: Fix incorrect unlock on failure 2023-01-02 08:31:55 +00:00
lightningterror
2de6a5029f gh-workflows-macos: Remove leftover wx dependencies.
Also remove qt gui check since it's the only gui we use.
2023-01-02 08:50:43 +01:00
Mrlinkwii
bed3cae6df GameDB: remove SoftwareRendererFMVHack from Onimusha - Dawn of Dreams 2023-01-01 17:41:21 +00:00
Stenzek
b3bf3e46be Qt: Fix per-game settings with sliders 2023-01-01 17:12:04 +00:00
Stenzek
336ef58f61 CMake: Search specifically for the ffmpeg components we need
And fix the not-found logic.
2023-01-01 17:11:49 +00:00
Stenzek
f3e7491c3a CMake: Don't disable native arch in debug builds
The reasoning apparently dates back to 2016, and was stupid even then.
2023-01-01 17:11:49 +00:00
lightningterror
48b9d2f53e common-ogl: Fix Program linked with warnings log spam on gl.
Mostly observed on amd driver.
2023-01-01 12:03:02 +01:00
Stenzek
1dff9897c9 x86/microVU: Only update MXCSR when it's different
Saves reloading it when the EE and VU0 rounding modes are the same.
2023-01-01 10:42:59 +00:00
Stenzek
b5a61d2915 SPU2: Move WaveDump and friends behind PCSX2_DEVBUILD 2023-01-01 09:50:54 +00:00
Stenzek
0c5b43bcdd SPU2: Move SndOut declarations to header
In some cases clang will optimize out the global variable definition
otherwise.
2023-01-01 09:50:54 +00:00
Stenzek
fe8ebe3f79 SPU2/Cubeb: Fix unused variable warning 2023-01-01 09:50:54 +00:00
Stenzek
265afcec7e x86/microVU: Fix incorrect VI being backed up when uncached
Fixes hang going ingame in Gitaroo Man.
2023-01-01 09:47:46 +00:00
RedDevilus
26d5ee0c93 Qt: Fix out-of-focus colors + 2 new dark themes
One annoying issue is when you watch the emulator when unfocused especially on light themes such as the blue theme where the button is very light and the text as well.

Re-ordered the themes according to their position in the GUI.

Also added a purple and a more dark calm variant compared to vibrant Scarlet Red and a Blue variant for Ruby.
2022-12-31 23:25:31 +00:00
Stenzek
6e1011f18a VMManager: Only warning for audio if async mix is used 2022-12-31 23:23:58 +00:00
Stenzek
9bca1946ed SPU2: Add output device selection 2022-12-31 23:23:58 +00:00
Stenzek
0c8beedb94 SPU2: Split output latency and target buffer size 2022-12-31 23:23:58 +00:00
Stenzek
c274e447dd Qt: Don't push volume changes through full settings apply
Saves the thread sync, means we don't lag.
2022-12-31 23:23:58 +00:00
Stenzek
2bc2891c73 CommonHotkeys: Add volume control hotkeys 2022-12-31 23:23:58 +00:00
Stenzek
fe1bebc12d SPU2: Namespace logging/debugging 2022-12-31 23:23:58 +00:00
JordanTheToaster
339c483a4b GameDB: Set preloading to Partial for Tekken 4
Sets texture preloading to partial for Tekken 4 to prevent it from exploding most violently.
2022-12-31 23:23:45 +00:00
RedDevilus
73f1f0e1d6 GameDB: Iris 2 + Iris 3
Hashcache disabled + FMVsoftwaregamefix + Roundsprite for Iris 2
Roundsprite was forgotten to be added for the Japanese entries for iris 3 (eternal mana 2)
2022-12-31 23:23:27 +00:00
Stenzek
f83fc9ba27 Qt: Fix Host::GetTopLevelWindowInfo() in nogui mode 2022-12-31 23:22:27 +00:00
xujibbs
4e5692e935 UI/AudioSettings: Correct recommended value for overlap (#7748) 2022-12-31 23:22:01 +00:00
Mrlinkwii
2bb707299a GameDB: add missing serial 2022-12-31 23:20:32 +00:00
Stenzek
9aa46e8543 Misc: Remove GS/config.h include from PCSX2Base.h
Also remove unused options from config.h
2022-12-31 06:57:21 +00:00
JordanTheToaster
4831e51cb4 GameDB: Add SW CLUT to The Incredibles
SW CLUT fixes post processing and HPO Normal aligns the post processing.
2022-12-30 23:38:25 +00:00
Stenzek
4ea331ecf2 x86/microVU: Fix VU1->VU0 register access in MTVU mode
eax wasn't being backed up, and in most cases it contains the address
we're loading from/storing to.
2022-12-30 08:49:05 +00:00
TheLastRar
79764430d8 DEV9: Fix out_of_range exception with automatic gateway 2022-12-29 22:54:04 +00:00
refractionpcsx2
51107ee9dd mVU: Align x86ptr based on AVX2 caps 2022-12-29 20:02:57 +00:00
Connor McLaughlin
d359e8420b x86/iR5900: Fix incorrect blend in mfsa 2022-12-29 14:18:21 +00:00
JordanTheToaster
ea11bb61e3 GameDB: Disable texture preloading for Time Crisis 3
Disables texture preloading in Time Crisis 3 to massively improve performance.
2022-12-29 12:18:51 +00:00
JordanTheToaster
4a90a3e1c9 Readme: Update specifications requirements
Update brings the requirements more in line with modern hardware.
2022-12-29 10:24:13 +00:00
JordanTheToaster
8f73e93205 GameDB: Add VU0 Clamping to Sly 3
Adds VU0 Extra + Preserve Sign to Sly 3 to fix the bugged camera and not break the "The Ancestors' Gauntlet" level.
2022-12-29 10:01:48 +00:00
Stenzek
1a7263cb9f x86/microVU: Forward CTC2 I direct to VNNNi instructions 2022-12-29 10:01:25 +00:00
Stenzek
d6332e796e x86/iR5900Analysis: Correct backprop for VNNNi 2022-12-29 10:01:25 +00:00
Stenzek
ebcb3b413c x86/iR5900: Use register cache for mfsa
It also was incorrect for the XMM path before... loading 64 bits instead
of 32.
2022-12-29 10:01:25 +00:00
Stenzek
2a92edd7ed x86/iR5900: Don't rename GPR from mf{hi,lo} when in xmm
Redundant codegen, also incorrect when not in GPR.
2022-12-29 10:01:25 +00:00
Stenzek
9584672051 x86/microVU: Rewrite IADD from vi00 to mov 2022-12-29 10:01:25 +00:00
Stenzek
6018936dc2 x86/microVU: Optimize loadstores to offsets from vi00 2022-12-29 10:01:25 +00:00
Stenzek
d00da31e60 x86/microVU: Avoid redundant register move on stores 2022-12-29 10:01:25 +00:00
Stenzek
afd8ff1435 x86/microVU: Flush register cache before T/D-bit
Saves flushing in both execution paths.
2022-12-29 10:01:25 +00:00
Stenzek
4f65ef4d33 x86/microVU: Preload registers at beginning of block 2022-12-29 10:01:25 +00:00
Stenzek
cdadad5689 x86/microVU: Use unrolled copy loop for updating PL state 2022-12-29 10:01:25 +00:00
Stenzek
00d768a6bf x86/microVU: Add VI caching 2022-12-29 10:01:25 +00:00
Stenzek
08faba5455 x86/microVU: Add tracing similar to EE
Can dump per-block or per-instruction, useful for debugging regressions.
2022-12-29 10:01:25 +00:00
lightningterror
c1e92b594e Qt: Move around tooltips where the majority of bulk is. 2022-12-29 09:47:42 +01:00
lightningterror
d38147bcf2 Qt: Allow to run bilinear filtering with integer scaling. 2022-12-29 09:47:42 +01:00
Mrlinkwii
8681eb0251 CI : remove mention to wxWidgets in MAC build-dependencies 2022-12-29 09:37:40 +01:00
refractionpcsx2
72ecb0fce3 VIF: use outer cast in VU cycle checks 2022-12-29 04:43:12 +00:00
refractionpcsx2
17b052430b USB: Limit microphone lower latency to 1ms 2022-12-29 03:24:39 +00:00
refractionpcsx2
94d52d9ddb GameDB: Add HW mode fixes for Princess Maker 2 2022-12-29 00:33:34 +00:00
JordanTheToaster
9ecaa46eb8 GameDB: Add VU1 Rounding to Hitman Contracts
Adds vu1 nearest rounding to Hitman Contracts to fix missing light cones curtains and certain effects.
2022-12-28 22:46:18 +00:00
refractionpcsx2
a10b0c5dc5 VIF: Make sure VU's are updated when waiting 2022-12-28 19:08:18 +00:00
Stenzek
4242201777 GameDB: Add nearest VU1 rounding to Destruction Derby Arenas 2022-12-28 16:36:36 +00:00
Stenzek
ff82232e27 Config: Add separate VU0/VU1 round/clamp mode options 2022-12-28 16:36:36 +00:00
refractionpcsx2
5ee0565342 VM: Only load patches if game is loading. 2022-12-28 14:42:45 +00:00
refractionpcsx2
483e2236ca GameDB: Add Ratchet & Clank 2 Megaturrent Dynapatch 2022-12-28 13:55:26 +00:00
refractionpcsx2
7ee62b8222 GameDB/Patching: Add dynamic EE JIT patching 2022-12-28 13:55:26 +00:00
refractionpcsx2
74c14fdf66 GameDB: Add fixes for Robin Hood 2 - The Siege 2022-12-28 11:10:59 +00:00
Stenzek
8a34c4b2e2 Common: Remove mt_queue.h
More stuff from wx.
2022-12-28 11:02:53 +00:00
Stenzek
b1dcd53212 Qt: Merge old wxResources.rc (icon) into PCSX2.rc 2022-12-28 11:02:53 +00:00
Stenzek
4d1671f147 USB: Use map lookup instead of advance 2022-12-28 11:02:53 +00:00
Stenzek
deedc5d79f Updater: Fix incorrect identifier in manifest 2022-12-28 11:02:53 +00:00
Stenzek
02dc164611 SPU2: Move files from host into main directory
And get rid of the questionable WavFile.
2022-12-28 11:02:53 +00:00
Stenzek
de7bbd6c37 Common: Add WAVWriter
To replace WAVFile with a questionable license history.
2022-12-28 11:02:53 +00:00
Stenzek
ddf66056ec PAD: Remove Gamepad.h
Declarations were incompatible with Qt anyway.
2022-12-28 11:02:53 +00:00
Stenzek
f0a7c41b81 Misc: Remove last remnants of DISABLE_RECORDING 2022-12-28 11:02:53 +00:00
Stenzek
cb200f6e9e SPU2: Remove some now-unused functions 2022-12-28 11:02:53 +00:00
Stenzek
78a66147f1 GSDevice: Ignore -Wignored-qualifiers for CAS
warning: 'restrict' type qualifier on return type has no effect [-Wignored-qualifiers]
2022-12-28 11:02:53 +00:00
Stenzek
5999a1a62e D3D12/Texture: Fix crash when upload buffer exhausts 2022-12-28 10:58:37 +00:00
refractionpcsx2
ab56cfe762 Minor update to main site technical notes. 2022-12-27 16:31:56 +00:00
Florin9doi
654c501fb8 Github: Update issue templates 2022-12-27 16:28:17 +00:00
refractionpcsx2
227c2563c5 GS-HW: Disable texture mapping if not required 2022-12-27 01:38:50 +00:00
refractionpcsx2
4b270e703e GS-HW: Put black draws through blending if Alpha Blend enabled 2022-12-27 01:38:50 +00:00
refractionpcsx2
5bc3b4bf7d GS-HW: On memory clear with alpha blend, check if output colour is black 2022-12-27 01:38:50 +00:00
Connor McLaughlin
353124d82d GS-HW: Make memory clear work for Burnout 3 2022-12-27 01:38:50 +00:00
refractionpcsx2
15a82e2324 GS-HW: Handle clears with single page width better + use vert color 2022-12-27 01:38:50 +00:00
PCSX2 Bot
2b85f96406 PAD: Update to latest controller database. 2022-12-26 20:44:27 +01:00
refractionpcsx2
8d408eaadb UI: Fix selected tab from hotkeys menu shortcut 2022-12-26 15:11:20 +00:00
Stenzek
51f29f40ee USB: Fix loading old states without USB.bin 2022-12-26 14:56:09 +00:00
Florin9doi
72d6ff625c GameDB: Update Utility Disc names 2022-12-26 14:53:33 +00:00
refractionpcsx2
b1766779ee UI: Fix GT Force wheel image 2022-12-26 14:37:37 +00:00
Stenzek
a42143690c USB: Only update when devices plugged 2022-12-26 05:07:05 +00:00
Florin9doi
c21df3b7f0 Pad: DInput: Fix incorrect Dpad labels 2022-12-26 04:53:35 +00:00
Stenzek
a8faf2eb6e SaveState: Partial migration to StateWrapper for USB 2022-12-26 04:26:21 +00:00
refractionpcsx2
8abe5b42e5 GS-HW: Adjust Yakuza CRC hack to remove weird shadow 2022-12-26 03:53:02 +00:00
autofire372
3cfc4cd5be Qt: Allow editing the cheats directory.
Feature parity with the now-gone wx.
2022-12-25 18:28:17 +00:00
Mrlinkwii
661d22f46c 3rdparty: Update svn readme. (#7685) 2022-12-25 15:23:56 +01:00
Stenzek
1f40302b36 GS: Remove GS.rc/resource.h references 2022-12-25 14:47:05 +01:00
Stenzek
dff6d1843a Misc: Remove more wxWidgets references 2022-12-25 14:47:05 +01:00
Stenzek
07b7420ba5 vsprops: Remove a wx reference 2022-12-25 14:47:05 +01:00
Stenzek
43afeb205f Common: Get rid of pxTrap()
wx rubbish, no longer needed
2022-12-25 14:47:05 +01:00
Stenzek
6aeca2c1e3 GSRunner: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
30b1129d60 Dump: Remove unused routines
Sounds like these have been broken for some time, and I added new
dumping functions with the EErec refactor anyway.
2022-12-25 09:27:44 +00:00
Stenzek
8e0e4cf25d 3rdparty: Error fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
7aa3322a04 Qt: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
07789f5dad Core: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
a1ffe4deff x86: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
f407bc12df SPU2: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
4df5c9e1e1 USB: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
a2abe49d3f GS: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
TellowKrinkle
b0e911ad7f GS: Work around clang-cl issues
"error: inheritance model does not match definition" really means "Classes with virtual methods need to be compiled differently from those without in ms-abi, and you declared a pointer to member function, which needs to know what type of pointer to use, before clang knew about any virtual methods, so it guessed the wrong type".
2022-12-25 09:27:44 +00:00
Stenzek
3bb6eb16de Frontend: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
a978abb523 DEV9: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
c4345f9a85 CDVD: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
Stenzek
ca92d4ea3d Common: Warning fixes for clang-cl 2022-12-25 09:27:44 +00:00
arcum42
5c95a6f4fa NTFS: Disable the NTFS checkbox on the platforms that don't have NTFS compression, not the one that does. 2022-12-25 07:48:20 +00:00
JordanTheToaster
dfb0246826 GameDB: Add Mipmapping to Eragon
Adds mipmapping full trilinear PS2 and HPO Special to Eragon to fix up the rather terrible looking image quality.
2022-12-25 05:55:52 +00:00
Mrlinkwii
791bf2c52e Labeler: remove GUI/WX in auto labeler. (#7676) 2022-12-25 03:24:42 +01:00
Mrlinkwii
18bdf4a8d0 README:update Technical Notes 2022-12-24 17:02:19 +00:00
Ziemas
af789a4f8d Add missing <cassert> include 2022-12-24 16:35:43 +00:00
arcum42
30a2675972 Windows: Update CMakelists.txt. 2022-12-24 16:35:31 +00:00
arcum42
5539fe0b73 windows: remove Win32.h 2022-12-24 16:35:31 +00:00
Chromaryu
30504660fa Translation: Add translation notation for all translatable strings 2022-12-24 14:42:20 +01:00
arcum42
00d06db90e build: Get rid of the no-trans flag, and the freetype related function. 2022-12-24 05:31:10 -08:00
arcum42
108a0d0ce6 build: Don't try to install a non-existant file. 2022-12-24 05:31:10 -08:00
arcum42
1bff48cbf9 GS: Get rid of the last two places the now non-existant s_dump_root variable was used. 2022-12-24 05:31:10 -08:00
arcum42
c91cbebc9f build: Remove gtk2 and qt6 options from build.sh. 2022-12-24 05:31:10 -08:00
Mrlinkwii
305df89438 locale: purge wx locale files 2022-12-24 13:51:37 +01:00
Stenzek
42eb289d97 Config: Remove Pcsx2Config::CopyConfig()
Was only needed for wx.
2022-12-24 09:41:06 +00:00
Stenzek
b8596c6f2a Tools: Remove bin2cpp
Stragglers from wx...
2022-12-24 09:41:06 +00:00
Stenzek
8696812d23 3rdparty: Remove pthreads4w 2022-12-24 08:42:23 +00:00
Stenzek
70cd26ce6a 3rdparty: Remove wxwidgets 2022-12-24 08:42:23 +00:00
Stenzek
2b99f3c753 pcsx2-wx: Finally remove it all 2022-12-24 08:42:23 +00:00
Stenzek
96a1c77577 Core: Remove PCSX2_CORE define and leftovers from wx 2022-12-24 08:42:23 +00:00
Stenzek
9a3e7eecd9 CMake: Remove all references to wx 2022-12-24 08:42:23 +00:00
Stenzek
7cb22815e6 CI: Remove wx builds 2022-12-24 07:59:22 +00:00
Stenzek
da2efd88f2 CMake: Default QT_BUILD to on 2022-12-24 07:59:22 +00:00
Ty Lamontagne
2f0b244f48 Debugger: Initial debugger implementation 2022-12-24 07:21:49 +00:00
Ty Lamontagne
78c9b7f33e Debugger Core: Initial QT core work
Revert 3ce242886b (Disabled force symbol loading) until solution is found

If this isn't caught when the game is loaded, the symbols will not be properly loaded while the game is running.

DisassemblyManager: Don't spin continuously if the guest CPU is dead
2022-12-24 07:21:49 +00:00
Stenzek
9f461253a8 Qt: Fix relative directories not being canonicalized 2022-12-24 04:37:51 +00:00
Stenzek
a3d02b8702 Qt: Add debug options panel 2022-12-24 04:37:51 +00:00
Stenzek
8dcda63c85 GS: Get rid of hardcoded dump directory 2022-12-24 04:37:51 +00:00
Stenzek
35e28fc0d0 GS: Get rid of GSApp for Qt 2022-12-24 04:37:51 +00:00
Connor McLaughlin
72fd5211f0 USB: Fix building without cubeb 2022-12-24 04:25:29 +00:00
Connor McLaughlin
690d4fa4b1 FullscreenUI: Add USB to controller settings 2022-12-24 04:25:29 +00:00
Connor McLaughlin
c477ea1628 USB: Change SubTypes() to use a span 2022-12-24 04:25:29 +00:00
Mrlinkwii
9837dc88a0 GameDB: upscaling fixes for Captain Tsubasa and update docs 2022-12-24 01:22:32 +00:00
RedDevilus
23f1c1a149 GameDB: Nascar Thunder 2003
Fixing weird vertical and horizontal artifacting while racing with round sprite half.
2022-12-23 22:45:54 +00:00
Mrlinkwii
d9cf8a474a USB: fix more keyboard issues 2022-12-23 22:45:39 +00:00
JordanTheToaster
5bec0e510d GameDB: Fix Reveal Fantasia hang
Fixes the GIFChain hang on Reveal Fantasia by adding InstantDMA.
2022-12-23 17:41:11 +00:00
Mrlinkwii
14f443124a USB :fix some keyboard issues 2022-12-23 17:07:20 +00:00
lightningterror
9d968e7906 INI: Fix C5051 warning.
Comment out the attribute, can be used in the future.
C++20 requirement.
2022-12-23 14:18:16 +01:00
lightningterror
bc7ffe4720 USB-lightgun: Fix C4305 warning. 2022-12-23 14:18:16 +01:00
lightningterror
29f0090417 Frontend-ogl: Fix Wunused-variable warning. 2022-12-23 14:18:16 +01:00
Connor McLaughlin
509be0b3f8 MemorySettingsInterface: Add {Set,Get}KeyValueList 2022-12-23 07:24:32 +01:00
Connor McLaughlin
b1b3f0dbac GS/HW: Reuse texture for RT copy in DX12/GL/Vulkan
Fixes VRAM usage blowing out with high blending.
2022-12-22 12:07:18 +01:00
Connor McLaughlin
269d3d22b5 Config: Fix McdCompressNTFS not getting set in Qt 2022-12-22 10:43:56 +01:00
Stuart Kenny
78c05b263f USB: Power curve option for wheel steering axis. 2022-12-22 10:41:49 +01:00
lightningterror
a0b6290a4d GameDB: Fix empty could not find serial and searching for serial logs.
Fixes the logs from pasting when the size of the serial is 0 which is invalid.

Update GameDatabase.cpp
2022-12-22 10:27:00 +01:00
Connor McLaughlin
059ce3b7f0 3rdparty: Remove baseclasses 2022-12-22 04:27:30 +00:00
Connor McLaughlin
699c3d80b7 GS: Add video dumping via ffmpeg 2022-12-22 04:27:30 +00:00
Connor McLaughlin
e5009398e0 3rdparty: Add ffmpeg headers 2022-12-22 04:27:30 +00:00
Connor McLaughlin
899eef18ec Common: Add DynamicLibrary 2022-12-22 04:27:30 +00:00
lightningterror
3210f24293 GS-d3d12: Fix macro redefinition error in fxaa shader. 2022-12-22 04:27:20 +00:00
Ty Lamontagne
cc391e1a9e CDVD: Warn the user when a selected game image is on a removable drive. 2022-12-22 04:27:09 +00:00
Ty Lamontagne
70982f6969 README: Use the new API from our badge provider
See: https://github.com/badges/shields/issues/8671
2022-12-21 20:55:11 +00:00
Stenzek
2abbda924b x86/iR5900: Ignore double jr/jalr branches like others 2022-12-21 09:32:48 +00:00
arcum42
b3179f75f4 build: remove flag for skipping portaudio, as we no longer use portaudio. 2022-12-21 08:56:07 +00:00
Mrlinkwii
c0934d141f usb: GT Force paddles Fix 2022-12-20 17:54:31 +00:00
JordanTheToaster
1e0b9bb51e GameDB: Add CPU CLUT to Lego Batman
Adds CPU CLUT to fix ghosting on basically everything.
2022-12-20 15:26:34 +00:00
Víctor "IlDucci
9143d47bd2 USB: Adding PAL values for Guncon2. (#7636)
- Adding PAL values for Dino Stalker, Resident Evil Dead Aim, Crisis Zone.
- Minor text cleanup and unified the sorting order.
- Fixing an old mistype on Dead Aim (U)'s serial.
 - Adding additional values from dante3732.
2022-12-20 16:15:04 +01:00
Connor McLaughlin
6df0a315a9 Qt: Ensure game list refresh is cancelled before destroying 2022-12-20 16:14:02 +01:00
Connor McLaughlin
3f4f9ad5f1 Qt: Fix global string list setting not showing in input profiles 2022-12-20 14:59:27 +01:00
Connor McLaughlin
749f225562 FullscreenUI: Use spinboxes for crop 2022-12-20 13:34:40 +01:00
Comfarol
2e065b128a GunCon2: Add screen parameters for more games
PAL versions of Endgame, Vampire Night adjustment, Guncom 2, Virtua Cop
2022-12-20 07:03:16 +01:00
PCSX2 Bot
d60ae20839 PAD: Update to latest controller database. 2022-12-19 17:55:24 +01:00
Comfarol
441b23bce5 GunCon2: Add screen parameters for more games (#7627) 2022-12-19 15:42:35 +00:00
Ziemas
44c01dd73e qusb: missing <cstdint> & <cstddef> include 2022-12-19 15:41:07 +00:00
Ziemas
01ca4e25ae usb-eyetoy: missing <memory> include 2022-12-19 15:41:07 +00:00
Ziemas
3c39a9ab22 StateWrapper: Add missing <array> include 2022-12-19 15:41:07 +00:00
RedDevilus
74808095b9 GameDB: Wild ARMs 3,4,5,F + maintenance
Reduces Hash cache numbers, improving speed in certain areas and reduces GS usage.

An oddity is that it is less effective on 5 and also needs roundsprite half and not Wild arms. I wonder if they made big changes in the engine compared to 3 and 4.

I also fixed the discrepancies between regions (missing fixes probably missed due to having different naming for the Japanese versions)

As well as fixing comments + missing serials
2022-12-19 15:40:42 +00:00
Connor McLaughlin
09f2d4f546 GS/DX12: Fix incorrect sampler being used in utility draws 2022-12-19 15:38:59 +00:00
Stuart Kenny
1480d9ac20 USB: Add deadzone for USB wheel steering axis 2022-12-19 13:41:08 +00:00
lightningterror
c00c125191 Revert "USB: Buzz Button reorder"
This reverts commit 7ac0e38f35.

This was actually wrong, there's a correct way to go about it.
2022-12-19 03:28:43 +01:00
Simonxdd
7ac0e38f35 USB: Buzz Button reorder
reordered Buttons to be more intuitive
2022-12-18 23:52:15 +01:00
Mrlinkwii
59b870d3dc GameDB: Add autoFlush to Syphon Filter - The Omega Strain 2022-12-18 20:26:33 +00:00
Connor McLaughlin
d2dd796cb9 USB: Add missing extra controller bindings for Buzz 2022-12-18 16:24:30 +00:00
JordanTheToaster
ccadf5d09c GameDB: Add missing Energy Airforce entry's
Adds missing entry's for energy airforce
2022-12-18 16:08:46 +00:00
Connor McLaughlin
dbe078c8b3 GunCon2: Add values for TC2/3 PAL
Courtesy of Codeine.
2022-12-18 14:54:21 +01:00
Connor McLaughlin
129bc0819b InputManager: Input subclass needs 3 bits now 2022-12-18 14:54:21 +01:00
Connor McLaughlin
3f5dc4e182 GunCon2: Max value for scale X/Y should be 200 not 100 2022-12-18 14:54:21 +01:00
arcum42
4de0fbe6b0 USB: Don't register the device if the DeviceType is none. 2022-12-18 09:00:25 +00:00
arcum42
c46d316e95 USB: Don't crash and burn if there is no ini file for pcsx2. 2022-12-18 09:00:25 +00:00
TellowKrinkle
8cf430ef7e SDLInputSource: Custom hint support 2022-12-18 08:27:07 +00:00
TellowKrinkle
e2c3a8b1e1 SettingsInterface: Add Key+Value setting support 2022-12-18 08:27:07 +00:00
TellowKrinkle
1b50fb982a LayeredSettingsInterface: Simplify checked unwraps 2022-12-18 08:27:07 +00:00
TellowKrinkle
ff4c741f4b Input:SDL: Add more hints 2022-12-18 08:27:07 +00:00
TellowKrinkle
1a015089ed wxSettingsInterface: Formatting 2022-12-18 08:27:07 +00:00
TellowKrinkle
ef70aa410e Updater: Properly display error messages 2022-12-18 07:56:03 +00:00
TellowKrinkle
636e0de5aa Updater: Disable updater for tags that don't look like official releases 2022-12-18 07:56:03 +00:00
TellowKrinkle
8925da94e1 Updater: MacOS support 2022-12-18 07:56:03 +00:00
TellowKrinkle
d7ef8a48fe Updater: Use ifdef for multi isa check
if worked fine but it really should be ifdef
2022-12-18 07:56:03 +00:00
TellowKrinkle
bf32cdd683 Updater: Formatting 2022-12-18 07:56:03 +00:00
Connor McLaughlin
6b3a8066e3 cmake: Remove PulseAudio dependency
Also no longer needed.
2022-12-18 04:24:04 +00:00
Connor McLaughlin
fddef65a58 3rdparty: Remove libsamplerate
Since we're using cubeb for USB audio emulation, libsamplerate is no
longer needed as cubeb has its own resampler.
2022-12-18 04:24:04 +00:00
Connor McLaughlin
9388c483ec InputManager: Support for inverted bindings (i.e. pedals) 2022-12-18 03:47:00 +00:00
Connor McLaughlin
7cbede9190 USB: Remove IO vector for packets
It was unnecessary as our packets were always contiguous, and also GPL
instead of LGPL.
2022-12-18 03:47:00 +00:00
Connor McLaughlin
fc14b8f0da USB: Move to Qt (with *significant* refactoring) 2022-12-18 03:47:00 +00:00
Connor McLaughlin
4ebb5a87b2 SDLInputSource: Support joysticks as well as controllers 2022-12-18 03:47:00 +00:00
Connor McLaughlin
8dba6a186f Config: Add dynamic options to SettingInfo 2022-12-18 03:47:00 +00:00
Connor McLaughlin
b1ff979171 Misc: Add StateWrapper
Eventually we'll move save states over to it..
2022-12-18 03:47:00 +00:00
Connor McLaughlin
ebeb88d425 Common: Add HeapArray 2022-12-18 03:47:00 +00:00
Connor McLaughlin
d7c7aa2215 InputManager: Move GenericInputBinding to core 2022-12-18 03:47:00 +00:00
Connor McLaughlin
6f407b2080 PAD: Add bind index to InputBindingInfo 2022-12-18 03:47:00 +00:00
Connor McLaughlin
59e10bcac6 PAD: Move input-related stuff out 2022-12-18 03:47:00 +00:00
Connor McLaughlin
256f7b9b0f OpenGLHostDisplay: Fix incorrect EndQuery() on shutdown 2022-12-17 11:40:06 +01:00
Connor McLaughlin
f2ca07033c GS/OpenGL: Fix texture uploads in big picture mode 2022-12-17 11:40:06 +01:00
lightningterror
e233f1dded GS-ogl: Remove extra DSA log.
There is already a log that checks the extension itself.
2022-12-17 02:49:29 +01:00
lightningterror
07c09f255d GS: Move osd log for unsupported cas in Renderer code. 2022-12-16 18:32:57 +01:00
lightningterror
774d0326c7 GS-d3d11: Fix dx11 bad shader/crashing on dx10 gpus.
CAS requires feature level 11.0.
2022-12-16 18:32:57 +01:00
Connor McLaughlin
ce412686b9 VMManager: Better separate shutdown and close for SPU2 and GS 2022-12-16 11:51:26 +00:00
Connor McLaughlin
dfcf9fa6aa ImGuiManager: Log OSD messages when they're added 2022-12-16 11:15:42 +00:00
Connor McLaughlin
6a548440ea D3D12/Context: Don't assert-fail when D3D12 is unavailable 2022-12-16 11:11:36 +00:00
Connor McLaughlin
eba2273cd1 GS/OpenGL: Cleanups and GLES support 2022-12-16 11:11:15 +00:00
lightningterror
3f1fb1fc3c GS-d3d12: Fix command buffer log. 2022-12-16 11:34:17 +01:00
lightningterror
35cbfb3fb0 wx: Fix console warnings for no longer used hotkeys.
Fixes Kbd Accelerator warnings on pcsx2 console.
2022-12-16 11:19:19 +01:00
RedDevilus
6bf8f43ab1 GameDB: Black line removal K-1 World Grand Prix
Align Sprite needed, surprised this one wasn't discovered before.
2022-12-16 10:05:36 +00:00
TellowKrinkle
3204b98aaf microVU: Fix mVUcustomSearch
Apparently NOT doesn't set flags
2022-12-16 08:18:49 +00:00
refractionpcsx2
f29c2a5805 GameDB: Add upscaling fix for Violet no Atelier 2022-12-15 10:04:48 +00:00
Connor McLaughlin
facbfa479b Qt: Fix graphics settings opening to replacement tab 2022-12-14 12:50:30 +01:00
refractionpcsx2
555b8efcad GSRunner: Fix compilation 2022-12-13 20:57:55 +00:00
Mrlinkwii
0e268864e2 GameDB : add EE Nearest Rounding to Blood Omen 2 2022-12-13 19:10:29 +00:00
refractionpcsx2
a7687947e6 GS: Fix crash if FXAA/Shadeboost enabled with Bilinear Sharp 2022-12-13 01:21:29 +00:00
PCSX2 Bot
8254ff078e PAD: Update to latest controller database. 2022-12-12 23:53:55 +01:00
refractionpcsx2
f8d90d68a3 GameDB: Add mipmapping fixes for Monster Attack/Chikyuu Boueigun 2022-12-12 20:49:03 +00:00
Connor McLaughlin
60fe05bc63 Qt: Fix crash opening ELF game properties
Introduced in 9da8e9280f
2022-12-12 14:46:49 +00:00
Connor McLaughlin
fa2db10e44 GSRunner: Kick screenshots on the GS thread
Instead of from the "CPU" thread.
2022-12-12 14:34:22 +00:00
Connor McLaughlin
06081ca18b GSDumpReplayer: Fix frame advancing
It would always advance by two frames before.
2022-12-12 14:34:22 +00:00
Connor McLaughlin
34fad0bf98 GS: Ensure screenshots are saved before shutting down 2022-12-12 14:34:22 +00:00
AKuHAK
78ad2cfb88 CDVD: set default region data for PStwo nvram, set iLink ID checksum for bios v1.70 and up 2022-12-12 13:38:42 +00:00
Connor McLaughlin
9da8e9280f Qt: Add disc path option for ELF game list entries 2022-12-12 13:35:37 +00:00
IlDucci
8ac0bd452e GameDB: PAL localized names fixes
What began as a proofread/revision of all PAL-S discs ended up touching a bit more than I thought, adding the proper names for also other French/Italian/German exclusive versions.

Summary of changes:
 - Verified EVERY PAL-S disc's name and uppercasing following whatever is written on the cover's side.
 - Added the proper translations for French/German/Italian versions of the discs I have changed in their Spanish equivalents. For these cases, I first took the name from Wikipedia and then verified it by searching good photos of the cover sides on eBay. I was able to double check the wordings and accents (I'm looking at you, German Wikipedia and the Lord of The Rings games...), but not the actual uppercasing for all of these versions, so some of those have the uppercasing from Wikipedia.
- When I checked Terminator 3 - Rise of the Machines's Spanish version, I found out that the disc seems to be Italian/Spanish, so I changed that accordingly. Reference: https://www.ebay.es/itm/192542047505?hash=item2cd4667d11:g:420AAOSwJX5f9EXg&amdata=enc%3AAQAHAAAA4EfM99%2Bn1tQrgxNjriGyyACKNUHzF1eA2G3W4Ig9NuggC280vKaD5O0lG8xWUDOAS6vaXepjpLFpv0REdj8r5lGdiIUs4OFD6s65%2FH0vSC%2Bb7X%2F%2BmsfEyUGhuvJEXEFQC96lDHkyyOqkQabmyM%2Bj881BRmGiUzDorYRZWnHhAOEDWSmErI8oyK%2F0U5eCOF3vPF8bDZaFO54eJ7VjO0UcDmniSvyWUq7lOIiFhEgFeGeZIKIW%2BLPcQMGGZ7oUT5AmNis2aluj2Wg6rOSAQaie1fe7zf6%2FkJ5Db%2BDrfB6vsp31%7Ctkp%3ABk9SR_bDyeOgYQ
 - I've removed a mistype for Over the Hedge's Spanish version, as it was duped: I do not know what SLES-53897 contains, but the actual game seems to be SLES-53987.
2022-12-12 12:22:53 +00:00
Connor McLaughlin
98038201b3 GS: Always allocate wrapped local memory
Simplifies things since we don't need to care about <Win10 support now.

Also gets rid of vmalloc() in favor of the common routines.
2022-12-12 11:54:25 +00:00
JordanTheToaster
62b1688856 GameDB: Game and name fixes
Fixes white lines in Drakengard using merge sprite and fixes the name of the Spanish monsters inc scare island and Buzz!.
2022-12-12 09:32:20 +00:00
refractionpcsx2
2dd9741102 GameDB: Remove wrapgsmem entries from gamedb 2022-12-12 09:31:26 +00:00
refractionpcsx2
6d5c05fba3 GS: Enable memory wrapping always 2022-12-12 09:31:26 +00:00
Connor McLaughlin
d93b49cc4f GS: Use point sampling for shadeboost
DX12/Vulkan already did, but DX11/GL used linear.
2022-12-12 09:31:11 +00:00
Connor McLaughlin
6ccb55d6f7 GS: Remove additional copy in FXAA/ShadeBoost 2022-12-12 09:31:11 +00:00
Connor McLaughlin
a1fb735fde GS/DX12: Ensure utility root signature is set before constants
Fixes a validation error when using shade boost.
2022-12-12 09:31:11 +00:00
Connor McLaughlin
066cf42338 GS: Compute luminance in shader for FXAA
Fixes FXAA being broken after b706c25b68.

Will be slightly difference since this is using the BT.709 coefficients
instead of CCIR 601 - but it matches the non-gather codepath now.
2022-12-12 09:31:11 +00:00
KrossX
5c952fbbd6 GS: Preserve deinterlacing render target when Shadeboost or FXAA are
enabled.
2022-12-11 19:07:38 +00:00
escape209
60b92ba775 Qt: Fix being able to access hidden tabs in Graphics menu 2022-12-11 16:02:55 +01:00
refractionpcsx2
1242f6c942 GS-SW: Don't anti-blur frame rect when same source and not anti-bluring 2022-12-11 06:41:48 +00:00
Connor McLaughlin
1920bff007 x86/iR5900: Fix msub.s/madd.s when ACC isn't live
Don't read EEREC_nnn without checking the process/valid bit first.
2022-12-11 05:43:49 +00:00
Connor McLaughlin
05c12e2505 x86/iR5900: Don't flush regcache for store logging
Makes it a bit easier to debug register cache issues.
2022-12-11 05:43:49 +00:00
Connor McLaughlin
354951f1d6 GS: Add internal resolution screenshot option 2022-12-11 03:00:49 +00:00
Connor McLaughlin
a67d3e9aee GS: Remove Zoom and Offsets
Crop is far superior since it operates at pixel increments, and lets
you control all four edges independently.
2022-12-11 03:00:49 +00:00
Connor McLaughlin
b706c25b68 GS: Change transparency shader to output full alpha 2022-12-11 03:00:49 +00:00
Mrlinkwii
4dbe17eaf9 GameDB: add VUclamping to 'NHL 2004' 2022-12-11 00:30:58 +00:00
TellowKrinkle
a4b598aa15 Updater: Preserve non-standard exe names on update 2022-12-10 20:06:05 +00:00
TellowKrinkle
05a9a71f4a Updater: Support multi-isa switchover 2022-12-10 20:06:05 +00:00
Mrlinkwii
9b2caa6fdd GameDB : add fixes to 'Conspiracy - Weapons of Mass Destruction' 2022-12-08 18:32:09 +00:00
lightningterror
bebb748546 wx: Rename some options to match recent Qt changes.
TV Shader drop down list:
None -> None (Default)

Sharpening drop down list:
Disabled -> None (Default)

Renderer Automatic -> Automatic (Default)
2022-12-08 19:18:20 +01:00
lightningterror
b509a849a1 Qt: Add tooltips to Audio settings.
Only option name and default setting, no actual tooltip.
2022-12-08 19:18:20 +01:00
lightningterror
20602650c4 FullscreenUI: Rename some options.
TV Shader drop down list:
None -> None (Default)

Sharpening drop down list:
Disabled -> None (Default)

Renderer Automatic -> Automatic (Default)
2022-12-08 19:18:20 +01:00
lightningterror
a2d0b8b452 Qt: Add tooltips to Advanced settings. 2022-12-08 19:18:20 +01:00
lightningterror
1fa7526036 Qt: Properly disable Skipdraw global on release builds. 2022-12-08 19:18:20 +01:00
lightningterror
1033726d65 Qt: Rename some options.
TV Shader drop down list:
None -> None (Default)

Sharpening drop down list:
Disabled -> None (Default)

Renderer Automatic -> Automatic (Default)
2022-12-08 19:18:20 +01:00
lightningterror
e5c3f82dd9 Qt: Add tooltips to Graphics settings.
Most of them are only default settings for the options.
2022-12-08 19:18:20 +01:00
lightningterror
2c21dddea9 Qt: Add tooltips to Interface settings.
Tooltips itself are empty, just add the default checked value.
2022-12-08 19:18:20 +01:00
RedDevilus
208812347f Qt: Resizes + better tooltips + Savestate warning
Bigger tooltip window
Controllers button shows up correctly at different DPI percentages
Rename some options
2022-12-08 16:06:31 +00:00
Mrlinkwii
8c8a8f9994 GameDB: add missing Arcana Heart 2 serial 2022-12-08 16:05:05 +00:00
Connor McLaughlin
77e9938f0f GS: Manually throttle fullscreen UI rendering
Fixes rendering at thousands of FPS when pausing if FSUI is active.

Avoids flickering when recreating swap chain in vulkan on menu open,
because we're no longer doing it.
2022-12-08 09:36:41 +00:00
Connor McLaughlin
aea6a9f534 Common: Add Threading::SleepUntil() 2022-12-08 09:36:41 +00:00
TellowKrinkle
a346cff472 CMake: Fix issues with linkers failing on Linux 2022-12-07 22:31:33 -06:00
Connor McLaughlin
1b3c3efcd5 Achievements: Add option to disable notifications 2022-12-07 00:25:13 +00:00
Connor McLaughlin
898055a3c2 GS/HW: Don't consider custom textures in hash cache overflow
Prevents hash cache from being disabled due to a large number of custom
textures. The VRAM usage from the custom textures will still be shown in
the OSD.
2022-12-07 00:24:51 +00:00
JordanTheToaster
f2030d9957 GameDB: A few game fixes and tweaks
HPO Normal causes really bad glitching on the floor in KH2 round sprite breaks light bloom in Price of Persia WW and WRC Rally Evolved needs round sprite half to fix misaligned text.
2022-12-06 16:36:35 +00:00
Connor McLaughlin
a5f323e4e3 GS: Add missing initialization of m_skipped_duplicate_frames 2022-12-06 13:04:12 +00:00
lightningterror
bdb1fd517b gui-wx: Fix OsdShowFrameTimes default config. 2022-12-05 23:00:33 +01:00
PCSX2 Bot
6ce75453fe PAD: Update to latest controller database. 2022-12-05 22:35:13 +01:00
lightningterror
80aed98e97 Qt: Add tooltips to memcard checkbox options. 2022-12-05 06:49:38 +01:00
Connor McLaughlin
7e939b7535 SaveState: Bump version
[SAVEVERSION+] 44e69a9 changed the size of the microVU state struct, which is saved
(to resume incomplete micros), without bumping the version.
2022-12-05 04:07:15 +01:00
JordanTheToaster
57f0ebbff9 GameDB: Add comment for Mipmapping on P3 FES
Adds a comment to the game fix on P3 Fes to mention the flashing windows it fixes.
2022-12-04 23:42:25 +00:00
lightningterror
a426df9c65 Qt: Correct bilinear default option tooltip.
Close #7538
2022-12-04 23:10:09 +01:00
Connor McLaughlin
2584835176 CMake: Drop SPU2X_PULSEAUDIO define 2022-12-04 20:56:48 +00:00
refractionpcsx2
40cb41399f VU: Correct XGKick timing when using XGKickSync 2022-12-04 19:44:15 +00:00
Mrlinkwii
eedea5cbf7 GameDB : add AdaptiveBFF to 'K-1 World Grand Prix 2006' and 'Elemental Gerad' 2022-12-04 16:28:39 +00:00
Connor McLaughlin
bd97a7a216 FullscreenUI: Allow unbinding a hotkey/controller with Triangle
Previously this wasn't possible with a controller, only the mouse.

Follow the same convention as other UI options (alternate action =
triangle/Y).
2022-12-04 14:33:23 +00:00
Connor McLaughlin
d1891fc31c Qt: Remove hardware download mode from global settings
Previously it would be disabled, leading to user confusion.
2022-12-04 14:33:00 +00:00
Connor McLaughlin
20193eae36 Qt: Remove dead code from ControllerBindingWidget_Base
This was moved to the settings tab a while back.
2022-12-04 11:37:54 +01:00
Connor McLaughlin
1cb10eb889 FullscreenUI: Don't clear state when switching renderers
Fixes things like the achievement summary not being displayed, or if the
pause menu is never accessed, the popups from showing at all.
2022-12-04 04:27:38 +00:00
Connor McLaughlin
d52352966e InputManager: Add IsInputSourceEnabled 2022-12-04 04:27:38 +00:00
TellowKrinkle
a8382ceb50 GHActions: Switch linux release pipeline to full lto
Missed that last time
2022-12-03 14:42:22 -06:00
TellowKrinkle
d47c9b0773 CMake: Fix LTO_PCSX2_CORE + DISABLE_ADVANCE_SIMD 2022-12-03 14:42:22 -06:00
TellowKrinkle
1a383de5c4 IPU: MultiISA IPU 2022-12-03 00:52:10 -06:00
TellowKrinkle
44e69a9603 microVU: Adjust microRegInfo to match size of mVUCustomSearch 2022-12-03 00:52:10 -06:00
TellowKrinkle
91cba0ec45 microVU: Fix up mVUCustomSearch
Fixes SSE4 version to follow WIN32 x86-64 calling convention (don't clobber xmm6 or xmm7)
Fixes AVX version to properly include fourth ymm register in result
2022-12-03 00:52:10 -06:00
TellowKrinkle
e0a0e0b00c microVU: Choose AVX2/SSE at runtime 2022-12-03 00:52:10 -06:00
TellowKrinkle
22f214c8e1 GHActions: Check multi-isa builds for global constructors 2022-12-03 00:52:10 -06:00
TellowKrinkle
9ff2dd6be1 GHActions:Windows: Enable multi-isa builds in cmake 2022-12-03 00:52:10 -06:00
TellowKrinkle
4e09f903ca GS: MultiISA XXH3 2022-12-03 00:52:10 -06:00
TellowKrinkle
a45f674bc1 GS: Use MultiISA ProcessorFeatures struct for SW codegen 2022-12-03 00:52:10 -06:00
TellowKrinkle
75da9809e9 GS: Single build with all ISAs 2022-12-03 00:52:10 -06:00
TellowKrinkle
561fb7a4be GS: Prepare for separation of multi-isa code 2022-12-03 00:52:10 -06:00
TellowKrinkle
b0da6361cb GS: Mark SW renderer as multi-isa unshared 2022-12-03 00:52:10 -06:00
TellowKrinkle
bc74c9064a GS: Make g_const constant initialized
We never took advantage of the ability to relocate the pointer
2022-12-03 00:52:10 -06:00
TellowKrinkle
66133b8b21 GS: GSVertexTrace Multi-ISA Support 2022-12-03 00:52:10 -06:00
TellowKrinkle
b69c270c31 GS: GSLocalMemory Multi-ISA support 2022-12-03 00:52:10 -06:00
TellowKrinkle
d56e6427a9 GS: Add MultiISA files 2022-12-03 00:52:10 -06:00
TellowKrinkle
0692a9ff51 Core: Use GCC-style defines for sse detection
Much nicer for adding extensions afterwards
2022-12-03 00:52:10 -06:00
Connor McLaughlin
4bf6b1df5e ImGuiOverlays: Add frame time graph 2022-12-03 04:07:31 +00:00
Connor McLaughlin
bb7ab5690c GSRunner: Fix imgui breaking if skip dupe frames is on 2022-12-03 04:07:31 +00:00
TellowKrinkle
c12422b2cd MTGS: Fix spinning when out of space with MTVU off 2022-12-03 02:44:25 +01:00
TellowKrinkle
be6598e224 Threading: DarwinSemaphore.cpp things no longer need to be cancellation points 2022-12-03 02:44:25 +01:00
TellowKrinkle
faf750a544 GS: Use semaphores with a fast userspace path 2022-12-03 02:44:25 +01:00
refractionpcsx2
ab7105ffa0 GameDB: Add fixes for Busin 0: Wizardry Alternative games. Fixes titles. 2022-12-02 20:02:13 +00:00
lightningterror
e4da6829d3 InputRecording: Fix Wunused-private-field warning. 2022-12-02 20:23:25 +01:00
Mrlinkwii
1c1d494913 GameDB: fix naming of Castlevania LoI games (#7516) 2022-12-01 23:54:41 +00:00
TheLastRar
a22b34ed25 DEV9: Use native APIs to check for holes 2022-12-01 21:40:31 +00:00
TheLastRar
31c045fdb5 DEV9: Allow sparse writing to HDD file 2022-12-01 21:40:31 +00:00
TheLastRar
887a1685dd DEV9: Create Sparse files 2022-12-01 21:40:31 +00:00
TellowKrinkle
ec887d5aaf GS:MTL: Clear a few warnings 2022-11-30 18:21:49 -06:00
TellowKrinkle
08f503748e GS:MTL: Use presentDrawable on Ventura and during vsync 2022-11-30 18:21:49 -06:00
TellowKrinkle
656f0f7b16 GS:MTL: Fix spin timer initialization 2022-11-30 18:21:49 -06:00
JordanTheToaster
410378dccd Qt: Tiny UI changes
Just some minor UI changes.
2022-11-29 23:50:18 +00:00
refractionpcsx2
ff22a32a61 CDVD: Escape descriptor read on iso read failure 2022-11-29 20:45:42 +00:00
lightningterror
5cdf0552ac labeler: Remove buildbot.xml 2022-11-29 12:20:01 +01:00
lightningterror
d4cd8442c4 build: Remove buildbot.xml
Was used compiling and distributing builds via Orphis buildbot, no longer needed as we host the builds on our website.
Was also used for mscompile.
2022-11-29 12:20:01 +01:00
lightningterror
b0430af217 build: Remove mscompile.cmd
Outdated, allowed to compile pcsx2 through command prompt.
2022-11-29 12:20:01 +01:00
refractionpcsx2
a6c22731ba GameDB: Add EE clamping for Shinobido - Way of the Ninja 2022-11-29 10:53:51 +00:00
lightningterror
61b562fcaa codacy: Exclude md files. 2022-11-29 09:46:18 +00:00
lightningterror
3d551e384a workflows: Remove external shaders directory from appimage. 2022-11-29 09:46:31 +01:00
lightningterror
4cf9b7adac shaders: Remove external shaders. 2022-11-29 09:46:31 +01:00
lightningterror
f76559b791 GS: Remove external shader support. 2022-11-29 09:46:31 +01:00
lightningterror
ea6d276a46 config: Remove external shader support. 2022-11-29 09:46:31 +01:00
lightningterror
a323145344 gui-wx: Remove external shader support. 2022-11-29 09:46:31 +01:00
lightningterror
26aa7ef09f MemoryCardFile: Fix Wunused-result warnings. 2022-11-29 01:55:22 +01:00
lightningterror
4a5f9df7bf Sio: Fix Wunused-variable warning. 2022-11-29 01:55:22 +01:00
PCSX2 Bot
f2a9c8558b PAD: Update to latest controller database. 2022-11-28 18:22:54 +01:00
Tyler Wilding
07c3b6ad04 input-rec: remove input recording code from wx-related source 2022-11-28 14:25:11 +00:00
JordanTheToaster
8cbdd61f98 GameDB: Fixes for HP OFTF and MLB 2K5
FIxes freezing and stuttering in MLB 2K5 and ghosting and vertical lines in HP OFTF.
2022-11-28 13:57:34 +00:00
lightningterror
276b1b5539 iR3000A: Fix variable is assigned a value that is never used warning.
Codacy.
2022-11-28 01:33:01 +01:00
lightningterror
fbc4a5cac2 PAD: Fix variable is assigned a value that is never used warnings.
Codacy.
2022-11-28 01:33:01 +01:00
lightningterror
8b01fb0bcf USB: Fix variable is assigned a value that is never used warnings.
Codacy.
2022-11-28 01:33:01 +01:00
lightningterror
f565014203 GS-sw: Fix Winconsistent-missing-override warning. 2022-11-28 01:33:01 +01:00
Tyler Wilding
3a048dafab gui/qt: allow the opened recording to be closed 2022-11-27 20:02:29 +00:00
Tyler Wilding
7383bc3f44 input-rec: remove integration from SIO/Counters, fix imgui updating 2022-11-27 20:02:29 +00:00
Tyler Wilding
96d9eadb4b gui/wx: disable input recording on the wxWidgets side 2022-11-27 20:02:29 +00:00
Tyler Wilding
199db12565 input-rec: integrate with new SIO code 2022-11-27 20:02:29 +00:00
Tyler Wilding
f66ea63b7e input-rec: ensure wx code is frozen for PadData files 2022-11-27 20:02:29 +00:00
sonicfind
bed53be218 input-rec: fix captialization of IRFile function names 2022-11-27 20:02:29 +00:00
sonicfind
af1e41681c input-rec: move IRFileHeader & IRSavestate privately into the IRFile class
+ Add getters for the header char array variables. No longer allow direct access to header content outside of the class.
2022-11-27 20:02:29 +00:00
sonicfind
7987430825 input-rec: Always show current GSFrame on any savestate load or reset
Knowing the frame count after either can be very useful, so that should be displayed regardless of the blank screen.
2022-11-27 20:02:29 +00:00
sonicfind
592395d15c input-rec: Set frame count to zero on "reset" 2022-11-27 20:02:29 +00:00
sonicfind
5cd243f2c1 input-rec: disable the "Reset" option when a recording uses a savestate 2022-11-27 20:02:29 +00:00
sonicfind
f699807cae input-rec: updates to bulk read implementation
+ Handles edge cases where the file is too small
+ Minor performance optimizations around reserving vector memory space
+ Simpler file seeking
2022-11-27 20:02:29 +00:00
sonicfind
31b7ec7308 input-rec: recording viewer touchup 2022-11-27 20:02:29 +00:00
sonicfind
5ea882dae3 input-rec: remove excessive returns in ControllerInterrupt 2022-11-27 20:02:29 +00:00
sonicfind
1628237ba7 input-rec: replace u64s with u32
+ Converts g_inputRecordingFile's total frame count to unsigned long to match.
2022-11-27 20:02:29 +00:00
sonicfind
b86241695d input-rec: remove private InputRecordingFile::open()
The code that gets ran by each branch differs enough that just moving them into openNew() & openExisting() is more beneficial. Removes the unnecessary runtime boolean check.
2022-11-27 20:02:29 +00:00
sonicfind
7bab2d197e input-rec: touch up InputRecordingFile.h/.cpp 2022-11-27 20:02:29 +00:00
sonicfind
6288f945cd input-rec: refactor PadData button state control 2022-11-27 20:02:29 +00:00
sonicfind
1356171af5 input-rec : additional m_/s_ variable tags and constexpr placements 2022-11-27 20:02:29 +00:00
Tyler Wilding
409c285f36 input-rec: refresh imgui overlay when recording mode changes while paused 2022-11-27 20:02:29 +00:00
Tyler Wilding
844ff5bb04 input-rec: fix running input recording functions from UI thread 2022-11-27 20:02:29 +00:00
Tyler Wilding
6ae9e7edb5 input-rec: facilitate changing controls immediately for certain edge-cases 2022-11-27 20:02:29 +00:00
Tyler Wilding
a38fbb157d input-rec: necessary renaming on the wx side 2022-11-27 20:02:29 +00:00
Tyler Wilding
b4db00b979 input-rec: display recording related information with imgui 2022-11-27 20:02:29 +00:00
Tyler Wilding
142a1a392f input-rec: wire up changes to the rest of the project 2022-11-27 20:02:29 +00:00
Tyler Wilding
c98b90a4e2 input-rec: cleanup irrelevant input recording controls 2022-11-27 20:02:29 +00:00
Tyler Wilding
c5298cf12d input-rec: refactor main input recording class 2022-11-27 20:02:29 +00:00
Tyler Wilding
9e30fa81de input-rec: refactor and cleanup the file and logging classes 2022-11-27 20:02:29 +00:00
Tyler Wilding
8f5458f3ae input-rec: Add very basic file viewer to assist with debugging 2022-11-27 20:02:29 +00:00
refractionpcsx2
0a8f5e97e4 GS-HW: Update validity when resizing a texture during the draw. 2022-11-27 19:15:59 +00:00
refractionpcsx2
92bec955a8 GS-SW: Revert software clamp changes from large TH/TW PR.
This change didn't need to be done as the th and tw are sized based on the actual sizes anyway, if these are wrong, the software renderer can crash when trying to draw out of bounds, so this needs to stay as it is.
2022-11-27 08:47:46 +00:00
Connor McLaughlin
89c0d95a94 Common: Slim down RedtapeWindows and correct case 2022-11-27 03:45:54 +00:00
xantares
2c88cd7ac0 CMake: Lowercase Winmm for case-sensitive fs
Fix build on mingw from linux
2022-11-26 19:05:58 +00:00
xantares
0440079a24 FileSystem: Use _stat64 routines 2022-11-26 19:05:49 +00:00
xantares
5fbf21c1bd RedtapeWindows: Lowercase includes for linux fs 2022-11-26 19:03:15 +00:00
refractionpcsx2
e4cc0e04e8 GS-DX11: Fix D3D11_BOX parameters (missing "front") 2022-11-26 18:24:12 +00:00
refractionpcsx2
01179c69ec CDVD: Correct DMA timing if sectors are buffered. 2022-11-26 18:03:05 +00:00
Connor McLaughlin
038e22e5db MTGS: Make PresentCurrentFrame() callable from CPU thread
GS thread can use GSPresentCurrentFrame().
2022-11-26 16:32:39 +00:00
Connor McLaughlin
ebeba2ba17 GS/Vulkan: Enable samplerAnisotropy before using 2022-11-26 16:17:20 +00:00
Connor McLaughlin
daebb5753a GS/HW: Fix various issues with texture replacements
- Replacement textures now show in HC usage to give a clearer picture
   of VRAM usage.
 - Fixed crashes when loading compressed and mipmapped DDS textures.
 - Fixed compressed mipmapped textures in Direct3D 12.
 - Fixed GPU crashes in D3D11/D3D12/Vulkan when compressed textures went
   down the last 1x1 mipmap level.
2022-11-26 16:17:20 +00:00
TellowKrinkle
bb2016889a 3rdparty: Update SDL to 2.26.0 2022-11-25 23:47:32 -06:00
EdnessP
470bbc9899 Patches: Add extended PS2rd support; used by OPL (#7381) 2022-11-26 05:07:36 +00:00
refractionpcsx2
527fa587ce CDVD: Don't account for rotation if sectors are buffered 2022-11-26 05:04:49 +00:00
refractionpcsx2
8a22e44f3b GS-TC: Make sure if we have an old frame check bounds of other frame 2022-11-26 05:04:38 +00:00
RedDevilus
ad7736f90d GameDB: Remove blit from PAL being dumb
The gamefix works well for NTSC, but I had added blit to every version of resident evil doing wrong fixes which were meant for Silent Hill 4 and forget this part where it only gives 10 FPS instead of more.
2022-11-26 03:59:00 +00:00
AKuHAK
2ab27ef42a formatter: apply editorconig into various files 2022-11-25 22:41:00 +00:00
TellowKrinkle
314c840293 VIF: Reduce alignment of empty hash buckets
They'll never be in hot codepaths (since they're empty) and memalign with 64-byte alignment is noticeably slower than 16-byte alignment
2022-11-25 20:20:24 +00:00
TellowKrinkle
ee451fe345 Common: Fix slow emulator startup on M1s 2022-11-25 20:20:24 +00:00
JordanTheToaster
50f90aee79 GameDB: Fix incorrect name of SLPM-65140
Fixes an incorrect game name.
2022-11-25 19:51:10 +00:00
Connor McLaughlin
31c02e5915 FullscreenUI: Don't show game fixes unless advanced is enabled 2022-11-25 16:46:26 +00:00
Connor McLaughlin
d08f4df146 ImGuiFullscreen: Fix navigating to root on Linux 2022-11-25 16:46:26 +00:00
JordanTheToaster
e17f592602 GameDB: Set texture preloading to Partial for Espagaluda
Setts texture preloading to partial to almost double the speed of the game because it's stupid and seems to absolutely destroy the HC.
2022-11-25 15:27:46 +00:00
lightningterror
50bb362dc9 GS-hw: Further optimize blending equations.
Allow to run free sw blend with no texture barriers, more speed for all renderers.

CLAMP 1, negative result will be clamped to 0.
Condition 1:
(0  - Cs)*Alpha +  0, (0  - Cd)*Alpha +  0
Condition 2:
Alpha is either As or F higher than 1.0f
(0  - Cd)*Alpha  + Cd, (0  - Cs)*F  + Cs
2022-11-25 15:04:04 +01:00
Mrlinkwii
1d1ee314ca GameDB:Fixing some minor typos 2022-11-25 10:31:31 +00:00
Connor McLaughlin
db8fb7f5a3 AppImage: Don't change current working directory 2022-11-25 10:25:28 +00:00
refractionpcsx2
498fe48255 GS: Combine dirty rects when having matching edges 2022-11-24 11:43:16 +00:00
Connor McLaughlin
2b75f9638d GS/DX12/Vulkan: Handle out-of-VRAM better
Instead of immediately failing the allocation, flush the texture pool,
and execute/wait for the command buffer. This will clear out any
textures which have already been freed, and the storage can be reused
for.
2022-11-24 10:38:53 +00:00
Connor McLaughlin
f159d1de55 GS/TextureCache: Better handle batched tiny moves
e.g. Dark Cloud's menu.

Also prevents an out-of-VRAM situation from crashing.
2022-11-24 10:38:53 +00:00
Connor McLaughlin
eb67c87e20 FullscreenUI: Match settings grouping with Qt 2022-11-24 09:46:49 +00:00
Connor McLaughlin
95953c86ae VMManager: Write unsafe settings to emulog 2022-11-24 09:46:49 +00:00
Connor McLaughlin
f8bd4d7155 Qt: Shuffle some settings around/hide advanced by default 2022-11-24 09:46:49 +00:00
RedDevilus
4d73147121 GameDB: Fixes to multiple games yet again
- Thrillville + Thrillville Off The Rails: Mad TFF / deinterlace 8 to stop shaking the whole game
- Forgotten Realm Demon Stone: Get rid of more blur
- ATV Offroad Fury 3: MTVU disabled which was an odd find to improve FPS
- Crimson Tears: Wild arms + Full Sprite for reducing bloom misalignment + note that Blending TFF might be better especialy when you use Software.
- Final Fantasy X: Texture in Rt for fixing endgame summons like Anima and The Magus Sisters
- No One Lives Forever: Mipmap full + trilinear + full blending needed to fix lighting
2022-11-23 22:02:06 +00:00
lightningterror
0466114f67 gui-wx: Add FidelityFX CAS support.
Add FidelityFX CAS support to wxwidgets.
Rename Texture Filtering of Display to Bilinear filtering.
Remove Debug box.
Misc cleanup.
2022-11-23 22:52:10 +01:00
lightningterror
0a585e00e5 gui-wx: Add default configs for CAS filtering. 2022-11-23 22:52:10 +01:00
JordanTheToaster
5048f1c21b GameDB: Remove Round Sprite from POPSOT
Removes round sprite from prince of persia sands of time as it causes lines to appear in post processing.
2022-11-23 21:27:31 +00:00
icup321
486c823111 GameDB: Fixes for Finding Nemo, Haven: Call of the King, Kinetica
#7396
2022-11-23 19:44:17 +00:00
refractionpcsx2
7e66eb856c GS: Add sharp bilinear post filter
Remove internal screenshot setting, all screenshots are internal (and it wasn't hooked up)
2022-11-23 17:28:54 +00:00
Connor McLaughlin
edb9a5ba3c Qt: Add -testconfig option 2022-11-23 15:55:39 +00:00
Connor McLaughlin
6f354c6c02 Qt: Move post-processing options into its own tab 2022-11-23 11:45:37 +00:00
TellowKrinkle
2fb8ecbf02 GS:MTL: CAS support 2022-11-23 11:45:37 +00:00
Connor McLaughlin
f7c79fe3cc GS: Implement FidelityFX CAS 2022-11-23 11:45:37 +00:00
Connor McLaughlin
5363a90c6b D3D12: Add compute shader support 2022-11-23 11:45:37 +00:00
Connor McLaughlin
d132ddefef GL: Add support for compute shaders 2022-11-23 11:45:37 +00:00
TellowKrinkle
46db4077b8 Common:Vulkan: Add storage descriptors to pool
Needed for CAS
2022-11-23 11:45:37 +00:00
Connor McLaughlin
344d27ea5a Vulkan: Add ComputeShaderPipelineBuilder 2022-11-23 11:45:37 +00:00
TellowKrinkle
2dfb819d35 Resources: ffx_cas.h Metal support 2022-11-23 11:45:37 +00:00
TellowKrinkle
cef8d03d49 Resources: ffx_a MSL support 2022-11-23 11:45:37 +00:00
Connor McLaughlin
4177b090b2 Resources: Add GPUOpen's FidelityFX CAS headers 2022-11-23 11:45:37 +00:00
refractionpcsx2
26075a9520 GS-HW: Remove mistake from old frame PR 2022-11-23 10:27:03 +00:00
JordanTheToaster
76b88ebdbf GameDB: Add fixes for Demon Chaos
Adds auto flush and half pixel offset special texture to fix missing bloom and misaligned bloom and lighting.
2022-11-23 09:24:57 +00:00
TellowKrinkle
bae4a2df7e GS:MTL: Fix mad shader on M1 2022-11-23 00:57:03 -06:00
refractionpcsx2
e8ce1e3445 GS-TC: Only reset age when it's definitely an EE write 2022-11-22 20:00:31 +00:00
AKuHAK
90a4025bcc BiosTools: improve region codes
Region code numbering now matches regions inside CDVD_internal.h
Added region assignment for non-standard romver
Renamed HK region to Asia as 'H' covers not only Hong Kong, but also Korea and Taiwan
2022-11-22 17:19:01 +00:00
Connor McLaughlin
f66797c5cf Qt: Add option to reset play time for games 2022-11-22 17:14:56 +00:00
Connor McLaughlin
bd22d29d58 Host: Make OSD message timing consistent
It was all over the place previously.
2022-11-22 17:14:56 +00:00
Connor McLaughlin
5026dda9ca Qt: Fix Enable Per-Game Settings option 2022-11-22 17:14:56 +00:00
Connor McLaughlin
b30e93389c GS/OpenGL: Remove disable_hw_gl_draw option
I'm not sure what the point of it ever was..
2022-11-22 14:56:57 +00:00
refractionpcsx2
a2a635a141 GS: Favour newer targets unless no match found. No age update on frame. 2022-11-22 10:51:09 +00:00
refractionpcsx2
05dd0831c1 GS: Avoid large clears in HW 2022-11-22 10:51:09 +00:00
refractionpcsx2
db788452bd PAD: increase number of macros per controller from 4 to 16 2022-11-22 10:50:44 +00:00
JordanTheToaster
5c5fdcf14d Qt: Change dump compression to Zstandard
Until XZ stops exploding we should default to Zstandard for dump compression.
2022-11-22 10:50:28 +00:00
RedPanda4552
b96a252a61 Memory Card: Make access denied pop-up actually explain the problem 2022-11-22 00:08:24 +00:00
PCSX2 Bot
793aa7fd7f PAD: Update to latest controller database. 2022-11-21 18:43:37 +01:00
Connor McLaughlin
d0673f9133 Sio: Fix host pointer getting serialized
[SAVEVERSION+] It wasn't saving the FIFO anyway. Sorry for the save
state bump, but it's unavoidable :(
2022-11-21 13:40:01 +00:00
lightningterror
4b4b82bd5f Readme: Mention that win 8.1 was dropped after 1.6 stable. 2022-11-20 22:28:43 +01:00
lightningterror
dda0b6c296 common: Drop windows 8.1 and server 2012 r2 support.
We already require windows 10 (build 1809) with the recent recompiler changes.
2022-11-20 22:28:43 +01:00
refractionpcsx2
e212c611be GS-HW: Expand target on EE write and improve overlap check 2022-11-20 18:51:13 +00:00
refractionpcsx2
a95492f7a0 GS-TC: Only reset age on new Tex in RT targets.
Caused huge GS usage on Urban Reign due to old target.
2022-11-20 18:50:40 +00:00
refractionpcsx2
ff3c22fc2b GS: Allow negative offset on single display 2022-11-20 18:50:21 +00:00
Mrlinkwii
59e8a2dfae GameDB: add fixes to 'Car Racing Challenge' 2022-11-20 18:25:41 +00:00
JordanTheToaster
d44e215e5e GameDB: Add Blit gamefix to Worms 4
Adds Blit gamefix to Worms 4 Mayhem to fix internal FPS detection.
2022-11-20 18:25:17 +00:00
Connor McLaughlin
129fddf07c Qt: Switch to 6.4.0 on Windows 2022-11-20 17:25:55 +00:00
Connor McLaughlin
0dd766cec8 Qt: Work around theme switching issue in 6.4.0
Starting in dark theme then switching to native/light would not restore
the standard palette.
2022-11-20 17:25:55 +00:00
Mrlinkwii
f79b57d0cf Gamedb: add fixes to 'Sega Rally 2006' 2022-11-20 17:22:34 +00:00
refractionpcsx2
226b188eaf WX-UI: Fix deinterlace dropdown. 2022-11-20 16:25:32 +00:00
Connor McLaughlin
8f4e01e004 CI: Change Windows builders to VS2022 2022-11-20 11:35:16 +01:00
JordanTheToaster
d54dab87ef Metal: Fix usage of MAD
Fixes pink or frozen images of the last frame in games when using MAD with Metal.
2022-11-20 00:47:01 -06:00
Connor McLaughlin
ef8e35032e x86/iR5900: Don't swap loadstore delay slots for BC0/BC2 conditions
Swapping the loadstore could affect the condition of the instruction,
leading to incorrect code execution.

Fixes lock up in Oni after intro FMVs.
2022-11-20 04:47:08 +00:00
Connor McLaughlin
599e291824 R5900: Fix disassembling of BC0 instructions 2022-11-20 04:47:08 +00:00
TellowKrinkle
3d8fe01bc6 Input:DInput: Fix build after adding FullAxis support for SDL 2022-11-20 02:40:07 +00:00
TellowKrinkle
a72cecd235 Input: Add FullAxis modifier 2022-11-19 19:16:52 -06:00
TellowKrinkle
02a2e8a7f1 Input:SDL: Support Joystick axes that aren't used in GameController mappings 2022-11-19 19:16:52 -06:00
TellowKrinkle
38c1b031c2 Input:SDL: Allow use of axes and buttons outside the normal range 2022-11-19 19:16:52 -06:00
lightningterror
3ba72e8728 MemoryCardFolder: Fix Wsign-compare warning. 2022-11-19 19:28:52 +01:00
lightningterror
5286b19af5 MultitapProtocol: Fix Wtype-limits warning. 2022-11-19 19:28:52 +01:00
lightningterror
5c104f8e1d common linux: Fix Wunused-variable warning. 2022-11-19 19:28:52 +01:00
lightningterror
0988b08f7a GS interlace: Fix Wreturn-type, Wunused-variable, Wsometimes-uninitialized warnings. 2022-11-19 19:28:52 +01:00
lightningterror
bfcd5c84ca IopHwRead: Fix Wmaybe-uninitialized warning. 2022-11-19 19:28:52 +01:00
lightningterror
93b24f98a6 microVU_Macro: Fix Wunused-variable warning. 2022-11-19 19:28:52 +01:00
lightningterror
32d52cb0dd recVTLB: Fix Wsign-compare warnings. 2022-11-19 19:28:52 +01:00
lightningterror
552d5d8928 iR5900Templates: Fix Wunused-variable warnings. 2022-11-19 19:28:52 +01:00
lightningterror
5b583fefbc MemoryCardProtocol: Fix Wimplicit-fallthrough warnings. 2022-11-19 19:28:52 +01:00
lightningterror
3c4d48f45d SIO: Fix Wunused-variable warning. 2022-11-19 19:28:52 +01:00
lightningterror
f6b8b6cb9b gui-wx: Fix Deinterlace option. 2022-11-19 18:20:28 +01:00
Mrlinkwii
78cf98dcb7 Build.sh : remove refernces to coverity 2022-11-19 16:55:34 +00:00
Mrlinkwii
13e95ad5cb Readme: update Minimum and Recommended specs 2022-11-19 16:55:34 +00:00
Connor McLaughlin
5ab4263c0a MemoryCardFolder: Add missing bounds check to Read() 2022-11-19 16:55:16 +00:00
refractionpcsx2
77ea599e36 GameDB: Add Mipmap Full + Trilinear for Shadow of the Colossus 2022-11-19 07:07:21 +00:00
Connor McLaughlin
6793a84f9b x86/iR5900: Fix compiling with DUMP_BLOCKS 2022-11-19 06:16:44 +00:00
Connor McLaughlin
9ab449dcf3 3rdparty/zydis: Silence static define warning 2022-11-19 06:16:44 +00:00
Connor McLaughlin
c883e9d792 Sio: Only eject memory cards when loading state if changed
[SAVEVERSION+] Regression from #6741.
2022-11-19 06:01:09 +00:00
Connor McLaughlin
0e73bf1e6d SaveState: Only remap changed TLB slots on load 2022-11-19 04:59:10 +00:00
Connor McLaughlin
1ccddb92d4 EE Rec/IOP Rec: Rewrite large portions
- Add fastmem
 - Add delay slot swapping
 - Add COP2 sync elision
 - Add block analysis and use analysis
 - Add GPR register caching and renaming
2022-11-19 04:59:10 +00:00
Connor McLaughlin
56501e0811 x86emitter: Fix up emitting of xmm -> ptr64 operands 2022-11-19 04:59:10 +00:00
Connor McLaughlin
3d6a550f23 x86Emitter: Add 8-bit variants for spl..r15b
Also fixes PINSR/PEXTR.
2022-11-19 04:59:10 +00:00
Connor McLaughlin
8de4e190dc EERec: Disable large block splitting 2022-11-19 04:59:10 +00:00
Connor McLaughlin
d17ceec14b EERec: Add block dumping 2022-11-19 04:59:10 +00:00
Connor McLaughlin
741ddaf384 3rdparty: Add zydis 2022-11-19 04:59:10 +00:00
Connor McLaughlin
76b03a8a88 VSProps: Use MultiToolTask mode
Much better parallelism, due to our source files being spread out across
multiple folders.

pcsx2core build time on a Ryzen 3900X with 12C/24T:

Before: Time Elapsed 00:00:26.74
After: Time Elapsed 00:01:03.21
2022-11-19 04:58:23 +00:00
Connor McLaughlin
fd194124a9 x86: Move cycle/writeback fields to CPU structs
[SAVEVERSION+] Potentially better locality, keeps everything we're
accessing from the rec together.
2022-11-19 03:54:02 +00:00
RedDevilus
ff7053c566 GameDB: Fixes multiple games for Xth time and more
Bakugan: Deinterlace adaptive tff due to the game attempting to deinterlace FMVs but PCSX2 going nuts
Driv3r: Fixes janky coloured cars with cpuCLUT
Megaman X8: Deinterlace blending tff due to either looking like missing half the text or flicker as how the game handles empty and subtitles
Tales of Destiny 1: Texture preload partial for better performance in certain areas
2022-11-19 03:00:17 +00:00
refractionpcsx2
be438587c7 mVU: Clean up range function and improve merging. Slim down cmpProg. 2022-11-19 02:35:25 +00:00
RedPanda4552
1146175648 SIO: Separate SIO2 from SIO0, reimplement memcard protocol
[SAVEVERSION+] Fixes memcard issues in MGS3, Shining Force EXA, and others which do 4 sector reads
2022-11-19 02:08:13 +00:00
lightningterror
3f99d1d3cc GameDB: Change mipmap to full and add trilinear ps2 for Die Hard - Vendetta.
Further improves ground rendering.
Improves #5127
2022-11-19 01:45:08 +01:00
lightningterror
af58273c4c GameDB: Add basic mipmap to Winning Post 4 Maximum 2001 and Winning Post 5 Maximum 2002.
Improves ground textures rendering.
Close #4923
2022-11-19 01:28:57 +01:00
sideprojectslab
93abf66240 GameDB: forced Alpine Racer 3 deinterlacing to Adaptive BFF when Auto 2022-11-18 21:29:37 +00:00
sideprojectslab
6924249bcf GS: Reverted field order in MAD shader updated weave shader to same field order as MAD and merged two Weave shaders into one
GS: corrected refactoring errors in interlace shaders
2022-11-18 21:29:37 +00:00
sideprojectslab
21fa2ee87b GS: Improved MAD compatibility with other graphics settings 2022-11-18 21:29:37 +00:00
sideprojectslab
50861dc5c1 UI/GameDB: fixed issues with MAD integration in UI and GameDB
GameDB: fixed compile error
2022-11-18 21:29:37 +00:00
sideprojectslab
64f6bf52b0 GS: Cleaned up and commented Motiond Adaptive Deinterlacing shader code
GS: fixed compile error in Metal interlace shader
GS fixed more compile errors in Metal interlace shader
GS: Adjusted code indentation in interlace shader for all renderers
2022-11-18 21:29:37 +00:00
sideprojectslab
e9d256aa74 INI: created new deinterlace_mode config setting to force new default to Automatic 2022-11-18 21:29:37 +00:00
sideprojectslab
79b5f2154f GS: added Motion Adaptive Deinterlacing support for Metal renderer 2022-11-18 21:29:37 +00:00
sideprojectslab
0f42eab7a4 UI: Integrated Motion Adaptive Deinterlacing with UI
[SETTINGSVERSION+]
Added entries in the drop-down menu for Adaptive Deinterlacing
Re-arranged deinterlacing mode order in the drop-down menu.
"Auto" mode defaults to MAD.
Adjusted GameDB entries to be compatible with the new order of entries.
Improved Bob description for WX
2022-11-18 21:29:37 +00:00
sideprojectslab
f10e7f4ab7 GS: Implemented Motion Adaptive Deinterlacing for all renderers
implemented FastMAD motion-adaptive deinterlacing for OpenGL renderer, other renderers will crash. FastMAD is replacing blend (either mode) so select blend to activate MAD under the hood

fixed an assert and assessed that one MUST select mode Blend bottom field first to enable MAD

removed forced mode 2, added separate motion thresholds for current field and alternate field motion and optimized MAD for Top-FIeld-First mode

committing kind-of broken status for review

the algorithm works well on most games, but somehow Kingdom Hearts works at half resolution

completely fixed weird artifacts on MAD, I only need to fix a 1-line offset that is causing the top of the screen to flicker

fixed flicker on first line, I still need to fine-tune some coefficients

solved all nastiness by realizing that MAD MUST work on an even resolution, so odd resolutions are rounded up. Now all games I tried look great

made MAD sensitivity adjustable inside GDDevice.h and passed to shaders as a parameters. For this purpose ZrH is now a vec4 to hold more parameters conveniently

ported MAD to DX11 and DX12

removed rounding of texture size to closest multiple of 2 and fized odd number of lines inside the shaders by also passing the vertical resolution as a parameter

improved compatibility of upper buffer offset adjustment for odd resolutions

added Vulkan support
2022-11-18 21:29:37 +00:00
Ty Lamontagne
e1f7fe5700 GIF: Fix MFIFO DMAStalls. Fix InstantDMA with PSE bit set 2022-11-18 01:55:43 +00:00
JordanTheToaster
ebfd656c54 GameDB: Add fixes for Shadow Hearts Covenant
Adds Round Sprite Full and Auto Flush to Shadow Hearts Covenant to make the shadow monsters appear and fix garbage in the UI.
2022-11-18 01:55:31 +00:00
refractionpcsx2
630ebb0583 GS: Expand "progressive" analogue games to full height, in case they lie 2022-11-18 01:32:09 +00:00
JordanTheToaster
748dcbd989 ImGuiOverlays: Add missing fixes
Adds the last of the fixes to the overlay
2022-11-18 00:38:14 +00:00
Mrlinkwii
c0b4ceef0b GameDB: add InstantDMAHack to King of Colosseum - Red/Green 2022-11-17 22:20:03 +00:00
refractionpcsx2
8ba768ecec GIF: Fix reset functionality to properly abort the current packet 2022-11-17 11:18:48 +00:00
refractionpcsx2
cfb5e203b3 GS-HW: Increase channel shuffle sizes to resolution or higher.
GS-TC: Fix small bug which could end up with an invalidation being skipped.
2022-11-17 11:18:24 +00:00
lightningterror
433e42e3e4 GameDB: Fix bad formatting failing ci. 2022-11-17 02:34:05 +01:00
lightningterror
1519a6b1da GameDB: Add full mipmap + trilinear ps2 to Virtua Tennis 2.
Game requires full mipmap + trilinear ps2 to match ground to sw renderers.
Close #5961
2022-11-17 02:13:34 +01:00
RedDevilus
87abacc632 GameDB: Fix multiple games + maintenance
- Area 51: Half Pixel Normal vertex for lighting and other places
- Shrek 2: Basic mipmapping which kinda half fixes the sun missing
- Galaxy Angel II: Normal vertex which reduces misalignment
- Forgotten Realms - Demon Stone: Clamping Mode extra + preserve which will solve the occasional SPS + missing demo entry.
- Spyro Dawn of dragon: SW clut + sprite which doesn't make you vomit from the overbloomification and looks similar to the software renderer
- Castlevania Curse of darkness half sprite which will enlarge the font similar to software renderer + some missing fixes that were available on the Europe and America versions but not Japanese.
- Drakengard 1 + 2 (Also know as Drag-on Dragoon) : Partial (no hashcache) to avoid slow transitions and other areas. Adds missing Japanese Drakengard 1
- Urban reign: Partial texture preloading to fix performance issues in the gameplay
- Onimusha Warlord: Partial preloading to fix performance issues
- Sniper Elite: Fix sky lighting
- Maintenance that add spaces in the titles for Disc1of1 to Disc 1 of 1 and more...
2022-11-16 20:35:37 +00:00
RedDevilus
e5bc1defa2 Documentation: VSCode integration addendum + y2022
- GameIndex.md updated with the year 2022.
- GameIndex.pdf updated with VSCode integration for yaml.
2022-11-15 18:12:49 +01:00
lightningterror
c975a78ed7 GameDB: Add autoflush to Jak X combat racing and add comments to the fixes. 2022-11-15 17:39:56 +01:00
lightningterror
4537342ec2 FullscreenUI: Fix Wunused-variable warnings. 2022-11-15 16:47:51 +01:00
lightningterror
ee80bca994 GS: Fix Wunused-variable warnings. 2022-11-15 13:03:51 +01:00
lightningterror
55c1012d1c GS: Fix Wsign-compare warnings. 2022-11-15 13:03:51 +01:00
Tyler Wilding
df5a7d4fb1 ci/lint: add InstantDMAHack to valid list of game fixes 2022-11-15 12:15:42 +01:00
Tyler Wilding
fba0e5932f ci: use the json schema to validate the GameDB 2022-11-15 12:15:42 +01:00
Tyler Wilding
28c2c8d179 docs: update relevant documentation 2022-11-15 12:15:42 +01:00
Tyler Wilding
d1459650e1 ci/lint: remove GameDB python lint script, replace with json-schema 2022-11-15 12:15:42 +01:00
Ty Lamontagne
6138ac009f Core: Sign extend the interpreter impl of MFC0 2022-11-15 08:50:00 +00:00
PCSX2 Bot
aa4a9cdad7 PAD: Update to latest controller database. 2022-11-14 17:06:34 +01:00
Connor McLaughlin
a7af3cd483 x86/microVU: Write VIs from CTC2 as 16 bits
The micro recompilers only write as 16 bit, so in case the value in the
register was greater than 0xFFFF, we don't want to store higher bits
that get stuck.
2022-11-13 16:15:36 +00:00
Connor McLaughlin
a12accf3fa x86/iR5900: Align LQC2/SQC2 to 16 bytes
LQ/SQ were already 16 byte aligned.
2022-11-13 16:15:36 +00:00
David Scholberg
ffe669137b Qt: fix inhibit screensaver on Linux (X11)
This change fixes https://github.com/PCSX2/pcsx2/issues/7367.
xdg-screensaver expects the given window ID to be that of the top level
window.
2022-11-13 09:29:41 +00:00
refractionpcsx2
a874c5455d GS-TC: Reset age on Host->Local dirty textures 2022-11-12 21:47:36 +00:00
refractionpcsx2
d70b7e5bc7 GS-TC: Don't shufflemove data which isn't in the texture.
Allowing this could expand the texture to just be black, causing bad copies.
2022-11-12 21:46:44 +00:00
refractionpcsx2
8e80662bb0 GS-TC: Invalidate videomem still if surface becomes invalid 2022-11-12 21:46:34 +00:00
refractionpcsx2
dbd7d2e290 GS: Correct the height on reversed local->local transfers
Also avoid messing around in reverse if possible
2022-11-12 21:46:13 +00:00
Silent
93d948ac57 GameDB: Added HPO Special to The Getaway and The Getaway: Black Monday 2022-11-10 10:30:10 +00:00
Silent
c69c7ce59c GS/TextureCache: Add a CRC hack in InvalidateVideoMemType for Getaway games 2022-11-10 10:30:10 +00:00
refractionpcsx2
79c79b06ca GS: Don't add overscan to offsets when looking up output texture.
This can cause mis-detection when Show Overscan is enabled, making it miss the target.
2022-11-10 09:28:45 +00:00
RedDevilus
b922667fbd GameDB: Multiple fixes for games
V-Rally: Fixes fog and lights on car
Okami: Adds missing Korean entry + Full Round for misaligment
Colosseum: Road to Freedom (Or Gladiator in Japan): Fixes the sunlight in the window in the selection screen
Chronicles of Narnia, Prince Caspian (2nd game in series): Fixes broken upscaling in different areas such as screen and new game
Gakuen Alice: Reduces vertical line issue in textbox
Monster Lab: Fix slow speed due to high hash cache usage
Naruto Shippuden - Ultimate Ninja 4
Dragon Ball Z Tenkaichi 1 + 3: SW clut instead of CRC hack
Deletes double punctation in a comment and changed 3d to 3D. Rename all Dragon Ball games correctly with spaces and uppercases. Fix apostrophes on game serial.
2022-11-10 09:28:14 +00:00
refractionpcsx2
9bfe89f115 CDVD: Adjust rotational delay after seek behaviour 2022-11-09 22:49:10 +00:00
Ty Lamontagne
4975f7f098 Profiling: Fix QT builds where USE_VTUNE is true 2022-11-09 19:00:11 +00:00
JordanTheToaster
4db49038c8 GameDB: Add VU Clamp Extra+Sign to Lego Starwars
Adds VU Clamp Extra+Sign to Lego Starwars to fix bad coordinate spam.
2022-11-09 18:45:19 +00:00
JordanTheToaster
4cc7ec5a02 GameDB: Add CPU CLUT to Bionicle Heroes
Adds CPU CLUT Normal to Bionicle Heroes to fix ghosting.
2022-11-09 18:03:02 +00:00
JordanTheToaster
930de813f7 GameDB: Add CPU CLUT to Lego Starwars 2
Adds CPU CLUT normal to Lego Starwars 2 to fix ghosting.
2022-11-09 12:33:32 +00:00
refractionpcsx2
e9ec9e79ac GS-HW: Assume points of right size are paletted, regardless of Z writes.
Adds Clannad CLUT setting in the gamedb.
2022-11-09 10:24:47 +00:00
Tyler Wilding
212b2aea16 releases: allow publishing discord announcements to multiple webhooks 2022-11-08 17:44:00 +00:00
JordanTheToaster
06a0dc374f GameDB: Set texture preloading to Partial for Keihin Keikyu Train Simulator
Set texture preloading to Partial for Keihin Keikyu Train Simulator
2022-11-08 12:12:38 +00:00
Mrlinkwii
1cc63412ec GameDB : add upscaling fixes to 'Headhunter - Redemption'
GameDB : add upscaling fixes to 'Headhunter - Redemption'
2022-11-08 11:05:33 +00:00
refractionpcsx2
39c35d4430 Updater: Check for [SAVEVERSION+] etc before clearing out most of the message. 2022-11-07 21:34:02 +00:00
PCSX2 Bot
10699b7c09 PAD: Update to latest controller database. 2022-11-07 21:24:06 +01:00
Risae
25c807965c GameDB: Disable gsHWFixes for Growlanser 5 & 6 2022-11-07 19:11:07 +00:00
refractionpcsx2
5321ca913e EE: Implement Instant DMA hack for some cache problematic games
Bump savestate version for new dma stall flag

[SAVEVERSION+]
2022-11-07 18:56:04 +00:00
refractionpcsx2
b8c7ac4529 GS: On Local->Local transfer wrap around 2048 2022-11-07 09:46:27 +00:00
MomosuWarosu
5b98c0b7ff GameDB: Add Wild Arms Hack to Kaido Battle games, and RBC1GP. 2022-11-07 09:46:11 +00:00
refractionpcsx2
7ed4e3ae35 GS-HW: Further restrict CLUT heuristics.
Reduces readbacks in Burnout by like 75%
2022-11-06 17:02:59 +00:00
refractionpcsx2
250b266321 GS: Pass original height for feedback lookup. 2022-11-05 18:18:01 +00:00
refractionpcsx2
682797c54b GameDB: Re-remove Half-Pixel Offset from Mercenaries.
Left commented out so we don't make the same mistake again.
2022-11-05 14:46:10 +00:00
refractionpcsx2
2221a12950 GS-HW: GetOutput loop on 2048 and restrict height. 2022-11-05 04:57:44 +00:00
refractionpcsx2
e2cdcd094a GameDB: Add upscaling fixes for many games. 2022-11-05 03:45:31 +00:00
refractionpcsx2
71b0d9cc38 GameDB: Add COP2 patch for Donald Duck Goin' Quackers 2022-11-04 23:12:25 +00:00
refractionpcsx2
808fadd061 GameDB: Add COP2 patch for Donald Duck - Quack Attack 2022-11-04 19:44:53 +00:00
Mrlinkwii
760d349af1 GameDB:Fix minor typos 2022-11-04 19:44:41 +00:00
refractionpcsx2
6b2a20231d SPU: On config change don't reinit sample rate.
Also fix up some other samplerate related things and turn the soundtouch pointer in to a unique pointer.
2022-11-04 16:45:26 +00:00
refractionpcsx2
975aac5a00 GS-HW: Further restrict CLUT width to 8, 16, 32, 64 2022-11-04 16:45:07 +00:00
refractionpcsx2
f6909d0ea9 GameDB: Add autoflush to Tales of the Abyss. Fixes lighting post 2022-11-04 02:14:57 +00:00
Mrlinkwii
88ee6659b2 GameDB: some minor corrections 2022-11-03 23:35:14 +00:00
dependabot[bot]
3e878f5124 Bump mathieudutour/github-tag-action from 6.0 to 6.1
Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) from 6.0 to 6.1.
- [Release notes](https://github.com/mathieudutour/github-tag-action/releases)
- [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.0...v6.1)

---
updated-dependencies:
- dependency-name: mathieudutour/github-tag-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-03 21:50:57 +00:00
Mrlinkwii
c32c4c1e46 GameDB: disable MTVU & instantVU for K1 series games 2022-11-03 19:08:15 +00:00
refractionpcsx2
1e526097f6 GameDB: Add upscaling fixes for Super Trucks (Racing) 2022-11-03 19:07:08 +00:00
refractionpcsx2
7c728c4ae1 GameDB: HPO for Destruction Derby Arenas 2022-11-03 19:07:08 +00:00
refractionpcsx2
87aa7bbb76 GS: Restrict age of targets for GS Download invalidation. 2022-11-03 15:26:25 +00:00
Mrlinkwii
729fd3cebf GameDB: add upscaling fixes to F1 2001/2002 and F1 Career Challenge 2022-11-03 10:26:09 +00:00
suXin
a9d7164b58 GameDB: WRC Rally Evolved - Fix rare bug causing player to respawn unexpectedly 2022-11-03 10:17:41 +00:00
RedDevilus
8a9a7f0858 GameDB: Silent Hill 4
Silent Hill 4: Fixes invisible wall in front of the door leading to East 3F in the 2nd visit of Apartment world preventing Eileen's Nurse Outfit. (accidentally did Resident Evil 4 instead)
2022-11-03 00:38:05 +00:00
RedDevilus
f02aa252b7 GameDB: Resident Evil 4 (BioHazard 4) + Umisho
Resident Evil 4 / BioHazard 4: Fixes invisible wall in front of the door leading to East 3F in the 2nd visit of Apartment world preventing Eileen's Nurse Outfit.

Umisho: Minor upscaling line issue fix
2022-11-02 23:12:30 +00:00
refractionpcsx2
6103d07d07 GS: Restrict CLUT SW draw widths to multiples of 8
code does 0-7 for points (inclusive) and 0-8 for anything else (exclusive)
2022-11-02 12:17:29 +00:00
Mrlinkwii
66f166909e GameDB: add missing serial 2022-11-01 21:51:05 +00:00
Fothsid
03f7002711 GS/TextureCache: remove an unnecessary TBW check 2022-11-01 21:25:46 +00:00
lightningterror
ff58de2d8c cmake: comment out config guide.
Outdated, will be re added once guides are updated.
2022-11-01 16:06:32 +01:00
lightningterror
9a4585d438 gui-wx: Comment out config guide code.
Outdated.
2022-11-01 16:06:32 +01:00
lightningterror
81800c5a4d Documentation: Remove config guide from dev builds.
Outdated/irrelevant mostly.
2022-11-01 16:06:32 +01:00
Fothsid
e2e9249d40 GS: Check memory overlaps with targets for GS downloads 2022-11-01 10:55:02 +00:00
Connor McLaughlin
9cc852a097 GS/Vulkan: Copy entire target when ds == tex
Also for DX12. Shadow Hearts 3 does a downsample, and we don't copy enough
if we limit to the render area.

Really, the texture cache should be handling this. But since we have the
target height more correct now, the perf hit shouldn't be much.
2022-11-01 09:55:17 +00:00
Connor McLaughlin
0b98c7a352 D3D12HostDisplay: Fix defaulting to vsync off 2022-11-01 09:47:24 +00:00
Connor McLaughlin
4463531f1e FullscreenUI: Various improvements 2022-11-01 09:47:24 +00:00
JordanTheToaster
61ed160881 GameDB: Add HPO Normal to Indiana Jones SOK
Adds HPO Normal to Indiana Jones Staff of Kings.
2022-10-31 23:36:08 +00:00
refractionpcsx2
fd6b0d07fb GS: Fix small config refresh bug. 2022-10-31 21:04:18 +00:00
JordanTheToaster
d92b6648ac GameDB: Add HPO Normal to WRC 4 and VU Round Nearest to GH 5
Adds HPO Normal to WRC 4 to fix minor ghosting on objects and VU Round Mode Nearest to GH 5 to fix SPS and console log spamming size.
2022-10-31 20:57:01 +00:00
PCSX2 Bot
ae71427b91 PAD: Update to latest controller database. 2022-10-31 21:04:25 +01:00
xujibbs
08a9c052d5 Qt: Add translate tag to shutdown message (#7302) 2022-10-31 12:05:47 +00:00
refractionpcsx2
865c103d42 GameDB: Add SW CLUT draws to Ridge Racer, Fixes car textures.
Warning: This is possibly a misdetection, so it might break later on.
2022-10-31 00:05:09 +00:00
refractionpcsx2
fc87b54439 GS-HW: Fix bugs in CLUT draw heuristics, fixes up Driver Parallel Lines 2022-10-30 23:58:11 +00:00
refractionpcsx2
fe53a3f52c GSHW: Ignore recursive draws in CLUT heuristics. 2022-10-30 20:39:34 +00:00
refractionpcsx2
72e8c66879 GameDB: Add CLUT renderer + other fixes 2022-10-30 14:46:11 +00:00
refractionpcsx2
bc2f576b30 GS-HW: SW Render CLUT draws 2022-10-30 14:46:11 +00:00
Mrlinkwii
614c535f5e Gamedb: add WRC4 patch to NTSC-J version 2022-10-30 13:12:29 +00:00
JordanTheToaster
92b5a6e381 GameDB: Add fixes and missing fixes to Ape Escape 3
Adds HPO Special Texture and Autoflush to Ape Escape 3 as well as adding missing fixes to other versions of Ape Escape 3.
2022-10-29 18:33:44 +01:00
refractionpcsx2
c6924ccaeb HW-TC: Keep old frames usable a bit longer.
The old value was a bit too violent on loading screens which didn't update very frequently (Mission Impossible), this new value works pretty well with both.
2022-10-28 23:04:56 +01:00
Ganael Laplanche
aa59547af7 build: Fix build on FreeBSD
- ftruncate64() does not exist on FreeBSD
- add missing environ(7) declaration
2022-10-28 13:25:49 +02:00
Ganael Laplanche
67f1cd4e15 Fix shm_open(3) call on FreeBSD
On FreeBSD, shm_open(3) requires name to start with a '/', else EINVAL
is returned.

See: https://www.freebsd.org/cgi/man.cgi?shm_open
2022-10-28 13:25:49 +02:00
TheLastRar
6ad98e2c70 DEV9: Sockets: Fix UDP FixedPort 2022-10-27 23:53:37 +02:00
TheLastRar
0ee28f3433 DEV9: Sockets: Log correct UDP port 2022-10-27 23:53:37 +02:00
TheLastRar
25107bd2db DEV9: Fix setting response code 2022-10-27 23:53:37 +02:00
TheLastRar
304f260cff DEV9: Fix DNS Internal mode acting as Auto mode 2022-10-27 23:53:37 +02:00
Mrlinkwii
9bcf4d2571 Gamedb :add upscaling fixes to 'Kingdom Hearts II' 2022-10-27 15:28:22 +01:00
Geordie
e129a06436 MemoryCard: Fix a crash that happens when copying from one card to a folder memory card via BIOS. (#6746)
This fixes a crash that happens if you attempt to copy from one memory card to a formatted folder memory card.
2022-10-26 18:30:44 +02:00
lightningterror
c99714dbb2 GSClut: Fix Wsign-compare warning. 2022-10-26 13:54:14 +02:00
lightningterror
8771d3bc19 GS-hw: Use GSVector for rb ga masks in texture shuffle. 2022-10-26 13:16:49 +02:00
Mrlinkwii
e5964ae35b GS-hw: purge DBZBT3 upscaling CRC hack 2022-10-25 10:14:38 +01:00
JordanTheToaster
218b792e73 GameDB: Add VUSyncHack to Twisted Metal Head On
Adds VUSyncHack to Twisted Metal Head On to fix the black doors issue.
2022-10-25 00:36:28 +01:00
Mrlinkwii
0b253b07b2 Gamedb: fix 'Fatal Fury Battle Archives Vol.1' name 2022-10-24 21:43:16 +01:00
PCSX2 Bot
be85ed3645 PAD: Update to latest controller database. 2022-10-24 18:10:20 +02:00
JordanTheToaster
9868abe1b1 UI: Minor text fixes
Fixes flipped text from the Spin GPU PR.
2022-10-24 16:56:27 +02:00
lightningterror
cdb886a454 GS-hw: Implement missing st_int shader bit.
Was causing bad shader errors in GT4.
2022-10-24 16:22:44 +02:00
TellowKrinkle
ac1f31f2cd GS:HW: Add option to spin CPU during readbacks 2022-10-24 14:33:17 +01:00
TellowKrinkle
89dd7f19ef Misc: Improve pause speed measurements
Avoids issues with cores being clocked down during the measurement
2022-10-24 14:33:17 +01:00
TellowKrinkle
923b0817ce GS:Vk: Add option to spin GPU during readbacks 2022-10-24 14:33:17 +01:00
TellowKrinkle
4c9981f3c8 Common:Vk: Move command buffer completion processing to separate function 2022-10-24 14:33:17 +01:00
TellowKrinkle
0ef469f3b5 Common:Vk: Load VK_EXT_calibrated_timestamps 2022-10-24 14:33:17 +01:00
TellowKrinkle
73044dffed GS:MTL: Add option to spin GPU during readbacks 2022-10-24 14:33:17 +01:00
TellowKrinkle
ea35619a78 Common: Add class for spinning GPUs 2022-10-24 14:33:17 +01:00
TheLastRar
8280292fb4 DEV9: Add per game host list support 2022-10-23 22:20:39 +01:00
Connor McLaughlin
dc8cdc95d0 GSRunner: Write log and disable cache in parallel runs 2022-10-22 23:19:54 +01:00
Connor McLaughlin
5e9710a8c6 Qt: Support overriding log file on command line 2022-10-22 23:19:54 +01:00
Connor McLaughlin
c404bd9f17 GSRunner: Support running surfaceless 2022-10-22 23:19:54 +01:00
Connor McLaughlin
61de98d651 Vulkan: Support running surfaceless 2022-10-22 23:19:54 +01:00
Connor McLaughlin
bf2575c3c9 GL/ContextWGL: Fix running surfaceless 2022-10-22 23:19:54 +01:00
Connor McLaughlin
f5e64232c9 GSRunner: Strip spaces from filenames 2022-10-22 23:19:54 +01:00
Connor McLaughlin
9daedf6f09 x86/microVU: Fix last block comparison for AVX2 2022-10-22 23:19:54 +01:00
Connor McLaughlin
dad1e659a5 Achievements: Disable challenge mode on shutdown 2022-10-22 23:19:54 +01:00
Connor McLaughlin
0a8547a692 Qt: Fix main window briefly showing when exiting game in FSUI 2022-10-22 23:19:54 +01:00
Connor McLaughlin
5647ca7f08 Qt: Add play time tracking based on serials 2022-10-22 11:08:23 +01:00
Connor McLaughlin
a3b3edb565 Qt: Add interface section to per-game settings 2022-10-22 10:13:40 +01:00
Connor McLaughlin
fb9c9cb172 Qt: Don't load confirm shutdown/render separate/etc from base 2022-10-22 10:13:40 +01:00
Connor McLaughlin
2815bd177c GS/HW: Fix RGB/A splitting on accumulation blend with DSB off 2022-10-22 10:13:30 +01:00
refractionpcsx2
7aa05c08f1 EEJIT/COP2: Remove redundant instruction/allocation 2022-10-22 03:42:31 +01:00
refractionpcsx2
112ba57729 EE/JIT: Flush Rt on LDR/LDL before write 2022-10-22 03:42:31 +01:00
refractionpcsx2
bdac7672b7 SPU2: Move ADMA clear to ADMA disable.
Fix bug with errantly setting data size if there isn't any.
2022-10-22 01:51:22 +01:00
JordanTheToaster
09a49cfaa0 GameDB: Add mipmapping and trilinear filtering to Black
Adds Mipmapping Full and Trilinear (PS2) to Black.
2022-10-21 13:16:52 +01:00
refractionpcsx2
08cac6affd CDVD: Partial revert change from #5142 keep read state when buffering. 2022-10-21 12:41:11 +01:00
refractionpcsx2
ade8517429 GameDB: Remove SW switch for Grandia Xtreme + Update Simpsons GSHwHacks 2022-10-21 12:02:53 +01:00
refractionpcsx2
c9826cb26a GS: Only allow recently updated frames for display. 2022-10-21 12:02:53 +01:00
refractionpcsx2
3f764e3122 Qt: Fix updating settings when bios changed 2022-10-21 12:02:23 +01:00
refractionpcsx2
9d29287c02 Qt: Update emuthread settings on blockdump directory change 2022-10-21 12:02:23 +01:00
refractionpcsx2
b9cdd452df GameDB: Remove Dragon Quest & Final Fantasy in Itadaki Street patch 2022-10-21 11:04:45 +01:00
refractionpcsx2
32d1105833 GS: Improve upload TEX overwrite detection 2022-10-21 11:04:45 +01:00
JordanTheToaster
d84d4cec4f GameDB: Add autoflush to Suffering TTB
Adds Autoflush to the suffering ties that bind.
2022-10-21 01:31:31 +01:00
Connor McLaughlin
e9a61c24df GSRunner: Add standalone GS runner/dumper 2022-10-20 19:43:29 +01:00
Connor McLaughlin
5ffcbad18b GSDumpReplayer: Support no-looping/frame number queries 2022-10-20 19:43:29 +01:00
Connor McLaughlin
e7c4894833 Common: Add MemorySettingsInterface 2022-10-20 19:43:29 +01:00
Ty Lamontagne
3289cd1e2b Move some IPU logging to systrace instead of devcon
My code emits 64 bit reads for some reason, and it's slowing me down.
2022-10-20 18:39:18 +01:00
refractionpcsx2
4127253650 GS/State: Correct CLUT invalidation range check 2022-10-20 14:57:30 +01:00
Connor McLaughlin
2c55cce6ba GS/TextureCache: Use Inside() for checking display target
The existing code was adding however many pages the framebuffer crossed unconditionally,
when practically this last row will only be read when the height isn't page-aligned.
2022-10-20 14:57:30 +01:00
Silent
633eb45011 vs: Enable Function Level Linking solution-wide and AVX2 for Common project
Shrinks the AVX2 Qt binary by ~2.3MB.
2022-10-20 12:10:17 +01:00
TellowKrinkle
65aeeba567 GHActions: Migrate to new variable output system 2022-10-20 09:30:00 +01:00
TellowKrinkle
f37fd29fd0 CMake:Windows: Add install step 2022-10-19 15:50:43 -05:00
TellowKrinkle
310ed9af0d GHActions: Add CMake Qt build 2022-10-19 15:50:43 -05:00
TellowKrinkle
4e4ffa6526 CMake: Windows Qt build support 2022-10-19 15:50:43 -05:00
TellowKrinkle
8975f2d92c Qt: Add comment on ODR violation workaround 2022-10-19 15:50:43 -05:00
Connor McLaughlin
ddf839beb0 Achievements: Rework challenge mode enabling
Fixes enabling hardcore mode per-game not having any effect.
2022-10-19 18:35:08 +02:00
Connor McLaughlin
53bd98394b FullscreenUI: Fix achievements/lb hotkey running on EE thread 2022-10-19 18:35:08 +02:00
Connor McLaughlin
84bea96941 GS: CRC hack for Black 2022-10-19 17:17:46 +01:00
lightningterror
4470379dfb GameDB: Add Round Sprite Half to Ikki Tousen.
Aligns bloom effect.
2022-10-19 10:14:27 +01:00
lightningterror
f727561553 GS-hw: Remove Ikki Tousen crc hack.
Upscaling hack, upscaling fixes in gamedb will deal with it.
2022-10-19 10:14:27 +01:00
Connor McLaughlin
e6dbd55644 Qt: Use vsync when any FSUI window is open
Fixes high GPU usage when pause menu is opened. Previously, it was fine
if you started from big picture mode, but not if you invoked it by
opening the menu.
2022-10-19 10:12:44 +01:00
Ty Lamontagne
0df6fda9e8 Cubeb: Fix logging comparison, causing verbose spam 2022-10-19 10:12:17 +01:00
Connor McLaughlin
1d58f59190 GS/Vulkan: Fix condition for skipping first barrier
Use the image layout instead of start-of-render-pass, because the image
may already be in general, or it could be restarting the RP from a
render area change.
2022-10-19 10:11:07 +01:00
lightningterror
a30a41c2cc GS-wx: Misc fixes.
Add Hardware Download Mode option.
Remove Disable Hardware Readbacks.
Set dump decompression to LZMA.
And some other misc fixes.
2022-10-19 00:16:26 +02:00
JordanTheToaster
7a82b941cb ImGuiOverlays: Add Texture in RT
Adds Texture in RT to the imgui overlay.
2022-10-18 21:01:24 +02:00
JordanTheToaster
480e126437 GameDB: Correct Big Game Hunter name
Corrects the name of SLUS-21021 and SLUS-21011.
2022-10-18 19:52:03 +01:00
refractionpcsx2
92d43d042d GameDB: Add HW/Upscale fixes for King's Field IV 2022-10-18 19:34:37 +01:00
lightningterror
f2b172738f GS-wx: Add show settings and show inputs options to osd. 2022-10-18 18:26:32 +02:00
refractionpcsx2
4fe1217a69 SPU: Clamp final volume in the right place. 2022-10-18 16:47:43 +01:00
Connor McLaughlin
fa82fc49bb GS/Vulkan: Skip first barrier when starting pass 2022-10-18 17:34:15 +02:00
JordanTheToaster
5d1e340cbb GameDB: Add " World Soccer Winning Eleven 2012" missing entry
Adds a missing entry in the DB.
2022-10-18 17:10:19 +02:00
lightningterror
abcbdc4a25 GS-hw: Further improve how we handle blend mix 1.
Compensate slightly for Cd*(As + 1) - Cs*As.
Try to compensate a bit with substracting 1 (0.00392) * (Alpha + 1) from Cs.
The initial factor we chose is 1 (0.00392) as that is the minimum color Cd can be, then we multiply by alpha to get the minimum blended value it can be.
2022-10-18 15:20:41 +02:00
Florin9doi
8fbb1e5565 BIOS: Map the entire ROM1 file to PS2 memory
EROM is part of ROM1, its exact location vary and can't be predicted
2022-10-18 10:04:52 +01:00
JordanTheToaster
149a08914e GameDB: Copy missing "Game ni Nattayo! Dokuro-chan" patch
Copys over the existing patch that was missing from the limited edition version.
2022-10-18 10:03:35 +01:00
Mrlinkwii
f5c51f7cf7 GameDB: add missing patch to Asobi ni Iku yo! Chikyuu Pinch no Kon'yaku Sengen 2022-10-18 10:03:17 +01:00
RedDevilus
280b3c66eb GameDB: Kaido/Xtreme Racer upscaling + comments
Adding upscaling fixes for vertical lines for Kaido / Tokyo Xtreme Racer by Developer Genki and Publisher Crave. Needs check-up if other fixes are needed as well.
2022-10-17 23:56:41 +01:00
PCSX2 Bot
3a3732a6c6 PAD: Update to latest controller database. 2022-10-17 18:08:41 +02:00
lightningterror
2093c19127 GS: Adjust default renderer for vendors on windows.
AMD, feature level 12.0 and higher pick Vulkan by default.
Intel, feature level 12.0 and higher, pick OpenGL by default.
2022-10-17 16:36:46 +02:00
Connor McLaughlin
c2823aae39 GS: Fix fractional scaling in GL/Vulkan 2022-10-17 15:26:01 +01:00
Connor McLaughlin
ec1a896795 GS/TextureCache: Partially invalidate overlapping targets with tex-in-rt 2022-10-17 10:47:13 +01:00
Mrlinkwii
a46964a258 Mac: add PCSX2 to Launchpad Game Category 2022-10-17 09:45:07 +01:00
lightningterror
b4036f44f1 GS-hw: Disable blend mix on colclip.
Regression, should be disabled.
2022-10-17 10:29:33 +02:00
TellowKrinkle
1ad6605dfb GS:HW: Remove comment on rgba to 8i only-blue optimization
Doesn't seem to improve anything anymore (GPUs do this with csel now anyways, it's like 5 instructions with no divergence)
2022-10-17 10:28:27 +02:00
TellowKrinkle
c6add663f8 GS:HW: Clean up ps_convert_rgba_8i 2022-10-17 10:28:27 +02:00
TellowKrinkle
1ac081ef4c Common: Make GL::Context::Create use gsl::span 2022-10-16 19:24:45 -05:00
TellowKrinkle
074e90d046 3rdparty: Add GSL
Version 4.0.0 (a3534567187d2edc428efd3f13466ff75fe5805c)
2022-10-16 19:24:45 -05:00
TellowKrinkle
a2c3050c51 Common: Formatting 2022-10-16 19:24:45 -05:00
JordanTheToaster
de60209e2b GameDB: Enable Paltex for Zone of The Enders
Improves FPS and drastically reduces the size of the hash cache in game.
2022-10-16 21:38:16 +01:00
Mrlinkwii
d385480b52 GameDB: add fixes for Eternal Ring and Spongebob SquarePants Featuring Nicktoons - Globs of Doom 2022-10-16 15:58:54 +01:00
lightningterror
6b1cea6c91 FullscreenUI: Fix Wunused-variable warning. 2022-10-16 16:14:49 +02:00
lightningterror
d2b5f86639 Qt: Fix Wunused-variable warning. 2022-10-16 16:14:25 +02:00
Connor McLaughlin
e8877daca3 Qt: Register for device notifications on Windows
That way we know when a controller is connected/disconnected, and don't
have to poll unconnected XInput controllers.
2022-10-16 14:54:38 +01:00
Connor McLaughlin
b9dffcb069 Qt: Add DInput input source 2022-10-16 14:54:38 +01:00
Connor McLaughlin
bcd19dd0f5 Qt: Add Host::GetTopLevelWindowInfo() 2022-10-16 14:54:38 +01:00
Connor McLaughlin
48926a7ec4 x86/iR5900: Fix quadword stores on Linux
Linux counts vector and GPR registers separately for which register
they get passed in when calling functions.

Windows uses the argument position.
2022-10-16 14:41:33 +02:00
TellowKrinkle
8981572674 GS:HW: blend_mix doesn't get you fast hdr
It didn't before either, it just accidentally turned on full barriers
2022-10-16 05:09:02 +01:00
Connor McLaughlin
f836fe2056 GS/Vulkan: Ensure we don't leave a bound texture in copy state
Causes the validation layer to get angry, even though it's not used.
2022-10-15 17:42:51 +01:00
Connor McLaughlin
1067714c2c PAD/Qt: Compute deadzone as circular instead of square 2022-10-15 17:38:09 +01:00
Connor McLaughlin
6b0564d6e4 Qt: Add automatic updater for Linux 2022-10-15 17:37:49 +01:00
Connor McLaughlin
6c17f7ad49 GS: Support fractional upscale 2022-10-15 17:37:35 +01:00
Connor McLaughlin
44bad588b4 GS: Unify shader cache versions across renderers
It's not often that we make a change unique to one API. This way, you
only have to bump the version in one location, instead of four.
2022-10-15 15:17:06 +01:00
Connor McLaughlin
44c8974aba GS: Set vsync based on host decision
Fixes bug where after changing settings in the big picture UI, if you
didn't have a game running, it would turn off vsync, making GPU go brr.

Also cleans up HostDisplay a bit, removing redundant parameters.
2022-10-15 15:17:06 +01:00
Connor McLaughlin
6a1eb231dd ImGuiOverlays: Add hardware download mode to settings OSD 2022-10-15 15:16:50 +01:00
lightningterror
39ab409970 GameDB: Add Full mipmap + Trilinear ps2 on GT4.
Better accurately render ground textures, makes it match sw renderer.
2022-10-15 15:16:34 +01:00
Connor McLaughlin
cb1817f440 GS: Add hardware download mode option 2022-10-15 10:18:31 +01:00
Connor McLaughlin
0b09c259aa Qt: Add input and settings overlays 2022-10-15 10:11:17 +01:00
Connor McLaughlin
d446e40741 System: Remove/move out a bunch more leftover stuff from wx
The exceptions are particularly nasty, because there's nothing which
catches them.
2022-10-14 22:24:42 +01:00
Connor McLaughlin
00bcb4cf02 System: Revamp memory allocation
Guest memory is now mapped into a shared memory/file mapping, for use
with fastmem.

64-bit and 128-bit arguments are passed by register/value instead of by
reference/address.

LDL/LDR/SDL/SDR now use 64-bit GPRs instead of SSE.
2022-10-14 22:24:42 +01:00
Connor McLaughlin
92ad6f3baf x86emitter: Fix missing W REX bit for movq reg, xmm 2022-10-14 22:24:42 +01:00
RedPanda4552
fb9c38b75f Qt: Add dialog for memory card conversion 2022-10-14 21:56:41 +01:00
Connor McLaughlin
ab295f0f10 x86/microVU: Add a reference list for quick block lookups
This way, we can pack 8 entries in a single cache line, instead of one.
2022-10-14 20:54:39 +01:00
Connor McLaughlin
197d4d1c81 x86/microVU: Use AVX2 for full block comparisons 2022-10-14 20:54:39 +01:00
Connor McLaughlin
bf95193d5b x86/microVU: Use 64-bit comparisons for quick lookup 2022-10-14 20:54:39 +01:00
Connor McLaughlin
375c0a02bb x86emitter: Add some AVX/AVX2 instructions and YMM registers 2022-10-14 20:54:39 +01:00
Mrlinkwii
ac10e00d7c Gamedb : add upscaling fixed to Call of duty 3 2022-10-14 20:28:06 +01:00
Ganael Laplanche
f5498a4660 Build: Fix build with wx 3.1 on FreeBSD (#7178) 2022-10-14 10:55:55 +01:00
Connor McLaughlin
95968c7e0e CommonHotkeys: Fix target speed going below zero
Also clamps to 100% for challenge mode.
2022-10-14 10:52:27 +01:00
boringhexi
f59030ecaf GameDB: 'Gitaroo Man' patches and fixes (#7184) 2022-10-14 10:50:15 +01:00
Connor McLaughlin
da7f068d5d FullscreenUI: Deadlock fix and add reset confirm for HC enable 2022-10-13 09:03:13 +01:00
Mrlinkwii
e845c59229 Gamedb: miscellaneous missing entries 2022-10-12 11:17:14 +01:00
refractionpcsx2
c391e84451 GS: Only TEXFLUSH if it's an Auto Flush draw. 2022-10-11 18:45:32 +01:00
TellowKrinkle
9b5dd92dad GS:HW: Use 16-bit unorm for HDR 2022-10-11 18:17:27 +02:00
TellowKrinkle
4a7539cd06 GS:HW: Rename FloatColor to HDRColor
It will soon be not a float
2022-10-11 18:17:27 +02:00
refractionpcsx2
e8a021e1b0 GS: Add flush reason to draw call vertex dumps 2022-10-11 17:16:18 +01:00
RedDevilus
8b92872c1f Qt: Changing Cheevos URL color
At the moment it uses a dark blue color which looks fine on light themes but hurts my eyes on the darker themes, reminds me of the old 1.6 console dark mode

Making it currently a bit lighter blue which should fit all the themes, in the future we could make it follow the link color.
2022-10-11 13:14:25 +01:00
Connor McLaughlin
6f99ac676e INISettingsInterface: Write changes atomically 2022-10-11 12:57:27 +01:00
lightningterror
7433cec2c4 GameDB: Add HPO normal to remaining regions of Wallace & Gromit - The Curse of the Were-Rabbit.
Names were different so didn't pick them up during search, also make the names match.
2022-10-11 01:52:25 +02:00
lightningterror
a1e5ce246b GameDB: Add HPO Special to Wallace & Gromit - The Curse of the Were-Rabbit.
Fixes misalignment/bloom when upscaling.
2022-10-11 01:37:45 +02:00
lightningterror
97ba76ab47 GameDB: Add trilinear PS2 and change mipmap from Basic to Fast to Hulk The Ultimate Destruction
Further fixes textures to match sw renderers.
2022-10-11 01:29:58 +02:00
lightningterror
866dee7cc2 GameDB: Adjust HPO from Normal to Special for Shadow of Rome and Onimusha Dawn of Dreams.
Issues with HPO special were the clamp optimizations.
2022-10-11 01:08:31 +02:00
lightningterror
4f1143420c GS-hw: Fully purge Shadow of Rome crc hacks.
Issue with upscaling and hpo special was clamp optimizations.
2022-10-11 00:56:02 +02:00
lightningterror
702aefa43e GS-hw: Disable clamp more optimizations for now.
We currently crop off the rightmost and bottommost pixel when upscaling clamps, until the issue is properly solved we should keep this disabled as it breaks many games when upscaling.
2022-10-11 00:43:23 +02:00
PCSX2 Bot
86ca20403e PAD: Update to latest controller database. 2022-10-10 18:05:12 +02:00
RedDevilus
356b5c1750 Qt: Consistent save state list in big picture
In the WX days we had savestate 0-9 where 0 was the first. Then Qt came around where savestate 0-10 existed for Big Picture and 1-10 for the main listing this can cause headaches where you cycle through savestates or just save to the current slot 0 and it doesn't show up in the main window.
2022-10-10 14:06:59 +01:00
Mrlinkwii
37c89ffba3 gamedb: add autoflush to 'The Simpsons: Hit & Run.' 2022-10-09 21:01:40 +01:00
lightningterror
4a83efcd61 GS-hw: Cleanup GSHWHack.cpp
Declare functions noexcept, initialize variables.
2022-10-09 21:10:20 +02:00
lightningterror
871308cf25 GS-hw: Remove condition to enable upscaling hacks on Aggressive crc.
Not really needed, favor accuracy.
2022-10-09 21:10:20 +02:00
lightningterror
90f1ea7896 GS-hw: No need to check for coverage when getting alpha value.
We already set the alpha min max value to 128 if coverage is used.
2022-10-09 17:51:33 +02:00
lightningterror
1c308b2710 GS: When CoverageAlpha is used set Alpha min max to 128. 2022-10-09 17:51:33 +02:00
lightningterror
5227bc9167 GS-hw: Add missing stencil buffer check for fba or coverage alpha DATE. 2022-10-09 17:51:33 +02:00
refractionpcsx2
4f93ee29e6 GS: Remove no longer needed logging. 2022-10-09 13:37:00 +01:00
Connor McLaughlin
07a51589cb GameDB: Normalize HW fixes for Xenosaga Episode II 2022-10-09 09:32:28 +02:00
RedDevilus
67847c9485 Qt: Amendment for Turbo naming
PCSX2 uses the Fast Forward naming in the hotkeys but DuckStation uses Turbo for a similar function.

Makes it easier to see what the hotkey is for.
2022-10-09 09:30:36 +02:00
refractionpcsx2
96071e157a GS: Modify clamp behaviour on large specified texture sizes
Add temp logging
2022-10-09 06:25:22 +01:00
refractionpcsx2
f70da4b33e GS: Handle higher TH/TW for STQ calculation 2022-10-09 06:25:22 +01:00
refractionpcsx2
92cd6e8435 GS: Fix DX shader error 2022-10-09 04:53:18 +01:00
TellowKrinkle
0637682eb0 GS:HW: Properly handle fbmask of negative values
Previously was possible with blending and colclip, but now more common with the new hdr algorithm
2022-10-09 04:06:59 +01:00
TellowKrinkle
af1888b21a GHActions:macOS: Remove unused dependencies 2022-10-08 22:41:59 +01:00
TellowKrinkle
fca61d68b0 GHActions:MacOS: Disable Qt gssapi support
Qt's build script picks up gssapi_krb5.dylib instead of GSS.framework on some MacOS SDKs, failing the build.  We don't need GSS, so disable it instead of patching
2022-10-08 22:41:59 +01:00
TellowKrinkle
954e9fc7c1 CMake: Prevent finding Mono.framework libpng 2022-10-08 22:41:59 +01:00
refractionpcsx2
9750cfe6bf GS: Fixes for flushes from PR #6389 2022-10-08 21:10:13 +01:00
Connor McLaughlin
1910c8fc0f GS/HW: Only allocate as many mip levels as present
This prevents any possibility of sampling undefined or garbage/reused
texture data from levels which aren't used by the current draw.

And a tiny bit of VRAM. But nothing really measurable.

Also fixes a bug in Vulkan where a copied texture can get mip-generated
in the wrong command buffer when using basic mipmapping.
2022-10-08 19:42:45 +01:00
lightningterror
7f9932129d FullscreenUI: Remove unused variables. 2022-10-08 20:16:31 +02:00
Connor McLaughlin
8947c0d2e7 Qt: Fix primed indicator not being disabled when achievements off 2022-10-08 14:18:35 +01:00
Connor McLaughlin
48015d3f43 Achievements: Append notifications downwards not upwards 2022-10-08 14:18:35 +01:00
Connor McLaughlin
74ffdca614 Achievements: Save submitted time from API in leaderboards 2022-10-08 14:18:35 +01:00
Connor McLaughlin
2ae3c6bf29 Achievements: Check for nulls in API responses
rc_json_get_string() stores NULL if the server literally sends "null".
2022-10-08 14:18:35 +01:00
Connor McLaughlin
28e33e1883 Achievements: Reapply settings on HC enable 2022-10-08 14:18:35 +01:00
Connor McLaughlin
9615120586 VulkanHostDisplay: Fix crash when driver uses large preferred upload stride 2022-10-08 14:18:35 +01:00
lightningterror
3d557be918 GS-hw: Adjust Shadow of Rome crc hacks.
Remove some unneeded crc hacks while making leftover upscale only.
2022-10-08 14:49:19 +02:00
icup321
b166b1a383 GameDB: Fix missing splash logos in Krome games
Also fixes water textures in TY 2 & 3.
2022-10-08 13:17:51 +01:00
Connor McLaughlin
905e573520 Qt: Fix error writing config on first launch 2022-10-08 13:17:34 +01:00
Connor McLaughlin
15b91fb6a4 Qt: Drop libsamplerate dependency for Qt+MSVC
It's only used by USB/WASAPI, which doesn't exist in Qt.
2022-10-08 12:50:10 +02:00
Connor McLaughlin
2c64c729bf VMManager: Remove unused variable 2022-10-08 12:49:00 +02:00
refractionpcsx2
2ddc7897e0 WX: Backport Resamplebox patch to fix GSDump previews in vs2022 2022-10-08 05:41:28 +01:00
icup321
e359cc5da9 GameDB: Fix ghosting in BlitzTech engine games
Also fixes a few game title issues.
2022-10-07 21:32:01 +01:00
TellowKrinkle
73ae9f8879 GS:HW: Make HDR algorithm more float-precision-friendly
- Use whole numbers instead of 255ths
- Use range -128 - 127 instead of 0 - 255 for accumulation blends
2022-10-07 20:44:53 +02:00
Connor McLaughlin
7ea8b983d4 CI: Switch from libcurl4-gnutls-dev to libcurl4-openssl-dev
Hopefully fix the Linux AppImage not finding certificates on Debian.
2022-10-07 11:28:16 +01:00
refractionpcsx2
4b652e6878 GameList: remove playlists 2022-10-06 21:57:03 +01:00
Mrlinkwii
90c541d117 Gamedb: add EE rounding to 'Ty the Tasmanian Tiger 3' 2022-10-06 15:45:51 +01:00
Connor McLaughlin
540cd272e0 FullscreenUI: Display primed achievement list in pause menu 2022-10-06 12:11:56 +01:00
Connor McLaughlin
0cc665a26b Qt: Add option to hide primed/challenge achievements 2022-10-06 12:11:56 +01:00
Connor McLaughlin
c0965f7205 Qt: Remove m3u from open file filter 2022-10-06 10:23:48 +01:00
JordanTheToaster
e092726070 GameDB: Add Ufficiale PlayStation 2 Speciale Platinum 2007
Adds missing demo entry.
2022-10-05 13:00:16 +01:00
JordanTheToaster
08bf7acb29 GameDB: Add missing Spiderman WoS fix
Adds missing clamp mode fix to PAL version of Spiderman WoS.
2022-10-05 09:18:37 +01:00
refractionpcsx2
2f7d45db09 SPU: Allow up to 200% final volume 2022-10-04 23:42:42 +01:00
rewasdadmin
7c3aa65166 Pad: Native DualShock 3 support in Windows by official Sony driver (sixaxis) 2022-10-04 20:03:48 +01:00
suXin
5637ff4228 GameDB: WRC Rally Evolved - Fix delay slot slowdowns 2022-10-04 10:01:13 +01:00
PCSX2 Bot
7f47ce268f PAD: Update to latest controller database. 2022-10-03 18:05:22 +02:00
Connor McLaughlin
0af2e4af03 Achievements: Avoid potential crash when parsing malformed responses 2022-10-03 16:10:01 +01:00
Connor McLaughlin
c379c833e4 Linux: Implement screensaver inhibit for X11 2022-10-03 11:55:31 +01:00
Connor McLaughlin
f63e1b3760 Qt: Implement screensaver inhibit 2022-10-03 11:55:31 +01:00
JordanTheToaster
16f7bdcd33 GameDB: Minor game fixes
Undo VU clamp change for Revenge adds missing Burnout 2 entry and Killzone entry and adds half pixel offset normal to Berserk.
2022-10-02 20:21:38 +01:00
Connor McLaughlin
bebad5127c Qt: Implement save state backups option 2022-10-02 21:08:58 +02:00
Connor McLaughlin
4907003d3c Qt: Add Delete Save States to load menu 2022-10-02 21:08:58 +02:00
Mrlinkwii
cac62b31b1 linux-various : remove no longer needed shellscript 2022-10-02 21:08:41 +02:00
arcum42
5d3b3319ad Remove references to unused define. 2022-10-02 05:21:51 -07:00
SlyCooperReloadCoded
736b5a2a06 GameDB: Fix some game titles and add some missing fixes (#7121) 2022-10-02 13:18:29 +01:00
JordanTheToaster
92a9aa6d3c GameDB: Update Burnout games VU Clamp mode
Changes the VU Clamp on the Burnout games from none to extra + preserve sign.
2022-10-02 00:42:50 +01:00
lightningterror
d908fa5e38 GS/wx: Change TriFilter name and move it to main renderer tab on wx.
Matches Qt behavior.
2022-10-01 17:34:42 +01:00
lightningterror
aafb7e22df Qt: Change TriFilter config name. 2022-10-01 17:34:42 +01:00
Connor McLaughlin
2c1f0d248c GS/HW: Shuffle moves don't need barriers with fbfetch 2022-10-01 17:32:10 +01:00
Connor McLaughlin
e744fe666b Acheivements: Make login progress indeterminate
It doesn't have a percentage.
2022-10-01 17:29:03 +01:00
Connor McLaughlin
ea45025bf9 FullscreenUI: Clean boot if resume picked without state 2022-10-01 17:28:50 +01:00
Connor McLaughlin
ea19514b53 Qt: Fix main window hiding with EFS bug 2022-10-01 17:27:46 +01:00
Connor McLaughlin
1186025c89 Qt: Add Discord Rich Presence support 2022-10-01 17:27:05 +01:00
Connor McLaughlin
85b6842557 3rdparty: Add rapidjson and discord-rpc 2022-10-01 17:27:05 +01:00
refractionpcsx2
86685a9db4 CDVD: Increase cycle accuracy + simulate speedup for CLV/CAS swap 2022-10-01 08:18:25 +01:00
Connor McLaughlin
256a5b94c5 Qt: Hook up reset timestretch button 2022-10-01 05:00:40 +01:00
Connor McLaughlin
d1021749bc SPU2: Fix uninitialized bitset
Causes config reloads even when nothing changed.
2022-10-01 05:00:40 +01:00
Connor McLaughlin
27229da36f CI: Install libasound2-dev for Linux builds
Hopefully sort out cubeb not building with ALSA support.
2022-10-01 05:00:40 +01:00
Connor McLaughlin
44d969c0d2 Qt: Add audio backend selection (only cubeb for now) 2022-10-01 05:00:40 +01:00
Connor McLaughlin
9170a5abc1 3rdparty/cubeb: Add cubeb_get_backend_names() 2022-10-01 05:00:40 +01:00
Connor McLaughlin
1aa734cb83 3rdparty/cubeb: Silence wasapi output frames logging unless mismatch 2022-10-01 05:00:40 +01:00
Connor McLaughlin
3695ae07d5 3rdparty: Move cubeb 93d1fa3fccdc22da37aa59f67b213591797db369 in-tree 2022-10-01 05:00:40 +01:00
Connor McLaughlin
fea6e1b236 Achievements: Drop OOB poke log messages to verbose 2022-10-01 04:21:50 +01:00
refractionpcsx2
2ff72867e3 Achievements: Fix a couple of typos 2022-10-01 00:26:26 +01:00
Connor McLaughlin
0419de4baf Qt: Add RetroAchievements implementation 2022-10-01 00:00:02 +01:00
Connor McLaughlin
843b0b3eb1 3rdparty: Add RAInterface 2022-10-01 00:00:02 +01:00
Connor McLaughlin
9f2c4c6b59 3rdparty: Add rcheevos 2022-10-01 00:00:02 +01:00
Connor McLaughlin
9c64193434 HTTPDownloader: Pass content type by reference 2022-10-01 00:00:02 +01:00
Connor McLaughlin
99fbe4e9ff VMManager: Reload save state ELF in internals
We should serialize this in the state at some point.
2022-10-01 00:00:02 +01:00
Connor McLaughlin
ffa014f910 ImGuiFullscreen: Add indeterminate background progress 2022-10-01 00:00:02 +01:00
Mrlinkwii
1edb856214 Gamedb: fixes for 'Guitar Hero - World Tour' 2022-09-30 23:09:18 +01:00
Connor McLaughlin
c2cafd1a80 GS/Vulkan: Actually store the readback buffer size
This being missing was causing the buffer to be reallocated every
download.
2022-09-30 14:06:47 +01:00
JordanTheToaster
da8a79a857 GameDB: Add Trilinear (PS2) to Burnout games
Trilinear makes the image much smoother and more natural.
2022-09-29 14:28:37 +01:00
Connor McLaughlin
cb73017fbe GameDB: Enable full mipmapping + PS2 trilinear for Ape Escape games 2022-09-29 13:28:38 +01:00
Connor McLaughlin
56d6014626 GS/HW: Improve PS2 trilinear selection
trilinear_auto should only be set when using basic, trilinear can be
used with PS2 mips.
2022-09-29 13:28:38 +01:00
Connor McLaughlin
3bbb510b7a GS/HW: Make trilinear filtering behavior consistent across backends
Previously, triln=0 would result in nearest mipmap filtering in
D3D/Vulkan, but forced base level in OpenGL.
2022-09-29 13:28:38 +01:00
Connor McLaughlin
f2e6c61bfa GS: Use memcmp for GSVector2 comparisons
Single compare-and-branch versus two.
2022-09-29 13:28:38 +01:00
Connor McLaughlin
f1cb13fd94 GS/TextureCache: Fix non-mipmap sources conflicting with mipmap sources
Fixes building flicker in Burnout 3 with Full mipmapping, as the first
draws don't use mipmapping, but the others do, resulting in the texture
having whatever was last left in it before it was recycled.
2022-09-29 13:28:38 +01:00
RedDevilus
7d1e7f2b58 GameDB: Jackass
GSHWFix halfpixeloffset for upscaling issue
2022-09-28 17:42:09 +01:00
Ganael Laplanche
6229148307 cmake: Fix build on FreeBSD. (#7080)
${pcsx2OSXSources} cannot be built on FreeBSD, so remove them.
2022-09-27 14:40:19 +02:00
lightningterror
18288544a5 GUI-wx: Fix condition is always true/false warnings.
Codacy.
2022-09-27 14:36:36 +02:00
lightningterror
de5f310011 USB: Try to fix variable never used warnings.
Codacy.
2022-09-27 14:36:36 +02:00
lightningterror
7ef998e438 GameDB: Add a bunch of Korean games. 2022-09-26 19:45:53 +02:00
Christian Kenny
0b7c36c456 gitignore: Don't track bad_shader logs 2022-09-26 00:09:03 +01:00
Connor McLaughlin
bf8d3a044f GS/Vulkan: Fix redundant constant buffer reuploads
Also the redundant descriptor set binds.
2022-09-25 15:12:40 +01:00
Connor McLaughlin
000de4c72e GS/HW: HLE shuffles (more like copies) done through moves
Fixes broken shadows in the hardware renderer in Final Fantasy XII.
2022-09-25 15:09:46 +01:00
Connor McLaughlin
5d7ab54340 GS/HW: Vertex/index pointers should be constant 2022-09-25 15:09:46 +01:00
Connor McLaughlin
d5e8fadc64 VMManager: Fix per-game memory cards getting ejected on boot 2022-09-25 14:32:25 +01:00
JordanTheToaster
5db2bef7b0 GameDB: Disable InstantVU1 for SoTC
Disables InstantVU1 for a moderate increase in FPS due to lower VU % usage.
2022-09-25 14:59:16 +02:00
Connor McLaughlin
41a03c98f3 INISettingsInterface: Use ToChars() for int/float conversion
Avoids locale issues.
2022-09-25 14:49:48 +02:00
Connor McLaughlin
af646e4496 Common: Add StringUtil::ToChars() wrapper 2022-09-25 14:49:48 +02:00
Stuart Kenny
b3590430c9 MemoryCardFolder: Use icon osd notification method. 2022-09-24 17:21:07 +02:00
Mrlinkwii
0aea2bac74 GameDB:add HWfixes to Steel Dragon EX 2022-09-23 19:26:41 +01:00
Stuart Kenny
2915a1a145 MemoryCardFolder: Add write osd notification. 2022-09-23 17:41:11 +02:00
Ty Lamontagne
14e0aeb4f3 IOPBios: Implement the different iomanx stat file modes 2022-09-20 18:09:58 +01:00
JordanTheToaster
638f2e09ed GameDB: Correct incorrect GTA SA fix
Fixes a mistake someone made adding ee clamping to GTA SA.
2022-09-20 18:09:46 +01:00
icup321
880e2f0d30 GameDB: Spyro NTSC-U bloom fix and add missing PAL demo disc. (#6960)
* Add NTSC-U Spyro fix and missing PAL demo disc

* Add missing PAL Sonic Riders demo disc

* Add HalfPixelOffset fix to Crash Twinsanity demo
Necessary for fixing depth lines in Crash Twinsanity demo.
2022-09-19 18:12:31 +02:00
PCSX2 Bot
e5698e6c8f PAD: Update to latest controller database. 2022-09-19 18:08:43 +02:00
lightningterror
aa075bdf6b GS-wx: Rearrange debug checkboxes in advanced tab graphics settings.
Less confusing and easier to debug.
2022-09-19 01:55:43 +02:00
JordanTheToaster
96b00e95f5 GameDB: Add missing DB entrys
Adds various missing entry's.
2022-09-18 18:40:11 +01:00
RedPanda4552
9394e3ec42 Config: Preserve memcard types instead of wiping to defaults (#7065) 2022-09-18 12:38:34 +01:00
Ty Lamontagne
435b5a2b27 IOPBios: Differentiate ioman and iomanx dread & getStat HLE
Structure differences with fio_stat_t and fxio_stat_t make them incompatible
2022-09-18 01:52:22 +01:00
Ty Lamontagne
4ad563f8fc IOPBios: Properly increment host dir iterator
Fixes uLaunchELF and any other homebrew that iterates over directories.
2022-09-18 01:52:22 +01:00
JordanTheToaster
e94f56a185 Qt: Make FastCDVD per game only
Makes FastCDVD per game only to prevent users enabling a destructive setting globally.
2022-09-17 17:51:54 +01:00
Connor McLaughlin
a2c140c87f VMManager: Ensure MTGS is finished before resetting 2022-09-17 17:51:14 +01:00
Connor McLaughlin
1a979a8498 VMManager: Fix inactive per-game bindings taking precedence over global 2022-09-17 17:51:14 +01:00
Connor McLaughlin
a020e985f2 VMManager: Fix toggling game fixes per-game (stuck enabled) 2022-09-17 17:51:14 +01:00
Connor McLaughlin
f8d9e6eeb8 InputManager: Split AddBinding() and AddBindings() 2022-09-17 17:51:14 +01:00
Connor McLaughlin
564c81575f FullscreenUI: Various improvements 2022-09-17 17:51:14 +01:00
Connor McLaughlin
8b16a7a8c7 Qt: Add cover downloader 2022-09-17 17:51:14 +01:00
Connor McLaughlin
6b245f34a2 CI: Add libcurl to appimages 2022-09-17 17:51:14 +01:00
Connor McLaughlin
f17a77c18e Common: Add HTTPDownloader implementation 2022-09-17 17:51:14 +01:00
Connor McLaughlin
17ac5ffe99 GameList: Use sanitized game titles for covers
Fixes covers for games such as dot hack which use characters incompatble
with the file system.
2022-09-17 17:51:14 +01:00
Connor McLaughlin
2b04f0b585 Path: Make sanitize routine follow OS rules 2022-09-17 17:51:14 +01:00
Connor McLaughlin
22ed71cef4 StringUtil: Add UTF-8 encode and decode 2022-09-17 17:51:14 +01:00
Connor McLaughlin
1f5d672cbf Qt: Open host input method on imgui text edit
This should open virtual keyboards on devices which do not have a
physical keyboard.
2022-09-17 17:51:14 +01:00
Connor McLaughlin
c136bb4ea8 PAD: Add analog stick invert and button deadzone options 2022-09-17 17:51:14 +01:00
Connor McLaughlin
e28a3ac945 FullscreenUI: Fix controller setting saving 2022-09-17 17:51:14 +01:00
Connor McLaughlin
3829f574ca 3rdparty/imgui: Round when DPI scaling instead of flooring 2022-09-17 17:51:14 +01:00
Connor McLaughlin
d8ac919543 3rdparty/imgui: Fix text input with gamepad 2022-09-17 17:51:14 +01:00
Silent
97e4f39492 QtHost: Fix Unicode command line arguments 2022-09-17 17:51:03 +01:00
Ty Lamontagne
9d58a1be8b Revert "BiosTools: Allow BIOS region patching"
This reverts commit a4dcaa7c14.
2022-09-17 17:50:46 +01:00
rufotheone-fr
4be34d3cf1 GameDB: fixes letter C + some missing A/B fixes
+ changes asked by refractionpcsx2
2022-09-17 11:05:22 +01:00
Connor McLaughlin
6ef57bf7d6 Build: Use in-tree imgui
Snapshot was taken at commit 5b9d197b7d
2022-09-16 10:15:28 +01:00
Connor McLaughlin
c70d833a5e 3rdparty: Move imgui in-tree 2022-09-16 10:15:28 +01:00
Connor McLaughlin
7b10240297 VMManager: Re-add .mdf as a disc filename
Fixes them not being scannable.
2022-09-16 10:15:17 +01:00
TellowKrinkle
0f0543d3f6 PAD: Remove weird unused binary file 2022-09-16 00:52:28 -05:00
TellowKrinkle
738c8cb630 Core: Remove trailing whitespace from all files 2022-09-16 00:52:28 -05:00
noigeaR
09c41b6e20 GameDB: More fixes, less missing 2022-09-15 20:51:56 +01:00
Connor McLaughlin
324eb4d4bf Qt: Fix crash on clearing controller bindings 2022-09-15 16:46:44 +01:00
Connor McLaughlin
0f24048cd5 GameDatabase: Add gpuPaletteConversion = 2 value
Some games (e.g. Metal Gear Solid 2) use large-ish textures, with a
bunch of different CLUTs/palettes, depending on the draw. Kind-of like a
texture atlas.

This causes issues when texture preloading is enabled, as both VRAM and
GS CPU thread usage increase proporiately to the number of texture:clut
pairs (since it has to be hashed).

An alternative to disabling preloading, which is what we currently do,
is enabling GPU palette conversion in these games. Even though we
ever-so-slightly increase the GPU load due to having to do shader
sampling, the CPU load on the GS thread is considerably reduced, and
overall performance is greater. In theory it'll also achieve higher
cache hit rates on the GPU, since we're not duplicating a bunch of
textures.

However, as a general rule of thumb, we don't want to encourage people
to enable paltex, as most games run slower with it on. So, what this PR
does, is add a GameDB option for these types of games, to enable paltex
when texture preloading is set to full/hash cache, but otherwise leave
the setting alone. The best of both worlds.

NOTE: I've also forced paltex=0 for Spider-Man 2, as it uses a massive
number of palettes which can cause descriptor issues in DX12/Vulkan. A
perfect example of where you *don't* want to use paltex.
2022-09-15 12:24:43 +01:00
noigeaR
0ffdc485d7 GameDB: Fix DOA 2 naming. Yamasa Digi World add missing & fix naming 2022-09-15 12:23:50 +01:00
Connor McLaughlin
6810a9d593 Qt: Deduplicate interface code and reduce core coupling
This enables more code sharing between interfaces in the future (e.g.
nogui, gsrunner, etc). Eventually I'll move everything in Frontend/ to
its own project.

 - VMManager now no longer depends on anything in Frontend.
 - Moved INISettingsInterface out of Frontend.
 - Log settings can now be overridden per-game (if you really want to)..
 - Hotkeys get their own file.
2022-09-15 11:50:51 +01:00
Connor McLaughlin
c96f1d28e6 Qt: Fix fullscreen/window size being enabled in game list 2022-09-15 11:50:40 +01:00
neonoxd
f2d86f2782 Qt: Scroll GameList by pixels using scrollwheel 2022-09-14 00:38:49 +02:00
noigeaR
ee88ea90ee GameDB: Fix Kaidou Battle upscaling and add missing games 2022-09-13 21:50:12 +01:00
lightningterror
7c1bf15618 tools: Cleanup trailing whitespace.
Codacy warning.
2022-09-13 20:19:53 +02:00
lightningterror
fdb170b443 Core: Remove unused IopSif.cpp file.
Codacy warnings.
2022-09-13 20:19:53 +02:00
lightningterror
1fa7ae4f0d PAD: Cleanup unused variable warnings.
Codacy.
2022-09-13 20:19:53 +02:00
PCSX2 Bot
7641890910 PAD: Update to latest controller database. 2022-09-12 18:16:09 +02:00
JordanTheToaster
72c78fc163 UI: Fullscreen UI typo fix
Fixes a typo in cycle skip.
2022-09-12 10:23:27 +01:00
SupervisedThinking
8d8c076931 CMake: fix Xrandr
- fix path to includes
- fix lib name
2022-09-11 16:30:21 +02:00
JordanTheToaster
f3f495d23b WX: Add Disable Hardware Readbacks option
Adds the missing disable hardware readback option to WX.
2022-09-11 01:10:31 +01:00
Connor McLaughlin
bc3729c930 iR5900: Skip reloading COP2 flags register when it's not used 2022-09-10 15:26:30 +01:00
Connor McLaughlin
5a0c8c9f32 iR5900Analysis: Always set COP2 status flag bit for VSQRT/VRSQRT/VDIV
These update flags unconditional on FMAC.
2022-09-10 15:26:30 +01:00
JordanTheToaster
367a69cdfe GameDB: MGS2 Document of text fixes for more versions
Adds EETimingHack to more versions of MGS2 the document of to fix the flickering broken text.
2022-09-10 14:47:34 +01:00
Connor McLaughlin
e8230ee01f Qt: Fix load input profile/reset controller defaults
Same deal as #7029.
2022-09-10 05:19:09 +01:00
Connor McLaughlin
99f1ad0ea6 Qt: Fix crash when autobinding controller
Regression from #7016.
2022-09-10 04:40:56 +01:00
JordanTheToaster
11d3326d73 GameDB: Beyond Good and Evil rendering fix
Fixes shield rendering on BGAE.
2022-09-10 02:59:27 +01:00
KrossX
7dd88213b1 Qt: include more entry strings in search 2022-09-09 21:25:49 +01:00
Connor McLaughlin
e0cb165927 LRUCache: Fix Evict() removing too many items 2022-09-09 21:21:14 +01:00
Connor McLaughlin
1e660c8e85 Qt: Fix possible crash when starting game while scanning 2022-09-09 21:21:14 +01:00
Connor McLaughlin
e8704adc67 GzippedFileReader: Don't double open when creating index 2022-09-09 21:21:14 +01:00
Connor McLaughlin
43d6ddd7cf VMManager: Add warning for unsafe settings on boot 2022-09-09 21:21:14 +01:00
Connor McLaughlin
6e0ac7fa75 HostDisplay: Make GL/D3D timestamp queries slightly less rubbish 2022-09-09 21:21:14 +01:00
Connor McLaughlin
800aca6f0f GS/OpenGL: Force UBO reupload on restore api state 2022-09-09 21:21:14 +01:00
Connor McLaughlin
a228582984 Host: Add GetResourceFileTimestamp() 2022-09-09 21:21:14 +01:00
Connor McLaughlin
9f9f8e0e39 GameList: Fix title for ELFs 2022-09-09 21:21:14 +01:00
Connor McLaughlin
3d6f4629e9 PAD: Fix copying input sources 2022-09-09 21:21:14 +01:00
Connor McLaughlin
6fca0dac0e VMManager: Only trigger hotkeys with valid VM 2022-09-09 21:21:14 +01:00
Connor McLaughlin
22e9aea827 Config: Fix frame rate being parsed ever-so-slightly off
Also converts from double to float, we don't need additional precision
for storing these values.
2022-09-09 21:21:14 +01:00
Connor McLaughlin
e064e96c96 HostDisplay: Make global pointer instead of function 2022-09-09 21:21:14 +01:00
Connor McLaughlin
b667236c92 Qt: Combine EmuThread.cpp and QtHost.cpp
These mostly called back between one another.
2022-09-09 21:21:14 +01:00
Connor McLaughlin
e4df563811 Qt: Implement settings reset 2022-09-09 21:21:14 +01:00
Connor McLaughlin
d86abebb50 VMManager: Add SetDefaultSettings()
Also removes the affinity control default for <=2 threads, best to let
the OS handle this.
2022-09-09 21:21:14 +01:00
Connor McLaughlin
1b3bf89ee8 PAD: Split set default controller and hotkey settings 2022-09-09 21:21:14 +01:00
noigeaR
291063bd98 GameDB: Add missing games 2022-09-09 20:04:10 +01:00
TellowKrinkle
4c298ca484 GS: Add zequal to GSScanlineSelector to_string 2022-09-08 19:55:09 -05:00
TellowKrinkle
650dc8bc6a GS: Fix zequal handling in CDrawScanline
I somehow didn't use the same algorithm as the asm version originally
2022-09-08 19:55:09 -05:00
Mrlinkwii
2ee8236365 Gamedb: upscaling fixes for 'Urbz, The - Sims in the City' 2022-09-08 22:30:00 +01:00
JordanTheToaster
4707c02a34 GameDB: Deus Ex various fixes
Adds round sprite half preload frame data and partial texture preloading to Deus Ex.
2022-09-08 21:38:01 +01:00
JordanTheToaster
d0faa14760 GameDB: Death by Degrees FMV line fixes
Adds align sprite to Death by Degrees to fix FMV lines.
2022-09-08 18:28:01 +01:00
Connor McLaughlin
19725deb7e FullscreenUI: Remove accurate DATE option
It doesn't exist anymore.
2022-09-08 12:45:48 +02:00
TellowKrinkle
81cafd21d0 GS:MTL: Don't override GSTexture::Save with a TODO
There's a working default implementation
2022-09-08 02:20:26 -05:00
TellowKrinkle
365c1c3f3e GS:MTL: Implement GPU usage tracking 2022-09-08 02:20:26 -05:00
TellowKrinkle
fbc3120c47 GS:MTL: Ensure prim id init actually writes 2022-09-08 02:20:26 -05:00
TellowKrinkle
66093c3278 GS:MTL: Add barrier counting 2022-09-08 02:20:26 -05:00
Ty Lamontagne
7d4ca441d5 clang-format: pcsx2/IopBios.cpp 2022-09-07 20:54:12 +01:00
Ty Lamontagne
cee8598b3f IOPBios: Hook iomanx library as well as ioman
Fixes fileXio incompatibility
2022-09-07 20:54:12 +01:00
Mrlinkwii
256e845e7a Gamedb: Fix 'Muppets Party Cruise' 2022-09-07 20:46:48 +01:00
lightningterror
f39ac6f58b Qt: Remove Accurate DATE from Qt gui. 2022-09-07 12:17:08 +01:00
lightningterror
a397de448b GS-wx: Remove Accurate DATE from wx gui. 2022-09-07 12:17:08 +01:00
lightningterror
62adad0739 GS-config: Remove Accurate Date from the config. 2022-09-07 12:17:08 +01:00
lightningterror
3d647fe55a GS-hw: Remove Accurate DATE option, no longer needed. 2022-09-07 12:17:08 +01:00
JordanTheToaster
65b0511d9e GameDB: Kikou graphics fixes
Disables mVU flag speedhack to fix broken graphics.
2022-09-07 09:18:30 +01:00
Connor McLaughlin
16a33e42e2 GS/Vulkan: Discard instead of clear for PrimID setup fill 2022-09-07 09:18:11 +01:00
Connor McLaughlin
81c0e000e7 GS/DX12: Discard instead of clear for PrimID setup fill
We're writing the render area anyway.
2022-09-07 09:18:11 +01:00
Connor McLaughlin
d4a5a714fb GS/DX12: Fix incorrect topology on PrimID DATE setup 2022-09-07 09:18:11 +01:00
rufotheone-fr
e60e0c02c0 GameDB: fixes letter B (#6973) 2022-09-07 09:17:28 +01:00
TellowKrinkle
5fa35c5273 CMake:MacOS: Don't strip qt binaries 2022-09-07 01:18:34 -05:00
TellowKrinkle
95ad6b8ab4 GS:DX11: Add primid destination alpha support 2022-09-06 21:07:56 +02:00
TellowKrinkle
1b34eb14f8 GS: Pass through primitive ID in geometry shaders in DX12 and VK
Fixes primid destination alpha on sprites
2022-09-06 21:07:56 +02:00
TellowKrinkle
412480b326 GS: Don't add 10 to date flag to indicate initialization
We already have 1 and 2 dedicated to the job
2022-09-06 21:07:56 +02:00
TellowKrinkle
0500824e57 GS:Vk: Change primitive_id enable to match the new meaning
A bit messy, due to the fact that its support piggybacks on support of other features, instead of having a dedicated feature flag
2022-09-06 21:07:56 +02:00
TellowKrinkle
3e0f3d05e2 GS: Rename image_load_store capability to primitive_id
The algorithm it enables has changed for all renderers, and no longer needs image_load_store
2022-09-06 21:07:56 +02:00
TellowKrinkle
62f9b16139 GS:OGL: Use blend min for primid destination alpha 2022-09-06 21:07:56 +02:00
TellowKrinkle
80523828c7 GS:HW: Properly use primid dst alpha as a fallback to barrier dst alpha
Even when we would have otherwise used barrier over primid if both were supported
2022-09-06 21:07:56 +02:00
PCSX2 Bot
979a105071 PAD: Update to latest controller database. 2022-09-05 18:22:28 +02:00
TellowKrinkle
ea81b74e3b GS:OGL: Add fetch_rt function to shader 2022-09-04 23:02:44 -05:00
TellowKrinkle
1864440f5c GS:OGL: Support disabling texture barrier 2022-09-04 14:47:39 -05:00
JordanTheToaster
b96594b17c GameDB: Corvette game fixes
Adds half pixel offset special aggressive and disables MTVU for Corvette.
2022-09-02 19:38:09 +01:00
Connor McLaughlin
97960a2232 microVU: Fix program dumping 2022-09-02 11:21:30 +01:00
refractionpcsx2
5fc73f87f4 OSD: Correct region2 parameter offset. 2022-09-01 23:19:16 +01:00
JordanTheToaster
8ca5cb18a3 GameDB: General title fixes and adds a gamefix
Corrects some more titles and adds preload frame data to "Takahashi Naoko no Marathon Shiyou yo!".
2022-09-01 16:31:53 +01:00
TellowKrinkle
517f3b7709 GS:HW: Don't skip FBW 0 2022-09-01 11:01:50 +02:00
TellowKrinkle
603f863b71 GS: Don't clamp fbw to 1
fbw zero is a thing
2022-09-01 11:01:50 +02:00
TellowKrinkle
e40a93e389 GS: Don't clamp scissor to fbw
HW tests indicate this doesn't happen
2022-09-01 11:01:50 +02:00
lightningterror
6279ae63ce GS-hw: Remove remaining 24bit destination checks for Ad. 2022-09-01 10:28:42 +02:00
Connor McLaughlin
cb2a21ef19 IopBios: Fix opening host: or host:. as a directory 2022-08-31 21:29:01 +01:00
lightningterror
edc82d77a5 GS-hw: Improve how we handle blending on 24bit with Ad factor in renderer. 2022-08-31 20:34:51 +02:00
TellowKrinkle
e89612e5b9 GS: Use accumulation blend when alpha is known to be 1 2022-08-31 18:17:43 +02:00
rufotheone-fr
9150e69783 GameDB: some title fixes letter A + SCAJ-30004 + SLPM-62346
+ fix "Attheraces Presents Gallop Racer" double space
2022-08-31 15:33:47 +01:00
JordanTheToaster
4b95112724 GameDB: Various title fixes and game fixes
Fixes various titles and adds autoflush to Yumeria.
2022-08-31 11:17:03 +01:00
PCSX2 Bot
b45748fead PAD: Update to latest controller database. 2022-08-30 18:23:29 +02:00
Mrlinkwii
0b3052ced2 Gamedb: fix incorrect korean serials 2022-08-30 14:36:16 +01:00
JordanTheToaster
aae53fb9da GameDB: Fix "Curious George" region
Changes the region from NTSC-Unk to the correct NTSC-HK.
2022-08-30 09:46:35 +01:00
Mrlinkwii
291d32bd35 GameDB: add missing serial for 'Hyper Sports 2002 Winter' 2022-08-30 01:18:51 +01:00
Connor McLaughlin
6386be09c2 CMake: Throw error when building Qt with PACKAGE_MODE
We don't support this.

1. It doesn't make sense to put data in /usr/share since it's not shared between applications.
2. Makes the application not self-contained for easily being moved/removed.
3. Means you can't have multiple versions installed.
4. Every other platform is self-contained (Windows, Mac).
2022-08-29 13:58:22 +01:00
Connor McLaughlin
05bed05afe Frontend: Add fullscreen UI implementation 2022-08-29 13:39:09 +01:00
Connor McLaughlin
5b9d197b7d 3rdparty/imgui: Include imgui_stdlib 2022-08-29 13:39:09 +01:00
Connor McLaughlin
9cce6945e6 Common: Add Image and Easing classes 2022-08-29 13:39:09 +01:00
Connor McLaughlin
33f1e51ebc 3rdparty: Move jpgd from pcsx2 to separate static lib 2022-08-29 13:39:09 +01:00
Connor McLaughlin
d466184a02 MTGS: Support 'running idle', i.e. redisplaying the current frame 2022-08-29 13:39:09 +01:00
Connor McLaughlin
be3f120548 VMManager: Support per-game controller settings
Global bindings will be ignored in such a case.
2022-08-29 13:39:09 +01:00
Connor McLaughlin
2e303da384 Qt: Move pressure modifiers to settings tab 2022-08-29 13:39:09 +01:00
Connor McLaughlin
dfc3fd8e58 VMManager: Add icons to some OSD messages 2022-08-29 13:39:09 +01:00
Connor McLaughlin
51e3ec27d8 VMManager: Clear last elf/serial on shutdown 2022-08-29 13:39:09 +01:00
Connor McLaughlin
1ec76ce248 VMManager: Move semantics for VMBootParameters 2022-08-29 13:39:09 +01:00
Connor McLaughlin
9012afc534 Qt: Forward text input to ImGui 2022-08-29 13:39:09 +01:00
Connor McLaughlin
a19045f9d6 Host: Add ConfirmMessage() and OpenURL() 2022-08-29 13:39:09 +01:00
Mrlinkwii
d18c8976b9 readme: update readme 2022-08-29 13:31:56 +01:00
Mrlinkwii
5485ef4f50 CI: update to 20.04 for WX 2022-08-29 13:31:56 +01:00
TellowKrinkle
f4a56ae106 GHActions:macOS: Use ccache 2022-08-28 18:35:03 -05:00
TellowKrinkle
280316dceb Qt: no-pch support 2022-08-28 18:35:03 -05:00
Connor McLaughlin
9094ee0dc6 D3D11HostDisplay: Migrate to wil 2022-08-27 13:52:12 +01:00
Connor McLaughlin
cad489480c Frontend: Remove unused code 2022-08-27 13:52:12 +01:00
Connor McLaughlin
9655d28a23 Common: Remove unused code 2022-08-27 13:52:12 +01:00
refractionpcsx2
76d3299690 GS-Dumps: Fix Local->Host download size 2022-08-27 02:43:03 +01:00
lightningterror
7b846b42e3 GameDB: Remove R&C 3 patch for ps2 demo disc.
Broke Jak 3 causing it to hard crash.
2022-08-27 01:43:58 +02:00
refractionpcsx2
b8ca60ebd5 DEV9: Codacy fix codacy errors and warnings 2022-08-27 00:33:59 +01:00
refractionpcsx2
ddb9f0b95d SPU2: Codacy fix codacy errors and warnings 2022-08-27 00:33:59 +01:00
refractionpcsx2
93f4277b3c UI-Files: Codacy fix codacy errors and warnings 2022-08-27 00:33:59 +01:00
refractionpcsx2
f841a8ba58 Core: Fix codacy errors and warnings 2022-08-27 00:33:59 +01:00
refractionpcsx2
4d4825de75 GS: Fix codacy warnings 2022-08-27 00:33:59 +01:00
Mrlinkwii
a71bac037c Misc: fix some codacy warnings 2022-08-26 22:58:08 +02:00
lightningterror
02e4e4da01 USB: Cleanup const reference warnings.
Codacy warning: Function parameter should be passed by const reference.
2022-08-26 20:57:57 +02:00
lightningterror
0bf6f9d596 CDVD: Cleanup const reference warning.
Codacy warning: Function parameter should be passed by const reference.
2022-08-26 20:57:57 +02:00
RedDevilus
472c6efc12 GameDB: Re-ordering gshwfix
GameDB: Star Wars Episode 3 re-ordering
2022-08-26 19:32:28 +01:00
lightningterror
66d88ed10b GS: Fix Wunused-but-set-variable, Wunused-variable warnings. 2022-08-26 14:42:37 +02:00
lightningterror
4439b3ad22 PAD: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list.
2022-08-26 14:33:20 +02:00
lightningterror
7c6a838d7f GUI-Wx: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list.
2022-08-26 14:33:20 +02:00
refractionpcsx2
5c951afa64 GameDB: Remove SoftwareFMV switches no longer needed 2022-08-26 09:07:42 +01:00
refractionpcsx2
878e06cd36 GS-HW: Limit BP overlap check to stop FMV flicker.
Games changing the double buffer addresses get screwed up, make sure we don't misdetect
2022-08-26 09:07:42 +01:00
refractionpcsx2
4ef879d1f2 GS-HW: Scale display texture width in TC. 2022-08-26 09:07:42 +01:00
refractionpcsx2
b74f91b868 GS-HW: Expand width on output read if DBX offset 2022-08-26 09:07:42 +01:00
TellowKrinkle
693790a19f GS:MTL: Expand lines and sprites in vertex shader 2022-08-26 01:18:00 -05:00
lightningterror
98724979cb GUI-Wx: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list.
2022-08-26 02:16:00 +02:00
lightningterror
ab430355ec CDVD: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list
2022-08-26 02:16:00 +02:00
lightningterror
060a8f6345 PAD: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list
2022-08-26 02:16:00 +02:00
lightningterror
97aaf3ef9b MemoryCard: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list.
2022-08-26 02:16:00 +02:00
lightningterror
6eb7f5f962 DebutTools: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list.
2022-08-26 02:16:00 +02:00
lightningterror
313fe1ca2c GS: Fix variable initializations.
Codacy Warning: Variable 'variable' is assigned in constructor body. Consider performing initialization in initialization list.
2022-08-26 02:16:00 +02:00
TellowKrinkle
ce34fbe502 3rdparty: Update cubeb 2022-08-25 15:16:46 +02:00
TellowKrinkle
562e9bfebb GS:FindMinMax: sprites use flat Z and color 2022-08-25 15:15:07 +02:00
TellowKrinkle
c2fbe5c606 GS: Fix up FindMinMax handling of swapped lines and final triangles 2022-08-25 15:15:07 +02:00
TellowKrinkle
f53cb0fae7 GS: Reduce FindMinMax instantiation count 2022-08-25 15:15:07 +02:00
JordanTheToaster
9d8b93a269 Revert "GS-hw: Purge MidnightClub3 crc hacks."
This reverts commit f53fbd6282.
2022-08-25 10:39:02 +01:00
raid273
e65ef95027 GameDB: Added memcardFilters to Armored Core - Last Raven 2022-08-24 09:11:48 +01:00
refractionpcsx2
3455c2955f CDVD: Fix integer division on floats and fix logging 2022-08-24 08:43:11 +01:00
JordanTheToaster
4abd395efa GameDB: Major League Baseball 2K5 Hang fix
Adds EE Clamp Extra + Sign to MLB 2K5 and the world series edition.
2022-08-24 08:41:56 +01:00
lightningterror
c332bd198a GS-wx: Remove unused FMVSoftwareRendererSwitch config. 2022-08-24 01:42:28 +02:00
lightningterror
6c395cc07d GS-wx: Set texture preloading to full as default.
Already is on Qt.
2022-08-24 01:37:29 +02:00
lightningterror
7eea2fba9b GS-wx: Update tooltips. 2022-08-24 01:36:37 +02:00
JordanTheToaster
e89115a027 GameDB: Fixing fixes
Fixes some previous fixes so those fixes actually work or don't break the game
2022-08-23 12:18:32 +01:00
refractionpcsx2
00ffa42f50 UI-Qt: Hide Dolby Pro Logic Decoding (It doesn't do anything) 2022-08-23 10:35:55 +01:00
TellowKrinkle
e55825fd88 GHActions:Windows:CMake: Properly exit on failed build 2022-08-23 03:32:26 -05:00
TellowKrinkle
a50a9fcf9a GHActions: CMake builds are SSE4 2022-08-23 03:32:26 -05:00
TellowKrinkle
ce8679a978 CMake: Use full LTO
Speeds up Vulkan backend a bit compared to LTO_PCSX2_CORE, since Vulkan calls into a lot of common methods
2022-08-23 03:32:26 -05:00
TellowKrinkle
5d6348fbf9 CMake: Add GS- flag to MSVC bulds 2022-08-23 03:32:26 -05:00
TellowKrinkle
63e9d47f09 CMake: Add SPU and GS to LTO_PCSX2_CORE LTO 2022-08-23 03:32:26 -05:00
TellowKrinkle
8cc7343201 GHActions: Publish PDB for cmake builds 2022-08-23 03:32:26 -05:00
TellowKrinkle
2aabd54e6a GHActions: Disable buildcache on windows
Not compatible with PDB
2022-08-23 03:32:26 -05:00
TellowKrinkle
bb56f274c8 CMake: Enable PDB generation in Release builds 2022-08-23 03:32:26 -05:00
TellowKrinkle
241d7335e4 SDL2: Remove mac crash workaround for SDL 2.0.22
2.24 is here!
2022-08-23 03:24:57 -05:00
TellowKrinkle
bc7037bb52 3rdparty: Upgrade SDL to 2.24 2022-08-23 03:24:57 -05:00
TellowKrinkle
e7e5814214 3rdparty: Sort SDL vcxproj entries 2022-08-23 03:24:57 -05:00
lightningterror
4c9fbd3fba GS-hw: Cleanup GSRendererHW.cpp.
Constants,duplicate declarations, initializations, null pointers.
2022-08-23 02:38:49 +02:00
PCSX2 Bot
566d397bd1 PAD: Update to latest controller database. 2022-08-22 19:40:29 +02:00
JordanTheToaster
2da65cdd5f GameDB: Add some missing demos
Adds missing demos
2022-08-22 08:49:41 +01:00
JordanTheToaster
e3eae7fbe8 GameDB: Various game fixes and missing entrys
Adds software FMV switch to The Thing JP and texture preloading to partial for Osouji Sentai Clean Keeper H
2022-08-20 23:57:48 +01:00
TellowKrinkle
91601e5647 GS: Manually do bilinear sampling when converting RGBA to depth
Shader bilinear doesn't properly handle the case where r overflows into g (or g overflows into b, etc)
2022-08-20 10:12:24 +01:00
TellowKrinkle
882c09b870 Vulkan: Format convert.glsl 2022-08-20 10:12:24 +01:00
JordanTheToaster
1d7a130bd1 GameDB: Tomb Raider Angle of Darkness effect fixes
Adds autoflush to restore the lava fire effect
2022-08-20 09:53:16 +01:00
iMineLink
202fb5fef3 GS: improve haunting ground hw tc hack.
when clearing the render target, also discard all the dirty
rectangles previously marked, to avoid spurious uploads
later.
2022-08-19 10:55:27 +01:00
JordanTheToaster
f73d7b4cb9 GameDB: Driving Emotion Type-S fixes
Adds VUSyncHack and VU Clamp mode Extra + Sign.
2022-08-19 10:45:04 +01:00
TellowKrinkle
48d3d38e84 GS: Fix wx replayer readbacks
WX runs GS commands directly, so GS isn't open
2022-08-18 20:35:35 -05:00
lightningterror
11c903a3e9 GS: Cleanup GSState.cpp.
constants, scope, duplicate declarations, initializations.
2022-08-18 23:04:13 +02:00
iMineLink
4992659b46 GS: fix out of bounds access to index buffer. 2022-08-18 20:36:46 +01:00
JordanTheToaster
7285eca249 GameDB: Shellshock Nam 67 Upscaling fixes
Adds round sprite half to Shellshock Nam 67
2022-08-17 19:46:13 +01:00
lightningterror
dc8021e952 GS: Fix Wsign-compare warning. 2022-08-17 19:47:48 +02:00
Connor McLaughlin
fb18143791 Qt: Fix newline printed for guest printf on Linux 2022-08-17 19:38:02 +02:00
JordanTheToaster
475551b0d9 GameDB: Interlace and upscale fixes for Cocoto Fishing Master
Adds interlacing Blend BFF and half pixel offset vertex to Cocoto Fishing Master
2022-08-17 00:26:56 +01:00
refractionpcsx2
5447da0588 GS: Don't do blend_mix on HDR 2022-08-16 20:54:55 +01:00
refractionpcsx2
1b18e02fe0 GS: Add constant adjustment in blend mix when reverse subtracting. 2022-08-16 20:54:55 +01:00
KrossX
2e63a4c037 Qt: Add ProLogic decoding audio settings 2022-08-16 20:28:10 +01:00
JordanTheToaster
2d0e0c8fcc Qt: Change name of Adjust to Host Refresh Rate
Changes the name of Adjust To Host Refresh Rate to Scale to Host Refresh Rate.
2022-08-16 19:58:51 +01:00
Daisouji
2b61e10d91 QT: Changing checked to Checked 2022-08-16 19:58:37 +01:00
JordanTheToaster
97ce72ed07 Qt: Add missing description box texts
Adds missing texts descriptions to VSync Internal Resolution Screenshots and Integer Scaling.
2022-08-16 08:44:37 +01:00
refractionpcsx2
fcbf9f7d8f GameDB: Upscaling fix for Naruto Ultimate Ninja 5/Narutimate Accel 2 2022-08-15 20:41:06 +01:00
refractionpcsx2
c2a68aa0b8 GS: Fix bug where incorrect verticles were saved on flush
Probably didn't matter in most cases, but for autoflush draws, it certainly does.
2022-08-15 18:27:09 +01:00
refractionpcsx2
080c70e8a8 GS: Add shortcut for Autoflush on Tri-Strip/Fan 2022-08-15 18:27:09 +01:00
refractionpcsx2
c11030dde5 GS: Improve autoflush detection.
Old way didn't really work with triangles, especially triangle fans.  Some games will be slower, others faster.
2022-08-15 18:27:09 +01:00
JordanTheToaster
a2e6a8e41f GameDB: DBZ Budokai Tenkaichi fixes
Adds half pixel offset special and full round sprite to Dragon Ball Z Budokai Tenkaichi
2022-08-15 15:29:34 +01:00
Mrlinkwii
ec5f614a25 Gamedb: add upscaling fixes to 'Charlie's Angels' 2022-08-15 09:40:03 +01:00
lightningterror
23338319a0 PAD: Fix Wsign-compare warning. 2022-08-14 20:48:04 +02:00
lightningterror
191c7fdf30 GS: Fix Wunused-private-field warning. 2022-08-14 20:48:04 +02:00
refractionpcsx2
1342ed2afe GS: Revert #6838 2022-08-14 16:57:59 +01:00
Left-Empty
69b0193535 gameDB: Kessen 2 NTSC-J refraction patch fix (#6842) 2022-08-14 12:22:04 +01:00
Connor McLaughlin
db2489a555 GS/TextureCache: Fix texture resize in DX11 2022-08-14 03:54:19 +01:00
Silent
b191126f36 Workflows: Download cheats from pcsx2_patches repo on build time 2022-08-14 02:58:10 +01:00
JordanTheToaster
ef0de38624 GameDB: Add various Burnout fixes
Adds various Burnout fixes and adds a missing demo entry for Burnout Revenge
2022-08-14 01:56:46 +01:00
noigeaR
3d0a43d0e7 GameDB: Fix typos in game names 2022-08-13 21:27:52 +01:00
Dreadmoth
874be7ea8b GameDB: Remove half-pixel offset from Mercenaries
Remove half-pixel offset from Mercenaries - it breaks the skybox.
2022-08-13 21:26:45 +01:00
Mrlinkwii
a93034ad59 Gamedb: add fixes for 'World Rally Championship' NTSC-J versions 2022-08-13 17:02:18 +01:00
JordanTheToaster
134cee6adc WX: Change default sound module
Changes the default sound module from XAudio2 to Cubeb to prevent USB crashing and parity with Qt
2022-08-13 16:48:58 +01:00
TellowKrinkle
cb64e8d504 GS:HW: More accurate blend equation for blend mix 2022-08-13 00:01:23 +02:00
JordanTheToaster
35a6dfb52a Config: Change default dump compression
Changes default dump compression from uncompressed to LZMA (xy)
2022-08-12 19:30:08 +01:00
Mrlinkwii
1c276db76f Gamedb: add missing 'Ace Combat 04' entry 2022-08-12 18:13:04 +01:00
Mrlinkwii
400e0f1dd4 Gamedb: add missing Alpine Racer 3 entries 2022-08-11 14:05:57 +01:00
Connor McLaughlin
9a7ed81759 Qt: Improve controller settings and add macro UI 2022-08-10 17:25:11 +01:00
Connor McLaughlin
6f40cf9beb Qt: Only hide global texture offset/skipdraw in release builds 2022-08-10 17:25:11 +01:00
Connor McLaughlin
307028734f Qt: Fix several issues in SettingWidgetBinder
- Possible nullopt value().
 - Incorrect loading of some folder values.
 - Enable per-game setting of spinboxes.
2022-08-10 17:25:11 +01:00
refractionpcsx2
cd2d7c91c3 GS: Add slow path for odd width 4bpp host->local transfers 2022-08-10 16:52:07 +01:00
TellowKrinkle
8b375d66fa GHActions:MacOS: Don't fail on failed brew unlink
If brew can't unlink them, they're not there and there's no need to do anything
2022-08-10 04:28:31 -05:00
JordanTheToaster
8f367abe0b GameDB: Ace Combat 5 Fixes
Adds texture preloading partial to Ace Combat 5 for better performance.
2022-08-10 06:44:20 +01:00
Mrlinkwii
fdc84be0d9 Gamedb: upscaling fixes for Shadow of Rome 2022-08-10 06:44:00 +01:00
BreakPoints
edfceaad14 Qt: Force helpText size to avoid overflow at default size
Increase minimum size of helpText to match max
2022-08-09 15:35:52 +01:00
JordanTheToaster
40fda5067d GameDB: Add DBZ Budokai Tenkaichi 2 fixes
Adds half pixel offset normal to DBZ BT 2 and removes full round sprite to fix the insane amount of ghosting in some areas
2022-08-09 15:33:42 +01:00
lightningterror
573706e5e4 GS-hw: Don't disable second output on blend mix when using constant factor.
We don't want to disable second output when using blend mix1 above 1.0f Af.
Reason is we change Af to As and later output it on second output for hw blending.
2022-08-08 18:11:28 +02:00
PCSX2 Bot
1ef4acc2af PAD: Update to latest controller database. 2022-08-08 18:11:16 +02:00
lightningterror
6035db3231 GS-d3d11: Disable blending when color isn't written.
Fixes d3d11 crashing on mgs3 using intel igpu.
2022-08-08 12:51:17 +02:00
Mrlinkwii
2cd44412f6 Gamedb: upscaling fixes for Poison Pink/ Eternal Poison 2022-08-08 11:21:14 +01:00
JordanTheToaster
c149fe31fb GameDB: Add missing Korean serials
Adds missing Korean serials as well as the accompanying fixes
2022-08-08 04:40:02 +01:00
JordanTheToaster
0e24d638c9 GameDB: Fixes for Devil Kings
Adds Special HPO to Devil Kings
2022-08-07 20:37:31 +01:00
JordanTheToaster
5c056f0c4d GameDB: Add Disaster Report fixes
Adds auto flush to Disaster Report to correct an inaccurate blur filter
2022-08-07 18:57:35 +01:00
lightningterror
62b838427f GS-hw: Purge tri ace crc hacks.
Star Ocean 3, Valkyrie Profile 2, Radiata Stories.

The crc hacks aren't that needed anymore since right now D3D is much faster than it used to be.
2022-08-07 14:13:56 +02:00
BreakPoints
ad529c10ab Qt Updater: Copy new icon to updater
So that the updater benefits from the new icon changes in #6785 (file size, sharpness of small icon sizes)
2022-08-07 13:09:26 +01:00
noigeaR
8ef7399612 GameDB: Add missing Japanese games (#6790) 2022-08-07 13:08:59 +01:00
JordanTheToaster
939c1f0f29 GameDB: Add 007 NightFire fixes
Adds half pixel offset special to 007 NightFire
2022-08-07 13:08:22 +01:00
lightningterror
6b48cf574d GS-hw: Adjust how we handle specific blend mix cases.
Replace Cs*As + Cd*(1 - As) with Cs*As - Cd*(As - 1).
Replace Cs*F + Cd*(1 - F) with Cs*F - Cd*(F - 1).
As - 1 or F - 1 subtraction is only done for the dual source output (hw blending part)
since we are changing the equation.
Af will be replaced with As in shader and send it to dual source output.

Also check if A*Alpha in the shader overflows, if it does then adjust the
alpha that is sent for HW blending further to compensate.
2022-08-07 14:08:04 +02:00
Mrlinkwii
1478819258 GS-hw: Purge SkyGunner crc hacks. 2022-08-07 03:07:04 +02:00
Mrlinkwii
f53fbd6282 GS-hw: Purge MidnightClub3 crc hacks. 2022-08-07 03:06:51 +02:00
lightningterror
60e6e1f242 Qt: Fix Wunused-but-set-variable warnings. 2022-08-07 03:00:22 +02:00
lightningterror
7a5f63e0f5 GS-metal: Move PABE shader bit to the top of sw blending.
Early return when there is no sw blending, no need to run the blend code.
Optimization.
2022-08-06 17:36:24 +02:00
refractionpcsx2
c0e325dfbf GS-HW: Correct FBMask masks for texture shuffles 2022-08-06 12:35:16 +01:00
JordanTheToaster
62e775b7c2 GameDB: Correct The Incredible Hulks name
Corrects the name of the PAL version of The Incredible Hulk and adds missing demo version to the db
2022-08-06 11:52:44 +01:00
BreakPoints
37676a296a UI: Update all sizes of App Icon (#6785) 2022-08-06 10:12:52 +01:00
Connor McLaughlin
bcc4548f7b GS/HW: Clamp draw rect to unscaled, not scaled coordinates
Fixes broken shuffle effect in Haunting Ground when upscale is set above
1x.
2022-08-06 06:13:30 +01:00
JordanTheToaster
60714b5ca4 Qt Updater: Fix use of old icons
Fixes the updater seemingly using the old style of PCSX2 icon.
2022-08-06 00:13:59 +02:00
Mrlinkwii
d632634e56 Gamedb: add basic mipmap to Blood Omen 2 2022-08-05 19:17:14 +01:00
lightningterror
bec8b40edb GS-wx: Remove some unused upscale code for renderer tab. 2022-08-05 11:41:29 +02:00
lightningterror
ab361eef72 GS-wx: Fix Wunused-but-set-variable warning. 2022-08-05 11:37:50 +02:00
Connor McLaughlin
1f16adbca7 GS/Vulkan: Don't use clear attachments on cleared RT/DS
Redundant.
2022-08-05 07:16:53 +01:00
Connor McLaughlin
1677ef3189 GS/TextureCache: Elide copies when source matches target
Assuming everything matches up, instead of copying the target, we can just sample it directly.
It's the same as doing the copy first, except we save GPU time.
2022-08-05 07:16:53 +01:00
Connor McLaughlin
36defdfbe9 GS: Use tex-is-fb for sprites/shuffles 2022-08-05 07:16:53 +01:00
Mrlinkwii
7ba6e4adc3 Gamedb: remove not needed upscaling fixes for God of war 2022-08-05 00:19:55 +01:00
TheLastRar
ee2cbc80b8 DEV9: Sockets: Set Arp Hardware Type 2022-08-03 21:05:40 +02:00
lightningterror
b4d960e795 GS-ogl: Remove bad driver messages for intel/amd.
AMD has new gl drivers which work well now.
For intel it's not really needed as the log may be useful for broadwell or lower igpu.
2022-08-03 20:57:47 +02:00
lightningterror
0f716d9053 GS-hw: Fix dithering log. 2022-08-03 20:54:30 +02:00
JordanTheToaster
cdbfd22296 GameDB: Corrects name of Asterix & Obelix XXL2
Fixes the incorrect name of Asterix & Obelix XXL
2022-08-03 19:34:10 +01:00
Goatman13
de801a4f23 GameDB: Replace Evolution Snowboarding patches.
Instead of skipping videos, patches extend stack in problematic function. So required data is no longer overwritten. Workaround for missing EE data cache emulation.
2022-08-03 11:46:51 +02:00
JordanTheToaster
1376a615b7 GameDB: Misc compat level fixes
Fixes some out of date compat levels
2022-08-03 09:51:23 +01:00
noigeaR
1fbc9ab85e GameDB: add Panzer Elite Action upscaling fix 2022-08-03 09:51:00 +01:00
refractionpcsx2
9a8a3601a7 UI-Qt: Add Bilinear dropdown to SW options 2022-08-02 23:35:48 +01:00
refractionpcsx2
f1e68e9bd0 GS: Don't double res on No-Interlace patch when interlaced 2022-08-02 23:35:35 +01:00
ichee
5228e6e6c7 GameDB: Fixes Dual Hearts FMV's not being deinterlaced
Deinterlacing is not being applied causing the FMV's to be offset. This forces blend tff.

Fixes #6715.
2022-08-02 11:36:24 +01:00
PCSX2 Bot
5b977cef54 PAD: Update to latest controller database. 2022-08-01 23:43:45 +02:00
refractionpcsx2
a802deeb51 GameDB: Add round sprite full for DMC3, reduces blur. 2022-08-01 21:07:30 +01:00
JordanTheToaster
eaf6375410 GameDB: Maximo vs Army of Zin Fixes
Adds fixes and adds a missing entry in the DB for the Korean version.
2022-08-01 16:54:00 +01:00
JordanTheToaster
d1daf21a3f GameDB: Misc fixes
Fixes many problems with many games and adds missing hacks and fixes.
2022-08-01 14:02:13 +01:00
Risae
98c83c8509 GameDB: Add fixes for Growlanser V & Growlanser VI 2022-08-01 09:02:10 +01:00
Mrlinkwii
b25731f621 Gamedb:upscaling fixes for "dot hack Infection Part 1" 2022-07-31 19:50:01 +01:00
Mrlinkwii
563f5ec713 Gamedb: add partial preload to "Hitman Contracts" 2022-07-31 12:36:48 +01:00
refractionpcsx2
ad25ae43d5 GameDB: Disable Instant VU for Juiced 2022-07-31 10:58:51 +01:00
refractionpcsx2
b058e72fdd VIF: Wait for VU on flush + clang format
Improves performance in MTVU + Non-instant a little.
2022-07-31 10:58:51 +01:00
refractionpcsx2
38ee8ccfe3 VU: Fix some bugs, ignore VU's in EE Timing Hack 2022-07-31 10:58:51 +01:00
refractionpcsx2
53161f76a6 VU-MTVU: Simulate VU times when in MTVU w/o Instant VU. 2022-07-31 10:58:51 +01:00
Connor McLaughlin
742a929966 GS: Purge sparse texture
Only worked on a limited number of drivers, not reliable, and not
necessary now that we're reducing target sizes, which works better
anyway.
2022-07-31 10:58:39 +01:00
Connor McLaughlin
63b3646e73 GS/TextureCache: Expand perfect-matched targets for display when needed
Hitman Contracts draws a line near the bottom of the screen, presumably
with a smaller scissor, then scans out 448 lines. Which meant the merge
oversampled and smeared.
2022-07-31 10:39:35 +01:00
refractionpcsx2
794c73a613 GS-debug: Fix GSDumps when rt or ds is null. 2022-07-31 08:21:22 +01:00
JordanTheToaster
59fc2a4c15 GameDB: WRC 4 Fixes
Fixes misaligned text and car shadow softness.
2022-07-30 22:15:44 +01:00
Connor McLaughlin
6a144f86cf GS: Improve target size calcs and remove conservative framebuffer 2022-07-30 17:16:59 +01:00
refractionpcsx2
f218e11d78 GS: Rearrange GS Dump names to be less annoying to navigate 2022-07-30 17:16:35 +01:00
JordanTheToaster
f6bcd8a2c2 GameDB: Various texture preloading fixes
Fixes performance problems when texture preloading is set to Full (Hash Cache).
2022-07-30 17:08:23 +01:00
JordanTheToaster
bf0cd5a6cd Qt: Recommended text fixes
Fixes some missing or incorrect recommended boxes.
2022-07-29 13:42:31 +01:00
tellowkrinkle
fc1504f2e5 GHActions: Properly label Linux AVX2/SSE4 releases 2022-07-28 20:45:23 -05:00
Stuart Kenny
7b4d545dca GameDB: Ridge Racer V upscaling fixes. 2022-07-28 22:27:12 +01:00
JordanTheToaster
89f27d0b2d Qt: Change cycle skipping text
Changes the cycle skipping default level text from "Normal" to "None".
2022-07-28 20:54:55 +01:00
Anderson_Cardoso
3728f42185 GUI-Qt: Updated Controller Image (#6729) 2022-07-28 11:52:03 +01:00
lightningterror
2d6c4c6aee GameDB: Change halfPixelOffset normal to special for shadow hearts series.
Normal breaks shadows.
2022-07-28 12:47:14 +02:00
lightningterror
83b8ec6a99 cheats_ni: Cleanup no interlace patches. (#6717)
Remove widescreen, blur, and other crap patches that shouldn't be here.
Affected crcs 1F34E107,14DDB291,71B142EC,586EA828,64328775,A8D83239
2022-07-27 14:04:16 +02:00
Jordan
5e87f6d806 GameDB: Energy Airforce fixes (#6714)
Adds autoflush to Energy Airforce Aim Strike.
2022-07-26 18:50:27 +02:00
Mrlinkwii
f2da932777 GameDB: Correct title for Mushihimesama 2022-07-26 13:10:30 +01:00
refractionpcsx2
4b3e6d7a58 GS: Flush any pending draws on reset. 2022-07-25 22:04:16 +01:00
Mrlinkwii
c50d671bdb GameDB: add 'VUSyncHack' to Air Ranger - Rescue Helicopter 2022-07-25 19:57:33 +01:00
PCSX2 Bot
5290cbea94 PAD: Update to latest controller database. 2022-07-25 18:12:34 +02:00
Connor McLaughlin
f6b55a4e19 GS/Vulkan: Fix incorrect render pass for stencil DATE 2022-07-25 14:33:09 +01:00
Mrlinkwii
4e0d2207a3 GameDB: add gamefixes to cod 2 and fix titles 2022-07-25 00:53:13 +01:00
icup321
f089d5714f GameDB: Add mipmap fixes to Toshi engine games (#6680) 2022-07-24 16:24:00 +01:00
Connor McLaughlin
be26c04dd1 Qt: Asynchronous loading of covers 2022-07-24 16:22:37 +01:00
Connor McLaughlin
cbcfe37e28 Common: Add LRUCache 2022-07-24 16:22:37 +01:00
Connor McLaughlin
ef0fde8615 CI: Use Qt 6.3.1 for all platforms 2022-07-24 16:22:37 +01:00
Connor McLaughlin
cc728642ed Qt: Allow changing theme without recreating window 2022-07-24 15:42:29 +01:00
Connor McLaughlin
d9360a66af Qt: Fix bindings not applying after profile load/reset 2022-07-24 15:15:27 +01:00
Connor McLaughlin
4040f7afca Qt: Fix game list not resizing after resize+shutdown game 2022-07-24 15:15:27 +01:00
JordanTheToaster
758c347258 GameDB: GoW Fixes 2022-07-24 14:20:31 +01:00
JordanTheToaster
cf76a605d2 GameDB: Arean Football fixes 2022-07-24 10:00:34 +01:00
refractionpcsx2
1cfcfc465e GS: CLUT Invalidation on transfer accounts for offset. 2022-07-24 10:00:14 +01:00
refractionpcsx2
fc611dee57 GS-PCRTC: Remove frame offset from anti-blur hacks in software.
Turns out this is now more detrimental than an improvement
2022-07-24 09:59:58 +01:00
refractionpcsx2
de8b23db4e GS-SW: Fix framebuffer looping at 2048 height.
Also limit height read on hardware to 2048
2022-07-24 09:59:58 +01:00
Jordan
b036dcece6 GameDB: Urban Chaos fixes. (#6690) 2022-07-23 22:08:06 +02:00
BreakPoints
94c83245db GameDB: Missed R&C3 and R&C4 Fixes
Adds fixes for bloom from #6688 to remaining R&C3 and R&C4 entries
2022-07-23 16:15:51 +01:00
JordanTheToaster
c14146926a GameDB: Add COP2 patch 2022-07-23 00:13:43 +01:00
JordanTheToaster
29dffd06b3 GameDB: R&C3 and R&C4 Fixes 2022-07-22 21:35:11 +01:00
JordanTheToaster
9646d18624 GameDB: Urban Reign fixes 2022-07-22 16:37:20 +01:00
lightningterror
170d9a27ff cheats_ws: Disable unnecessary patches.
60 fps, progressive, interlace, ghosting, blur, drain, draw distance, skip draws and more.

Shouldn't be here to begin with.
2022-07-22 10:49:56 +02:00
JordanTheToaster
4d43374b31 GameDB: God Of War 2 Fixes 2022-07-22 09:30:41 +01:00
NicknineTheEagle
085332da27 GameDB: Fix glows in Disney-Pixar Ratatouille. (#6597)
Enable Auto Flush GS HW hack in Disney-Pixar Ratatouille.
2022-07-22 03:56:25 +02:00
rufotheone-fr
4dae3ee33b GameDB: check & fix of titles + add of missing serial (numbers) (#6681) 2022-07-21 17:44:37 +01:00
Daisouji
dd729ec649 QT: Change Pathing
Formatted MainWindow.cpp code
2022-07-21 11:59:00 +02:00
Daisouji
9ef582bd6f QT: Implements 2 Theming options
Added 2 New Theme options.
2022-07-21 11:59:00 +02:00
rufotheone-fr
a4fec6323c GameDB: Addition of missing serials and fixes of some titles. (#6678) 2022-07-21 02:23:29 +02:00
Alban Zekthi
4e9d56441a GameDB: Game title and Ace Combat updates. (#6600)
Fixed some game titles; added halfPixelOffset: 3 to Ace Combat 5 and Zero; adding mergeSprite: 1 to all Ace Combat
2022-07-21 02:20:33 +02:00
JordanTheToaster
af71ae9dd9 QT: Add missing gamefix dialog 2022-07-20 21:35:08 +01:00
Mrlinkwii
305563e44f Gamedb: GShw fixes for Spider-Man 2 2022-07-20 12:47:55 +01:00
lightningterror
f042fd2e88 GS-config: Remove AA1 toggle config leftovers. 2022-07-20 00:32:42 +02:00
lightningterror
5a13932dd9 GS: Remove AA1 gui condition, it will always be enabled. 2022-07-20 00:32:42 +02:00
lightningterror
06c9967971 Qt: Remove AA1 option from the gui. 2022-07-20 00:32:42 +02:00
lightningterror
6e8d667c6a Wx: Remove AA1 option from the gui. 2022-07-20 00:32:42 +02:00
noigeaR
0529ce2bc4 GameDB: Fix and add Japanese game names, apply upscaling fixes 2022-07-19 22:43:41 +01:00
kenshen112
639552ae8f CDVD: Change CDVDaccess to CDVDcommon 2022-07-19 22:36:31 +01:00
JordanTheToaster
0d1cc8581a QT: Change MTVU recommendation 2022-07-19 21:49:41 +01:00
PCSX2 Bot
ed54b55a63 PAD: Update to latest controller database. 2022-07-19 00:35:42 +02:00
C.W. Betts
12d8a1f92e fix build error when recording is disabled. 2022-07-18 10:49:09 +01:00
refractionpcsx2
ed76e54904 GS: Move force_a_one to IsCoverageAlpha function 2022-07-18 09:40:21 +01:00
refractionpcsx2
c2bb936586 GS-HW: Added DATE check for AA1
Also fix bug when DATE+FBA is on and alpha is masked (rare)
2022-07-18 09:40:21 +01:00
refractionpcsx2
42b334efcd GS-HW: Use correct alphas when AA1 is enabled + ABE disabled. 2022-07-18 09:40:21 +01:00
Mrlinkwii
56367f257a Gamedb: clean-up game titles 2022-07-18 09:35:04 +01:00
refractionpcsx2
55db243362 GUI-Qt: Avoid divide by zero on empty gamelist folder. 2022-07-18 08:47:57 +01:00
refractionpcsx2
395f4e904c GUI-Qt fix full screen toggle hotkey 2022-07-18 01:52:26 +01:00
Connor McLaughlin
3c5a39a99a GS/OpenGL: Fix incorrect detection of DXT/BPTC texture support 2022-07-17 23:40:24 +01:00
rufotheone-fr
572c3be647 GameDB: Update names for localisation (#6661) 2022-07-17 23:40:05 +01:00
Connor McLaughlin
06e7d6c3df Qt: Hide system console if enabled in nogui mode 2022-07-17 23:29:48 +01:00
Connor McLaughlin
bcde888257 Qt: Restore geometry before going fullscreen
Fixes fullscreen with separate window on another monitor popup switching
the fullscreen monitor case.
2022-07-17 23:29:48 +01:00
Connor McLaughlin
1767213321 Qt: Fix CRC in game list showing in lowercase 2022-07-17 23:29:48 +01:00
Connor McLaughlin
b36b4e4ad1 Qt: Hide main window when in fullscreen 2022-07-17 23:29:48 +01:00
Connor McLaughlin
8857eb4e78 Qt: Fix state not being saveable on separate window close 2022-07-17 23:29:48 +01:00
Connor McLaughlin
fce3414c65 INISettingsInterface: Don't try to save with no filename 2022-07-17 23:29:48 +01:00
Connor McLaughlin
f0f23a2c61 Qt: Elide redundant scan progress updates
Fixes UI locking up for ages when switching theme.
2022-07-17 23:29:48 +01:00
Connor McLaughlin
a77f78f08f Qt: Replace hotkey tabs with a scrollable view 2022-07-17 23:29:48 +01:00
Connor McLaughlin
9269792a8c Qt: Move hotkeys to VMManager, remove sorting 2022-07-17 23:29:48 +01:00
Connor McLaughlin
e87d507c0c GameList: Populate game list from cache in batch mode
Stop-gap until we make CDVD/scanning thread-safe, and can create game
list entries on demand.
2022-07-17 23:29:48 +01:00
Connor McLaughlin
5fc07180dd Qt: Add -nogui command line parameter 2022-07-17 23:29:48 +01:00
Connor McLaughlin
a35990ee4c Qt: Move Main.cpp to QtHost.cpp 2022-07-17 23:29:48 +01:00
Connor McLaughlin
7d71954674 Qt: Add search/filter toolbar 2022-07-17 23:29:48 +01:00
Connor McLaughlin
1cee55bf45 Qt: Fix game list glitching out in X11 2022-07-17 23:29:48 +01:00
Connor McLaughlin
c11ca2ff64 GS/TextureCache: Remove redundant CLUT read 2022-07-17 16:23:49 +01:00
Connor McLaughlin
f88756cb53 Qt: Add crop options 2022-07-17 15:34:20 +01:00
JordanTheToaster
54d284cdac GameDB: MGS 2 texture preload to partial 2022-07-17 12:23:57 +01:00
Mrlinkwii
011d6bebfa Github: clean-up issue templates 2022-07-16 21:41:58 +01:00
Mrlinkwii
447dc54710 Gamedb: missing serial 2022-07-16 21:38:34 +01:00
refractionpcsx2
e2ff6327eb IPU: Adjust timing on IDEC/BDEC after IPU0 transfer 2022-07-16 18:43:19 +01:00
macmmm81
a293b6fc77 Periodication 2022-07-16 11:16:03 +01:00
macmmm81
e56ffc689d GameDB: add The Sims 2 missing fixes 2022-07-16 11:16:03 +01:00
macmmm81
4cca6a72d8 GameDB: add The Sims 2 missing fixes 2022-07-16 11:16:03 +01:00
Mrlinkwii
6e79b29678 GameDB: various GSHWFixes 2022-07-16 04:07:39 +01:00
noigeaR
a432ffc0ce GameDB: fixes for Taiko no Tatsujin series
Correct names and add fixes for hw rendering and upscaling for the Taiko no Tatsujin series
2022-07-16 04:04:04 +01:00
lightningterror
205cb2c29d iCore: Fix more negative array index warnings.
Forgot these.
Codacy.
2022-07-15 17:50:41 +02:00
lightningterror
1594b46f68 iCore: Fix negative array index warning.
Codacy.
2022-07-15 15:55:38 +02:00
lightningterror
e1e7791dff Core: Bump savestate version. 2022-07-15 15:55:38 +02:00
lightningterror
d3accbc085 USB: Fix struct member 'structname::variable' is never used warnings.
Codacy.
2022-07-15 15:55:38 +02:00
lightningterror
69cc5a559e PAD: Fix struct member 'structname::variable' is never used warnings.
Codacy.
2022-07-15 15:55:38 +02:00
lightningterror
9f8f2f6730 GS-tc: Fix condition is always true warning.
Codacy.
2022-07-15 15:55:38 +02:00
lightningterror
498eb9330b USB: Fix array index 'i' is used before limits check warning.
Codacy.
2022-07-15 15:55:38 +02:00
lightningterror
6047322f0c USB: Fix a condition is always false warning.
Codacy.
2022-07-15 15:55:38 +02:00
rufotheone-fr
2ce6a031a4 Update GameIndex.yaml 2022-07-15 12:33:44 +01:00
rufotheone-fr
323bab7d4a Update GameIndex.yaml 2022-07-15 12:33:44 +01:00
refractionpcsx2
73f45b8772 GS-OGL: Remove wide line support (deprecated in OGL Spec). 2022-07-15 13:19:41 +02:00
BuildTools
a9407f055c GameDB: Disable texture preloading in Xenosaga Episode III 2022-07-15 11:05:33 +01:00
MetrosexualGarbodor
2eb1134828 GameDB: remove texture inside RT from Xenosaga Episode III 2022-07-14 15:14:03 +02:00
Mrlinkwii
7e35571b94 Gamedb: autoflush for Burnout Dominator/ Revenge 2022-07-13 20:13:05 +01:00
Mrlinkwii
19f7e3631a Gamedb: add missing MGS3 HWfixes 2022-07-12 21:09:08 +01:00
Mrlinkwii
094f2da774 Gamedb: add EEclamping for "Cowboy Bebop" and autoflush for burnout 3 2022-07-12 20:28:57 +01:00
Goatman13
1b9d22a491 GameDB: Remove Musashi SPS patches/fixes.
No needed anymore.
2022-07-12 10:02:28 +01:00
Goatman13
df1e19dd47 COP2: Fix CTC2 to R register
Only 23 bits are writable. Upper 9 bits are hardcoded to 001111111.
2022-07-12 10:02:28 +01:00
github-actions[bot]
8c4fa838fe PAD: Update to latest controller database. (#6610)
Co-authored-by: PCSX2 Bot <PCSX2Bot@users.noreply.github.com>
2022-07-11 18:11:17 +02:00
refractionpcsx2
2f6df2f9af GS: Fix scanmask interlace offsetting on even numbers 2022-07-11 15:16:11 +01:00
refractionpcsx2
446b0c2dfa GS: CLUT - check the whole page range of transfer for CLUT clear. 2022-07-11 12:19:32 +01:00
refractionpcsx2
0eb963d491 GS: Remove needless flush check on Host->Local write. 2022-07-10 17:50:05 +01:00
refractionpcsx2
156484ac80 GS: Invalidate CLUT by page
Some games (We Love Katamari) write offset inside the CLUT, and one block is only 32 colours (in 32bit) anyway, so by block is insufficient.

Also add check for CLUT invalidation from Z writes, because it *could* happen, weirder things have been done in games.
2022-07-10 17:50:05 +01:00
Mrlinkwii
6511d4c21c GameDB: fix memcard filters 2022-07-10 09:31:36 +01:00
BuildTools
e2a8c70f3d UI: Minor typo fixes 2022-07-09 22:26:58 +01:00
Mrlinkwii
53386e4d42 Gamedb: fix game titles 2022-07-09 22:26:39 +01:00
Jordan
d82d25cc10 Patches: Cleanup more ws patches. (#6595)
Removes more 60 fps codes.
2022-07-09 14:49:26 +02:00
Mrlinkwii
d79b4b2352 Gamedb: fix up game names and add HWfixes 2022-07-08 12:29:35 +01:00
refractionpcsx2
a206187802 GS: Improve clut testing, add test for local->local transfers.
Fixes Sagashi ni Ikouyo which does local->local transfers in to the CLUT so it needs flushing.
2022-07-08 11:58:21 +01:00
Mrlinkwii
e48e810005 QT: set Texture Offsets & Skipdraw Range per game only 2022-07-08 11:05:59 +01:00
Connor McLaughlin
fbac3ebad1 GS/TextureCache: Fix incorrect hashing of L/H/small textures
Fixes text getting garbled in Valkyrie Profile 2 with preloading on.
2022-07-07 12:09:40 +01:00
Jordan
c88a042c8b Patches: Cleanup cheats_ws. (#6577)
60 fps hacks do not belong in the widescreen patches archive.
2022-07-06 23:29:41 +02:00
Mrlinkwii
a78d76d143 QT: more missing descriptions 2022-07-06 20:57:36 +01:00
BuildTools
33ea0af06f Patches: Misc cheats_ni cleanup
Patches: Misc cheats_ni cleanup
2022-07-06 01:17:01 +01:00
Mrlinkwii
55a15f5a21 QT: more settings descriptions 2022-07-06 01:16:41 +01:00
Daisouji
3dd5a32cc0 QT: Adds descriptions to OSD/Post Processing Settings (#6571)
Co-authored-by: Ty <AmFobes@gmail.com>
2022-07-05 23:52:27 +01:00
Pyra Drake
0df86c6aaf GameDB: EA Sports BIO FolderMC Support (#6575) 2022-07-05 19:47:36 +01:00
Mrlinkwii
383ff6c234 QT: more missing descriptions 2022-07-05 18:02:27 +01:00
Connor McLaughlin
2cf920a1d4 CI: Add AppImage builder for Qt 2022-07-05 13:05:57 +01:00
Connor McLaughlin
dc8bb7cc2f Qt: Use same data directory as wx with XDG_STD enabled 2022-07-05 13:05:57 +01:00
Connor McLaughlin
cfe51035fb CMake: Drop unused ALSA dependency 2022-07-05 13:05:57 +01:00
Connor McLaughlin
a2afbd3080 Qt: Make status bar less confusing 2022-07-05 13:04:40 +01:00
Connor McLaughlin
dcb17243f8 ThreadedFileReader: Fix a low-chance race when closing file 2022-07-05 13:04:26 +01:00
Connor McLaughlin
6e706b3a8c Qt: Implement mouse wheel binding 2022-07-05 13:04:03 +01:00
PCSX2 Bot
f5e3d79cc7 PAD: Update to latest controller database. 2022-07-04 19:05:46 +02:00
Mrlinkwii
1febfa4f4e QT: settings descriptions 2022-07-04 11:39:18 +01:00
BuildTools
9601d0fc45 Patches: Update Persona 4 WS Patch 2022-07-04 09:57:33 +01:00
Connor McLaughlin
9f8f0262c7 Qt: Show disabled hw fixes in OSD 2022-07-03 03:59:04 +01:00
Mrlinkwii
e718a4f843 Gamedb: upscaling fixes for Kingdom Hearts - Final Mix 2022-07-02 23:50:41 +01:00
lightningterror
2257103ee6 GS-hw: Fix Wunused-but-set-variable warning. 2022-07-02 22:29:52 +02:00
Mrlinkwii
9e58aafa4a Gamedb: fixup wrong titles and add game fixes 2022-07-02 15:30:54 +01:00
BuildTools
a13096bdfe Config: Set texture preloading to full by default 2022-07-02 14:44:22 +01:00
Connor McLaughlin
53c3958b2b 3rdparty: Remove ghc::filesystem 2022-07-02 06:21:30 +01:00
Connor McLaughlin
bbc0bcae1e IopBios: Replace ghc::filesystem with our wrappers 2022-07-02 06:21:30 +01:00
Connor McLaughlin
2b52bf4539 DEV9: Replace ghc::filesystem with our wrappers 2022-07-02 06:21:30 +01:00
refractionpcsx2
40f315a259 GS: Fix CLUT changing bit depth.
This usually means the storage method changes with it, so it's a good idea to reload it
2022-07-01 17:10:26 +01:00
refractionpcsx2
f191915b53 GS: Adjust CLUT dirty checks to reduce false positives 2022-07-01 13:56:55 +01:00
lightningterror
cb0e79972d GS: Fix default config for UserHacks_CPUSpriteRenderBW for wx build. 2022-06-30 21:23:44 +02:00
Ty Lamontagne
2a980d9fc0 IOPBios: Make our hostfs HLE safer
For example, if you mkdir a path that is taken by an existing _file_, GHC would throw an exception and crash the emulator.
2022-06-30 01:19:12 +01:00
Connor McLaughlin
6daeb56550 GS: Support using SW renderer for texture decompression sprites 2022-06-29 14:03:16 +01:00
Connor McLaughlin
65ae3e1d8d Qt: Make mouse mapping opt-in (less annoying) 2022-06-29 11:55:58 +01:00
Connor McLaughlin
403b93daf6 Qt: Fix drag/drop of blockdumps 2022-06-29 11:55:58 +01:00
Connor McLaughlin
ff0380b456 Qt: Fix drag/drop of GS dumps/ELFs 2022-06-29 11:55:58 +01:00
Connor McLaughlin
e7bb6c8767 PAD: Adjust existing button pressure when modifier activated 2022-06-29 11:55:58 +01:00
MomosuWarosu
f9c7b4e441 GameDB: Upscaling fixes and region corrections for Armored Core 3/Silent Line 2022-06-29 09:34:43 +01:00
Connor McLaughlin
0540b8e1ad GS: Switch to placeholders for VM repeat mapping in Qt
This is not reliant on having larger gaps in the virtual address space,
and should never fail.
2022-06-29 09:18:20 +01:00
Connor McLaughlin
fcde6f686e Build: Bump _WIN32_WINNT to Windows 10 and link against OneCore
Necessary for us to utilize the new WinAPI functions. We just need to be
careful not to call any of these in wx, because otherwise it'll no
longer run on Win8.
2022-06-29 09:18:20 +01:00
Connor McLaughlin
444dce4aeb PAD: Fix incorrect MAX_KEYS check 2022-06-29 09:04:30 +01:00
Connor McLaughlin
1a0b8fb37f Qt: Fix window reopening after close 2022-06-29 09:04:30 +01:00
Connor McLaughlin
4fcc8abf55 Qt: Add pressure modifier button for pads 2022-06-29 01:09:29 +02:00
Connor McLaughlin
131b92e9fe Qt: Implement remove disc 2022-06-28 20:01:42 +01:00
Connor McLaughlin
5391b529b6 Qt: Implement start disc 2022-06-28 20:01:42 +01:00
Connor McLaughlin
92aea38230 GS: Reset stats on open
Fixes junk/bogus stats when switching to/from software renderer, and
when shutting down/starting a new game.
2022-06-28 20:01:42 +01:00
Connor McLaughlin
590ca98463 Qt: Implement pause on focus loss 2022-06-28 20:01:42 +01:00
Connor McLaughlin
16936aa452 Qt: Make UI thread VM valid/paused globally accessible 2022-06-28 20:01:42 +01:00
Connor McLaughlin
dedb1e0c80 Qt: Implement pause on start 2022-06-28 20:01:42 +01:00
Connor McLaughlin
63163737c2 Qt: Implement disable window resize 2022-06-28 20:01:42 +01:00
Connor McLaughlin
9f99e88c92 Qt: Fix game properties staying open after closing main window 2022-06-28 20:01:42 +01:00
Connor McLaughlin
b6f748ad8f Qt: Add option to hide main window when game running 2022-06-28 20:01:42 +01:00
Mrlinkwii
1f3f70a642 GameDB: fix game titles and add an entry 2022-06-28 20:01:20 +01:00
dio-gh
edfb59a87d Add MacOS badge to the README 2022-06-28 18:48:23 +01:00
refractionpcsx2
999b01c814 GS: Fix interlace offset for native. 2022-06-28 15:47:36 +01:00
refractionpcsx2
e7f52cbf98 GS: Fix interlace offsets for no-interlace patches 2022-06-28 09:57:23 +01:00
Mrlinkwii
311d1c805d Gamedb: add VUclamping to "NCAA March Madness 2003/2004" 2022-06-28 10:43:24 +02:00
lightningterror
2908c97432 Qt: Fix anti blur tooltip. 2022-06-28 10:35:48 +02:00
lightningterror
122423e535 Qt: Add tooltlips to System Settings. 2022-06-28 10:35:48 +02:00
lightningterror
639865f3e2 Qt: Add tooltlips to Advanced System Settings. 2022-06-28 10:35:48 +02:00
lightningterror
42e214eb17 Qt: Add tooltips to Emulation Settings. 2022-06-28 10:35:48 +02:00
refractionpcsx2
73c29d44c3 GS: Don't vmalloc inside fifo_alloc to avoid logic confusion.
Also remove a pointless check from my previous COP2 fix.
2022-06-28 09:29:47 +01:00
chaoticgd
ab6148f0b4 Config: Fix loading of SavestateZstdCompression setting
It seems like when the setting was originally added, the author
forgot to add a line to the Pcsx2Config::CopyConfig function which
meant that the setting was not loaded properly.
2022-06-28 09:13:41 +01:00
refractionpcsx2
bf0243c253 iR5900: Ignore Non delayed COP2 commands when not interlocked 2022-06-27 23:32:25 +01:00
PCSX2 Bot
b53c9daf50 PAD: Update to latest controller database. 2022-06-27 22:15:10 +02:00
refractionpcsx2
7fa482e5c6 GS: Adjust interlacing offsets to something more sensible. 2022-06-27 19:35:43 +01:00
refractionpcsx2
391bd119b8 VU: Don't clamp VF00 or I Reg 2022-06-27 14:44:57 +01:00
Connor McLaughlin
cdd9b1fa3b iR5900: Elide VU0 micro finish calls when safe
This makes a difference in COP2-heavy games, where a chain of
instructions will repeatedly test the VU0 idle bit unnecessarily, as it
is impossible for a micro to be started inbetween the instruction chain.

Saves a bit of code size (for register backup/restore), as well as
getting rid of branches. Seems to make a 1-2% difference in performance
in Ratchet on a 3900X, but if we're lucky, more on slower chips.
2022-06-27 14:44:48 +01:00
dependabot[bot]
99487d0e2b Bump mikehardy/buildcache-action from 1.2.2 to 1.3.0
Bumps [mikehardy/buildcache-action](https://github.com/mikehardy/buildcache-action) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/mikehardy/buildcache-action/releases)
- [Changelog](https://github.com/mikehardy/buildcache-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mikehardy/buildcache-action/compare/v1.2.2...v1.3.0)

---
updated-dependencies:
- dependency-name: mikehardy/buildcache-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 12:11:32 +02:00
Mrlinkwii
5ff98258df GameDB: fix up wrong titles 2022-06-27 00:21:10 +01:00
lightningterror
41bc4832f3 USB: More variable scope warnings.
Looks like there are still more, let's see if it complains more about this file.
Codacy.
2022-06-26 19:23:49 +02:00
BuildTools
69dbb2e17c Readme: Update Linux version 2022-06-26 19:03:11 +02:00
lightningterror
3dbaf96a9a USB: Cleanup more variable scope warnings.
Codacy.
Looks like I missed some.
2022-06-26 19:02:08 +02:00
Ty Lamontagne
15d8b891d6 Core: Replace old include guard with pragma once 2022-06-26 12:42:10 +02:00
Connor McLaughlin
efc09a7b47 GS/TextureCache: Unswizzle shared texture formats when hashing
Fixes formats such as PSMT4HL giving different hashes depending on what
the overlapping/shared pixels in local memory contain.

Enable this unconditionally, rather than only when dumping, because
unswizzling and hashing is around 25% faster on AVX2 builds than hashing
the backing local memory for larger textures (e.g. Star Ocean 3 menus).
Also has the added bonus of hitting the cache more often in such cases
too.
2022-06-26 03:08:57 +01:00
refractionpcsx2
6e84e5ce9c VU: YOLO T-Bit on MTVU
More games than I expected just turn T-Bit on but never actually use it, which causes poor performance in MTVU due to threading.  If there is a game that uses it, we can disable MTVU in the GameDB, since it will break the performance of the game, even if we try to handle it correctly.

Maybe we can re-enable it in the future if some threading genius figures it out.
2022-06-25 16:54:42 +01:00
refractionpcsx2
7d5d2b86cf GS: Don't do interlace offset if de-interlacing is disabled. 2022-06-25 16:46:59 +01:00
Mrlinkwii
e887600c7e Gamedb: Fix game names 2022-06-25 16:14:35 +01:00
refractionpcsx2
8216faae6e IPU: Fix GT3 regression from #6506
BTW it was totally not my suggestion to change it and I take no responsibility for the fact I bro.. I mean LT broke it.
2022-06-25 16:01:39 +01:00
lightningterror
8c1b9e1557 GS-hw: Fix redundant condition warning.
Codacy.
2022-06-25 13:26:46 +02:00
lightningterror
57595c70b0 PAD: Fix expression is always false warning.
Codacy.
2022-06-25 13:26:22 +02:00
lightningterror
cf568d2782 iR5900: Cleanup variable scope.
Codacy.
2022-06-25 11:20:53 +02:00
lightningterror
ba07e46cf8 iR3000A: Cleanup variable scope.
Codacy.
2022-06-25 11:20:53 +02:00
lightningterror
f19ba1b0db iFPUd: Cleanup variable scope.
Codacy.
2022-06-25 11:20:53 +02:00
lightningterror
51887f1cbc BaseBlockEx: Cleanup variable scope.
Codacy.
2022-06-25 11:20:53 +02:00
refractionpcsx2
539e285f86 GS: Limit the offset for FFMD to prevent over scaling. 2022-06-25 02:53:09 +01:00
refractionpcsx2
75d57640eb GS: Rework interlace offsets 2022-06-25 02:53:09 +01:00
refractionpcsx2
56316ffcca GS: Add internal FFMD offset to interlace. 2022-06-25 02:53:09 +01:00
Mrlinkwii
580dbd0905 Gamedb:Add missing serials 2022-06-25 02:29:43 +01:00
Mrlinkwii
42a394628e GameDB: upscaling fixes for "Mike Tyson Heavyweight Boxing" 2022-06-24 23:29:51 +01:00
lightningterror
0233845994 USB: Cleanup uninitialized variable.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
f42647426b IOP: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
b54521de51 iR5900: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
d7e09167fa iMMI: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
26d20e458c iFPU: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
3099d55b40 RDebug: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
72218929b9 SPU2: Cleanup variable scope.
Codacy
2022-06-24 23:32:30 +02:00
lightningterror
f99106ccb1 MemoryCardFolder: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
dd6f9c5ad3 USB: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
7d2209860e IPU: Cleanup variable scope.
Use totalqwc instead of ipu1cycles for adding cycles.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
c82a927556 GS: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
59e9d80b18 PAD: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
732d30c919 CDVD: Cleanup variable scope.
Codacy.
2022-06-24 23:32:30 +02:00
lightningterror
8586490162 Misc: Cleanup some stuff I didn't notice in previous commits. 2022-06-24 02:22:40 +02:00
lightningterror
f8a3cf2d3d README: Update requirements. 2022-06-24 02:17:38 +02:00
lightningterror
826ca5ece5 GS-hw: Update crc hack comments. 2022-06-24 01:20:28 +02:00
refractionpcsx2
73a3542ab2 Build: Fix appimage.sh 2022-06-23 23:25:46 +01:00
lightningterror
dfbe243b4c Misc: Clean up warnings.
Wsign-compare, Wunused-variable, Wunused-variable.
2022-06-23 22:48:07 +02:00
Stuart Kenny
f7d76ebf1d GS: Add lottes crt to present shader. 2022-06-22 16:26:19 +02:00
lightningterror
34c36c09ff wx: Rename gsdx to gs for window title statistics. 2022-06-22 13:58:26 +02:00
lightningterror
765dab5d8d GS: Make sure upscaling hacks are disabled on native res.
There was a regression that caused upscaling hacks to still be enabled on native res.
2022-06-22 12:58:32 +02:00
lightningterror
063d02a9cb GS-wx: Disable TX x y offsets on native res:
We already gray out the option on Qt, and it should be an upscaling hack only.
2022-06-22 12:58:32 +02:00
lightningterror
6e5e9ab7bc GS-d3d12: Remove scale factor clamp.
Already handled in config so it's duplicate.
2022-06-22 12:58:32 +02:00
Ty Lamontagne
c8c7ac45d1 CDVD: Touch-Up GZip logging messages. 2022-06-21 23:49:27 +01:00
Connor McLaughlin
14181ec70d InputManager: Fix chord bindings when activating in reverse 2022-06-21 21:53:02 +01:00
Connor McLaughlin
b20e5a1e01 VMManager: Convert to fmt
Also adds an error message when trying to save state in the BIOS.
2022-06-21 21:53:02 +01:00
Connor McLaughlin
64d222a1e4 Qt: Support binding numpad keys independently of number row 2022-06-21 21:53:02 +01:00
refractionpcsx2
e4554fe9ca CDVD: Load GZip index location direct from ini.
Stops the Qt game list from putting indexes in the default location when a custom one is used.
2022-06-21 21:51:25 +01:00
refractionpcsx2
8ec736789c GUI: Allow memcard names shorter than 4 2022-06-21 21:51:07 +01:00
refractionpcsx2
9a323a9a8d GUI: Only add extension to new memcards on save 2022-06-21 21:51:07 +01:00
MomosuWarosu
298e626b6e GameDB: Upscaling fixes added for all retail versions of Shutokou Battle 01
GameDB: Upscaling fixes for Shutokou Battle 01

GameDB: Upscaling fixes for Shutokou Battle 01
2022-06-21 21:22:03 +01:00
Blackbird88
af7308e395 GameDB: Fix name of "The Document of Metal Gear Solid 2" 2022-06-21 21:21:43 +01:00
Mrlinkwii
7c80fcacba GameDB: add missing upscaling fixes to "Xenosaga Episode III" 2022-06-21 21:21:27 +01:00
Silent
beb23efa88 XInput: Fix axis inversion when using SCP extensions 2022-06-21 17:16:44 +01:00
Christian Murphy
1b65f5f164 PAD/Core bugfix for #6472
Bugfix for https://github.com/PCSX2/pcsx2/issues/6472 which was introduced by hold turbo changes
2022-06-21 09:36:06 +01:00
PCSX2 Bot
bb336f1bc7 PAD: Update to latest controller database. 2022-06-20 21:16:38 +02:00
Connor McLaughlin
36d386b451 Qt: Fix hide mouse cursor not working with render-to-main off 2022-06-20 15:14:23 +01:00
Connor McLaughlin
9199f48a3c HostDisplay: Remove DestroyRenderDevice()/move to destructor
Saves having to remember to call this any time you destroy the display
object.
2022-06-20 15:14:15 +01:00
Connor McLaughlin
5c88c585a0 ContextWGL: Use pbuffers when we don't have a surface
Fixes context restore error tripping when confirming shutdown while
fullscreen in Qt.
2022-06-20 15:14:15 +01:00
Connor McLaughlin
771b1490d2 Qt: Get rid of redundant resume on confirm shutdown 2022-06-20 10:34:28 +01:00
Connor McLaughlin
4bbdbf6332 Qt: Fix crash on confirm shutdown when fullscreen 2022-06-20 10:34:28 +01:00
refractionpcsx2
7dc10fbe46 Docs: Add normal readme and rename documentation readme 2022-06-20 09:12:08 +01:00
Ali Mahdavi
90ca83bd96 Qt: Change the word “Save Slot” to “Load Slot” in Load State menu
First off, I must admit, I **HAVE NOT** compiled the project to see if my change breaks the whole thing or not. I just searched the entire repository for `Save Slot` and renamed the one related to `loadSaveStateSlot`.
2022-06-20 09:56:36 +02:00
Christian Murphy
4ee92fc637 Qt: Turbo (Hold) Hotkey binding
Fixes #5538
Acts as a temporary flip-flop switch while held that either enables turbo while held or disables turbo while held if you've already toggled turbo.

Default bind is Keyboard/Period but happy to make this unbound if preferred.
2022-06-20 09:55:53 +02:00
Florin9doi
1d39488061 Gamedb: DB Updates 2022-06-20 08:50:56 +01:00
MomosuWarosu
d87cd32ff4 GameDB: Upscaling fixes for Tokyo Xtreme Racer 3 2022-06-20 07:50:00 +01:00
Connor McLaughlin
2a50ae905d VMManager: Don't try to load state when none exists 2022-06-20 07:38:19 +01:00
Connor McLaughlin
f536584d7a VulkanHostDisplay: Fix uploading unaligned texture sizes 2022-06-20 07:28:12 +01:00
Connor McLaughlin
fa3bd58b7f GS: Don't show GPU OSD when timing init fails 2022-06-20 07:28:12 +01:00
Connor McLaughlin
1f5d2c49fc Qt: Split texture replacement settings to its own page 2022-06-20 07:28:12 +01:00
Connor McLaughlin
3e585c3438 Qt: Add folder settings 2022-06-20 07:28:12 +01:00
Connor McLaughlin
c23e792f68 Qt: Add folder selection to memory card settings 2022-06-20 07:28:12 +01:00
Connor McLaughlin
02d3c93c2c Qt: Allow editing folder settings 2022-06-20 07:28:12 +01:00
Connor McLaughlin
a07ef0f5ee Qt: Move logging setup into core
Sharable between frontends this way.
2022-06-20 07:28:12 +01:00
Connor McLaughlin
e415251f30 Qt: Add pad deadzone 2022-06-20 07:28:12 +01:00
Connor McLaughlin
ddbc143178 GS/DX12: Fix creating display textures mid-frame crashing 2022-06-20 07:28:12 +01:00
CharlesThobe
d54715a9c3 Updater: Do not extract portable.ini
DIO
2022-06-19 20:18:34 +01:00
refractionpcsx2
eb9507707d GS: Unset scanmsk_used after 2 frames 2022-06-19 19:36:02 +01:00
lightningterror
3377de1fe3 gitignore: Ignore dmp files in bin directory. 2022-06-19 19:05:43 +02:00
refractionpcsx2
b5807e0788 GS-PCRTC: Add option to enable/disable Anti-Blur code.
For... accuracy?

Also clean up FIELD nonsense in the merge circuit.
Fixed up offset code for interlacing
2022-06-19 16:25:13 +01:00
Connor McLaughlin
c86e82039a GS: Fix possible crash when changing settings with readbacks disabled 2022-06-19 09:32:31 +02:00
Connor McLaughlin
999b2267c0 Wx: Remove sync to host refresh rate option
Still available in Qt obviously. Apparently there's COM reinitialization
issues on the CPU thread in wx, and I don't want to deal with that nonsense.
2022-06-19 09:31:51 +02:00
Connor McLaughlin
fbf9585b5a VMManager: Auto switch to 16:9 when ws patches are enabled/found 2022-06-19 02:18:08 +01:00
Connor McLaughlin
470365644f Qt: Implement mouse->controller binding
Also implements forwarding mouse events to imgui.
2022-06-19 02:17:42 +01:00
Connor McLaughlin
7b3847cc5c Qt: Fix incorrect input popup when no vibration sources available 2022-06-18 22:58:27 +02:00
Connor McLaughlin
2b0e1a1dec Qt: Fix compiling with spaces in path on Windows 2022-06-18 22:57:51 +02:00
kmicki
316e140329 PAD: changed freeze data size in Linux for cross-platform compatibility 2022-06-18 22:56:59 +02:00
Mrlinkwii
02c4c3b03d Gamedb: add "EETimingHack" for "Strikers 1945 1-2" and gamefixes for 'Star wars episode 3 " 2022-06-18 21:51:51 +01:00
TellowKrinkle
e5405e191b Metal: Fix ImGui renderer
Turns out those were bitcasts, not conversions
2022-06-18 15:32:46 -05:00
TheLastRar
839ea61d55 DEV9: Formatting 2022-06-17 19:12:35 +02:00
TheLastRar
02f27f8cbc DEV9: Have internal DHCP use AdapterUtils 2022-06-17 19:12:35 +02:00
TheLastRar
35b5138593 DEV9: Have internal DNS use AdapterUtils 2022-06-17 19:12:35 +02:00
TheLastRar
809c5ed051 DEV9: Have pcap backend use AdapterUtils 2022-06-17 19:12:35 +02:00
TheLastRar
412451f9d6 DEV9: Have Sockets backend use AdapterUtils 2022-06-17 19:12:35 +02:00
TheLastRar
35802f2089 DEV9: Add AdapterUtils 2022-06-17 19:12:35 +02:00
TheLastRar
8f6f0f8401 DEV9: Exclude pcap NPF_ Prefix from GUID on Windows 2022-06-17 19:12:35 +02:00
refractionpcsx2
44d95badc4 GUI-WX: Add Blit description in WX gamefix panel. 2022-06-17 00:30:06 +01:00
Mrlinkwii
d622faba17 GameDB: add autoflush and upscaling fixes for "Mega Man X8" 2022-06-16 20:29:23 +01:00
noigeaR
b5945d3d5c GameDB: add missing Japanese game serials
GameDB: add missing Japanese game serials
2022-06-16 17:52:07 +01:00
Silent
52cd6fb1dd GameDB: Port the Midnight Club 3 patch to NTSC-u v2.00 2022-06-16 15:05:25 +01:00
TellowKrinkle
04681babf1 Common: Add assertion failure message to crashlogs 2022-06-15 16:23:32 -05:00
Connor McLaughlin
e63c068720 GameDatabase: Add option to force blit-based FPS detection 2022-06-15 16:21:31 +01:00
refractionpcsx2
fb5b465a4e GS: Fix overflow calculation from errantly going off. 2022-06-15 15:48:37 +01:00
RedPanda4552
59ea3c7949 GameDB: Add HPO Special (Texture - Aggressive) to Batman Vengeance 2022-06-15 15:48:18 +01:00
Mrlinkwii
6f5306dbdc GameDB: Fix game names "ICO" and add "Monster Rancher Evo" fixes 2022-06-15 15:48:01 +01:00
refractionpcsx2
b5388fdf2f GS: Only enable scanmsk offset on frames that need it 2022-06-14 23:07:21 +01:00
lightningterror
d2904c1fd5 GS: Fix up wave filter shaders. 2022-06-14 21:25:47 +02:00
kmicki
7718feedd5 PAD Linux: correct conversion of analog stick values. 2022-06-14 20:59:11 +02:00
Riccardo Marcangelo
56add277f9 GS: Migrate function pointer to lambda
Compilers can inline lambda for superior performance.
2022-06-14 20:48:37 +02:00
refractionpcsx2
86f772ad38 GS: Avoid Div by 0 on WriteImage 2022-06-14 17:51:04 +01:00
refractionpcsx2
24c99551c7 GS: Fix God of War regression from #6389 (v1.7.2937) 2022-06-14 02:12:26 +01:00
refractionpcsx2
9441d2a33a IPU: Remove some DMA hacks 2022-06-13 23:47:47 +01:00
refractionpcsx2
3922091a58 GS: New state opt optimisation pass 2022-06-13 23:47:34 +01:00
refractionpcsx2
1107ce8fd8 GS: Check whole state before flushing draws 2022-06-13 23:47:34 +01:00
Mrlinkwii
3d10cd1adf Gamedb: fix 'Sega Sports Tennis' name 2022-06-13 23:24:22 +01:00
refractionpcsx2
02ac3943f2 INTC: Give grace period after event for reading INTC
If a game is in a tight loop waiting for a bit of INTC, we could skip a bunch of cycles incorrectly.
2022-06-13 23:02:44 +01:00
refractionpcsx2
44b672b6f5 Counters/GS: Adjust FIELD swap timing for PAL
Console tests show about 3 PAL scanlines of time.
2022-06-13 23:02:44 +01:00
PCSX2 Bot
0239d8350d PAD: Update to latest controller database. 2022-06-13 18:01:50 +02:00
Mrlinkwii
bada5fe941 Gamedb: remove gamefixes form "Axel Impact - The Extreme Racing" 2022-06-12 21:48:49 +01:00
Mrlinkwii
6db871958e Gamedb: remove no longer needed patches 2022-06-12 15:40:33 +01:00
lightningterror
0b557fe265 GS/Core: Purge frameskipping.
Get rid of frameskipping, won't be added to Qt.
2022-06-12 11:43:10 +02:00
refractionpcsx2
ce08627396 GS: Reduce false positives in dev overflow errors 2022-06-12 08:03:14 +01:00
Christian Murphy
200ec5dcfb Qt: Update GameList scrolling to be per pixel to better indicate direction of scroll
Addressing issue https://github.com/PCSX2/pcsx2/issues/6237
2022-06-12 06:47:21 +01:00
Christian Murphy
8a6f55a63e Save/Load States via hotkey in QT
Addressing https://github.com/PCSX2/pcsx2/issues/6268.

Adds the commands for loading/saving all numbered states via hotkeys, leaving them all unbound by default.
2022-06-12 02:29:24 +01:00
Mrlinkwii
e327f5e6f0 Gamedb: remove patches and add upscaling fixes for 'Onimusha - Dawn of Dreams' 2022-06-12 02:28:45 +01:00
Στέφανος "Coornio/8924th" Βλαστός
5849726913 GameDB: upscale fixes, adding missing serials, name corrections, etc
See PR for details
2022-06-12 02:10:05 +01:00
Mrlinkwii
e063613a7f GameDB: add 'Axel Impact - The Extreme Racing' 2022-06-12 02:06:34 +01:00
Connor McLaughlin
48d2cb4975 Qt: Implement input profiles 2022-06-11 14:37:57 +01:00
Connor McLaughlin
59412b1673 Qt: Implement multitap 2022-06-11 14:37:57 +01:00
Connor McLaughlin
d1a235272e SettingsInterface: Add ContainsValue() and copy helpers 2022-06-11 14:37:57 +01:00
Mrlinkwii
7db9627ff6 Gamedb: Fix games names 2022-06-10 23:23:42 +01:00
lightningterror
83550cd153 github labeler: Remove nsis. 2022-06-10 15:12:03 +02:00
TellowKrinkle
77471bd9d6 GS: Avoid using both blending and fbfetch 2022-06-10 14:40:30 +02:00
lightningterror
0e94211ff1 GS: Fix Wunused-variable warnings. 2022-06-10 14:16:11 +02:00
Mrlinkwii
f6e7bba354 GameDB: Remove patch for Panzer Dragoon 2022-06-10 11:33:27 +01:00
noigeaR
b2255e5b27 GameDB: add missing serials, upscaling fixes, name corrections (#6385) 2022-06-10 09:46:25 +01:00
Mrlinkwii
7b493ff4c8 Gamedb: add upscaling fixes to 'Fast and the Furious' 2022-06-09 15:23:33 +01:00
Mrlinkwii
aeef163349 GameDB: add missing serials 2022-06-08 19:25:30 +01:00
RedDevilus
26f2352059 GameDB: Fix flag + add missing US serial
Someone in the Discord said that they had the question mark flags for these 2 serials, 1 is Virtua Fighter 4 Evolution PAL which had a typo and another is NBA Live '09 NTSC version. Quite surprising to see a missing American release in the GameDB still.
2022-06-08 15:27:53 +01:00
arcum42
67e38d8de2 Build: Update build.sh to remove a no longer used flag and add a few more. (#6124)
* Build: Update build.sh. Remove a no longer used flag and add a few new ones.

* Fix spacing on --use-system and --use-bundled.
2022-06-07 21:45:40 -07:00
Mrlinkwii
2c3a4cbabf Gamedb: fix up 'Deadly Skies III' name 2022-06-07 19:12:10 +01:00
Connor McLaughlin
fed3ea597c Qt: Add swap memory card button 2022-06-07 15:09:41 +01:00
Connor McLaughlin
547b2fc9e8 VMManager: Cycle/autoeject memory cards when files change
Hopefully should fix card changes not getting picked up in some games.
2022-06-07 15:09:41 +01:00
Connor McLaughlin
cf07f4aef1 MemoryCardFolder: Fix empty/unplugged card detecting as folder 2022-06-07 15:09:41 +01:00
Connor McLaughlin
3dc4aea053 MemoryCardFile: Open file memcards in read share mode
Fixes cards showing up as "missing" in Qt's settings dialog if you
opened the dialog after starting a game.
2022-06-07 15:09:41 +01:00
Connor McLaughlin
afa29facc6 FileSystem: Add OpenSharedCFile() 2022-06-07 15:09:41 +01:00
Connor McLaughlin
8c0120bdbb GS/Vulkan: Fix uploading compressed replacement textures 2022-06-07 13:49:51 +02:00
Silent
a3e72c5b43 Updater: Disable Maximize and Close buttons 2022-06-07 13:14:00 +02:00
Silent
33efc86788 Updater: Thread the UI updates, add a taskbar progress bar, add a marquee progress bar for indeterminate actions 2022-06-07 13:14:00 +02:00
Mrlinkwii
ec6be34c31 Gamedb: add disablePartialInvalidation to snowblind engine games 2022-06-07 11:44:05 +01:00
iMineLink
fd49a1e80a GS: preserve target on different format write.
affects hardware texture cache.
2022-06-07 10:49:01 +01:00
Dreadmoth
d1d6855d58 Qt: Fix Disable Depth Emulation tooltip 2022-06-07 09:02:56 +01:00
lightningterror
504b9e7051 Qt: Fix Texture Offsets tooltip. 2022-06-07 02:28:12 +02:00
Mrlinkwii
9cb64fd087 GameDB: add HW fixes for 'Raging Bless' 2022-06-06 22:27:52 +01:00
refractionpcsx2
fe9ccf55c1 GS: Allow same src for DISPFB when using 32bit + 24bit 2022-06-06 21:07:08 +01:00
PCSX2 Bot
4840da2c1b PAD: Update to latest controller database. 2022-06-06 19:21:56 +02:00
Connor McLaughlin
543fb282fe VMManager: Set affinities for threads 2022-06-06 17:44:06 +01:00
Connor McLaughlin
9b7ae498d2 3rdparty: Add cpuinfo 2022-06-06 17:44:06 +01:00
refractionpcsx2
5668bcf19b IOP: Revert a change from #6267
Think this was a misunderstanding of how the interrupts worked (was actually one shot)
2022-06-06 15:06:29 +01:00
refractionpcsx2
66c25b3cb6 GS: Auto adjust aspect when using Offsets + Overscan 2022-06-05 23:12:08 +01:00
refractionpcsx2
e234fb32d9 GS Add horizontal overscan 2022-06-05 23:12:08 +01:00
refractionpcsx2
f70c67ad7f GS: Add option to show vertical overscan 2022-06-05 23:12:08 +01:00
refractionpcsx2
cf3cfdb2bc GS: Correctly handle field/deinterlace for progressive/interlaced mode.
Also correct the number of scanlines for progressive (double strike) and how long vblank is.
2022-06-05 22:37:26 +01:00
Connor McLaughlin
394f1f2049 Vulkan: Enforce 32 byte alignment for uploads
It blows up on AVX2 stores on some drivers if we don't (e.g. AMD Linux).
2022-06-05 21:29:42 +01:00
Connor McLaughlin
a9819542d4 GS: Split convert and present shaders 2022-06-05 21:27:16 +01:00
Στέφανος "Coornio/8924th" Βλαστός
d0e3b8c4ee fix dump n.1 2022-06-05 21:26:01 +01:00
refractionpcsx2
e3681cf993 GS: Be generous with the resolution for no-interlace patches 2022-06-05 21:21:13 +01:00
Mrlinkwii
26c717a1bf Gamedb:add upscaling fixes for 'Test Drive' 2022-06-05 21:00:35 +01:00
refractionpcsx2
6efdbf2950 GIF: sync GIF packet ends 2022-06-05 16:50:20 +01:00
refractionpcsx2
b45b082c06 IPU: Wait for IPU_FROM to be ready 2022-06-05 16:50:09 +01:00
lightningterror
da21a649c0 Qt: Add tooltips to Graphics section.
Most of them are ported from WX.
2022-06-05 14:00:50 +02:00
TellowKrinkle
347736f2b4 GHActions:macOS: Add Qt SVG plugin 2022-06-04 22:28:15 -05:00
lightningterror
a6649b2d6b GS: Fix SkipDuplicateFrames default config. 2022-06-05 00:01:19 +02:00
Mrlinkwii
33a78c1919 Gamedb: add missing serials 2022-06-04 22:08:12 +01:00
Mrlinkwii
3b4b669038 Gamedb: add patch for 'Transformers - Revenge of the Fallen' 2022-06-04 21:03:19 +01:00
Mrlinkwii
26b666abcd Gamedb: fixes for 'Call of Duty - Le Jour de Gloire' 2022-06-04 20:25:19 +01:00
Mrlinkwii
32e2a8ba2c GameDB: add HW fixes for snowblind engine games 2022-06-04 19:37:50 +01:00
Angel Toloza
fdc399b44c GameDB: Mana Khemia
Fixes misalignment of textures in the Pause Menu.
2022-06-04 19:20:07 +01:00
Connor McLaughlin
ec43661664 GS: Add sync to host refresh rate option 2022-06-04 18:43:07 +01:00
Connor McLaughlin
a05a655037 HostDisplay: Create swap chain in CreateRenderDevice() for D3D
Fixes starting in exclusive fullscreen mode in Qt.
2022-06-04 18:15:59 +01:00
Connor McLaughlin
ca3833e71b VulkanHostDisplay: Avoid redundant resizes 2022-06-04 18:10:46 +01:00
Connor McLaughlin
3910b047d4 InputManager: Fix incorrect default keyboard R2 binding 2022-06-04 18:10:46 +01:00
Connor McLaughlin
15c1381c1e VMManager: Add input profile loading 2022-06-04 18:10:46 +01:00
Connor McLaughlin
c0e65d9a36 vtlb: Add RAM accessors which avoid hw access 2022-06-04 18:10:46 +01:00
Connor McLaughlin
38ff490b60 HostSettings: Add writer functions 2022-06-04 18:10:46 +01:00
Connor McLaughlin
f8fa41d4bf VulkanHostDisplay: Upload textures in init command buffer 2022-06-04 18:10:46 +01:00
Connor McLaughlin
b74c65cc7c GS: Make reopen fails non-fatal
It'll restore the old configuration instead.
2022-06-04 18:10:46 +01:00
Connor McLaughlin
624e5ae633 VMManager: Force reloading of LastELF on state load 2022-06-04 18:10:46 +01:00
Connor McLaughlin
71935e7099 VMManager: Relax memory ordering for state
CST is definitely overkill here.
2022-06-04 18:10:46 +01:00
Connor McLaughlin
bb9a551318 MTVU: Use Thread wrapper 2022-06-04 18:10:46 +01:00
Connor McLaughlin
457ec7f6f5 Threading: Add lightweight thread wrapper 2022-06-04 18:10:46 +01:00
Connor McLaughlin
433b88c0bf GS/TextureReplacements: Be more lax about header flags 2022-06-04 18:10:46 +01:00
Connor McLaughlin
9f8911536a GS/OpenGL: Use feature flag for D32F/D32FS8 selection 2022-06-04 18:10:46 +01:00
Connor McLaughlin
eeb09c54d8 GS/DX12: Use correct state for texture staging buffers 2022-06-04 18:10:46 +01:00
Connor McLaughlin
52a3777aae Qt: Convert webp flags masquerading as png to png 2022-06-04 18:10:46 +01:00
Connor McLaughlin
ea1f451d35 Qt: Move flag/star icons to resources 2022-06-04 18:10:46 +01:00
Connor McLaughlin
28795e549b GS/Qt: Represent the current frame on resize when paused
Stops the frame displayed with incorrect proportions.
2022-06-04 18:10:46 +01:00
Connor McLaughlin
0a667bf18a SettingsInterface: Add optional accessors/mutators 2022-06-04 18:10:46 +01:00
Connor McLaughlin
2d8a4e13e6 GS: Fix a bunch of texture copy counters not adding 2022-06-04 18:10:46 +01:00
Connor McLaughlin
f1702b5693 Qt: Force game list column resize on window show
Fixes a regression from dbfb93a50f where
the game list columns would always be too short on open.
2022-06-04 18:00:06 +01:00
Connor McLaughlin
b89d0837a6 Qt: Avoid spamming resize events on paint
This caused long freezes on Windows when you dragged the window around,
because it was sending a paint event for every movement.
2022-06-04 17:27:55 +01:00
TellowKrinkle
cba6a6ec51 Qt: Add preferences button to menu system
Important on macOS to get the expected keyboard shortcut
2022-06-04 14:50:33 +01:00
TellowKrinkle
d74623faf9 Qt: Support DPI change events 2022-06-04 14:50:33 +01:00
TellowKrinkle
db4bf08475 GHActions:macOS: Add Qt build 2022-06-04 14:50:33 +01:00
TellowKrinkle
f9c2327bf5 Qt: Respond to dark/light mode changes 2022-06-04 14:50:33 +01:00
TellowKrinkle
beab9870cf Common: Move ObjC methods to CocoaTools 2022-06-04 14:50:33 +01:00
TellowKrinkle
dbfb93a50f Qt: Calculate icon theme from palette instead of name 2022-06-04 14:50:33 +01:00
TellowKrinkle
6b66cd7f29 Qt: Remove [Light] from Native theme
It's whatever your system theme is set to, be that light or dark
2022-06-04 14:50:33 +01:00
TellowKrinkle
08089e0654 Qt: Set isMask to true on menu items
Prevents icons from being the wrong color when the Qt theme doesn't match the macOS system theme (or when you use Native theme with dark mode)
2022-06-04 14:50:33 +01:00
TellowKrinkle
b2ef973f16 Qt: Fix game summary field size on macOS 2022-06-04 14:50:33 +01:00
TellowKrinkle
d862f8cd53 Qt: Fix SDL initialization crash on macOS 2022-06-04 14:50:33 +01:00
TellowKrinkle
9c61e9eda3 Qt: Mac build 2022-06-04 14:50:33 +01:00
Goatman13
dc000e08ab GameDB: Add more Onimusha 3 HW fixes.
Fixes textureless graphics ingame.
2022-06-04 14:27:16 +01:00
Goatman13
5469d59de9 IPU: Set ECD if start code is not 1xx
Onimusha 3 send 0x200 and expect that start code search finish on it.
Setting ECD here helps The Sims Bustin' Out
2022-06-04 14:27:16 +01:00
refractionpcsx2
37f640ece2 IPU: Always process command if busy on DMA run 2022-06-04 13:30:48 +01:00
refractionpcsx2
906898c785 Savestates: Add developers comment for commit log messages 2022-06-04 04:57:37 +01:00
TheTechnician27
30f6c5f8f1 Update README.md to reflect project's age. 2022-06-04 02:36:13 +01:00
refractionpcsx2
1a2059c0f1 IOP Counters: Fix up interrupt behaviour
Also replace some magic values with macro/enum type thingies
2022-06-04 02:28:56 +01:00
RedDevilus
4fb0050411 GameDB: Forbidden Siren 2
Fixes vertical lines in-game (merge sprite) and FMV (software renderer gamefix)
2022-06-04 02:25:26 +01:00
refractionpcsx2
5708fb1668 IPU: add slight timing to IDEC/BDEC
Modify IPU to run on internal interrupts to give some timing
2022-06-04 01:46:01 +01:00
refractionpcsx2
870604d64c Savestates: Add new IPU variable and bump version 2022-06-04 01:46:01 +01:00
refractionpcsx2
9f4bf4267d IPU: Stop early IPUProcessInterrupt fires. 2022-06-04 01:46:01 +01:00
refractionpcsx2
5c15d57f5f IPU: Reorder DMA timing for IPU_TO and IPU_FROM 2022-06-04 01:46:01 +01:00
Mrlinkwii
6e1f76185e GameDB: add patches for 'Harry Potter and the Half-Blood Prince' 2022-06-03 23:00:05 +01:00
Goatman13
7fe5ba480c GameDB: Replace Choro Q HG, and Penny/Gadget Racers patches.
Replace patches to less invasive solution. No longer need to skip movies, or skip SetVSyncFlag.
2022-06-03 18:25:56 +01:00
RedDevilus
2333ff7b2d Qt: Bump Cache + new other icon 2022-06-03 16:23:54 +01:00
RedDevilus
5063961748 Qt: Readability and prevents false matches regions
Code readability is easier if you check out this page and also prevents false matches like PAL-FI which is a Finnish game would trigger PAL-F which gives a French flag.
2022-06-03 16:23:54 +01:00
RedDevilus
815c0a394d Qt: Adding back BIOS flags
The old code was still being used for getting the icons but they were renamed and moved into another folder. Oops!
2022-06-03 16:23:54 +01:00
RedDevilus
6d3f42a441 Qt: Change array and rename flags to region 2022-06-03 16:23:54 +01:00
RedDevilus
4b76594d8d Qt: Add array and look-up for flags
Stenzek doesn't love a lot for variables which impacts code readability, put into array for ease his mind.
2022-06-03 16:23:54 +01:00
RedDevilus
f5144f33da Qt: Move flags to seperate folder 2022-06-03 16:23:54 +01:00
RedDevilus
03f7e9e15a Qt: More flags and regions + enabling more icons
In reality it will show multiple flags like Korean flag but the flags aren't correct due to the structure in the GameDB actually being the languages more than the actual region.
At least people will have Korean flags and others for now and fix GameDB later as it's still a nightly/development cycle.

Though there are about 30 country flags included for future usage as of now.
2022-06-03 16:23:54 +01:00
Blackbird88
a8baa4b67c GameDB: Added Tourist Trophy VU clamp fix 2022-06-03 13:52:50 +01:00
RedDevilus
f40bebed3b GameDB: Fix line in the sky for Jak games
Read the description...
2022-06-02 18:25:35 +01:00
RedDevilus
5a036e572b GameDB: Remove Kingdomhearts 1/2 GShwfixes
Issues with texture cache reveal themselves so best to remove it.
2022-06-02 18:25:16 +01:00
Mrlinkwii
cd31f5fceb GameDB: upscaling fixes for 'Tokyo Xtreme Racer Drift 2' 2022-06-02 00:45:08 +01:00
Mrlinkwii
f812174270 Gamedb: fix game title typos 2022-06-01 21:39:33 +01:00
nev3rfail
aeaeb8ba94 GS/TextureReplacement: Ignore replaced textures in DumpTexture 2022-06-01 20:15:16 +02:00
Florin9doi
2adeb401ff Gamedb: PlayStation BB Navigator 2022-06-01 12:38:19 +01:00
Florin9doi
52325cb7dd Gamedb: Jissen Pachi-Slot Hisshouhou 2022-06-01 12:38:19 +01:00
Florin9doi
6265bbf99a Gamedb: Web browsers 2022-06-01 12:38:19 +01:00
Mrlinkwii
8c0c9a5e29 PAD: fix typo in UI 2022-06-01 12:09:03 +01:00
Florin9doi
8638c73a4e Gamedb: DVD Player 2022-06-01 11:01:00 +01:00
Florin9doi
d2d4038357 Gamedb: Chou! Rakushii Internet Tomodachi Nowa 2022-06-01 10:36:23 +01:00
refractionpcsx2
f8fdbaf566 CheatsWS: Remove bad Herdy Gurdy WS patch 2022-05-31 19:12:53 +01:00
Stuart Kenny
0b2536dd3e GS/HW: Fix typos in wave filter shader 2022-05-31 17:36:16 +01:00
Mrlinkwii
b2b7d8d64e Gamedb: remove patch from 'Boku to Mao' 2022-05-31 16:17:22 +01:00
Stuart Kenny
67c34794e8 Qt: wire in tv shaders 2022-05-31 15:22:47 +01:00
Dreadmoth
30f0cdde6f GameDB: Add missing serial
Secret Agent Clank (PAL-M12) [SCES-55496]
2022-05-31 16:08:13 +02:00
TheLastRar
71637cc282 DEV9: Clang format Qt files 2022-05-31 13:57:24 +01:00
TheLastRar
56402db7ee DEV9: Add DNS host export/import 2022-05-31 13:57:24 +01:00
TheLastRar
3e76d380a1 DEV9: Move helper Qt classes into a separate file 2022-05-31 13:57:24 +01:00
Connor McLaughlin
4873165dbc PAD/Host: Fix unconditionally sending state for disconnected ports 2022-05-31 12:12:44 +01:00
Connor McLaughlin
277706505e PAD: Make controller info public 2022-05-31 12:12:44 +01:00
Stuart Kenny
9f09aa725b pad: Expose Analog mode button. 2022-05-31 11:35:13 +01:00
Connor McLaughlin
06fee385e1 Tests: Add unit tests for UNC paths on Win32 2022-05-31 11:01:14 +01:00
Connor McLaughlin
dc4ef1163f Qt: Add logging of early directory setup
Makes debugging this stuff easier in the future.
2022-05-31 11:01:14 +01:00
Connor McLaughlin
2928837b76 Qt: Add command line parameter to force early console log 2022-05-31 11:01:14 +01:00
Connor McLaughlin
a5124b118b FileSystem: Fix splitting UNC paths 2022-05-31 11:01:14 +01:00
Connor McLaughlin
e7db878188 GS: Clamp tex-in-rt source rectangle to rt bounds
Fixes GPU crash for DX12 in Ridge Racer V. Game still has broken car
textures.
2022-05-31 10:58:45 +01:00
lightningterror
0b164a7989 github labeler: Add/adjust renderer labels based on current renderers. 2022-05-31 01:14:20 +02:00
Mrlinkwii
a4088685a0 Gamedb: Fix up some game names and add upscaling fixes for 'Xenosaga' 2022-05-30 22:48:18 +01:00
TellowKrinkle
fc06963c56 Common: Implement screensaver prevention on macOS 2022-05-30 16:38:01 -05:00
PCSX2 Bot
9680e7460c PAD: Update to latest controller database. 2022-05-30 21:43:49 +02:00
Connor McLaughlin
271e53a6bf Assertions: Fix message not being included for pxAssert() 2022-05-30 10:20:44 +01:00
RedDevilus
3888483fb4 GameDB: Reflect some new regions + new serials
In case of new centralised way of regions like the flag icons for Qt and adding some new serials.
2022-05-30 10:00:06 +01:00
RedDevilus
d67e72912c Qt: Fix DPI scaling 125% + higher quality icons
Upscaling on Qt didn't work properly as Windows calculates it differently, it's better to give far larger pictures and icons and let it downscale.

Also added most country flags that are relevant for PCSX2.

Reduces size icons from 3.5 MB to a whopping 0.34 MB (340 KB!) but looks even better for everyone.

Hopefully fixes #6255
2022-05-30 10:00:06 +01:00
refractionpcsx2
b843989719 Clang: Format GS.h 2022-05-30 09:48:26 +01:00
refractionpcsx2
7717450044 GS: Fix CSR.FIELD for progressive mode 2022-05-30 09:48:26 +01:00
TellowKrinkle
98947c10bb wx: Fix assert on settings panel 2022-05-30 09:48:13 +01:00
TellowKrinkle
6aa7266084 Core: Fix LnxFlatFileReader FinishRead return 2022-05-30 09:46:53 +01:00
TellowKrinkle
bd5656bf89 Core: Fix DarwinFlatFileReader FinishRead return
Looks like the return value is expected to be the number of bytes read
2022-05-30 09:46:53 +01:00
TellowKrinkle
1e4795e653 CDVD: BlockDumpFileReader formatting 2022-05-30 09:46:53 +01:00
Goatman13
c8e0090870 GameDB: Remove few IPU patches
No longer needed.
2022-05-30 01:24:31 +01:00
Goatman13
2dd9d8338b IPU: Implement start code validation for BDEC/IDEC
According to MPEG specs when 8 "0" bits are found, we should check for 000001xxh. Recommended way is to check 24 bits (000001h), and if they won't match discard 8 bits and try again until valid code is found, or stream ends.
2022-05-30 01:24:31 +01:00
Mrlinkwii
8d3c82de19 Gamedb: upscaling fixes for 'Need for Speed: Hot Pursuit 2' 2022-05-30 00:37:04 +01:00
Mrlinkwii
3bff10e17d Gamedb: add upscaling fixes for ' The Sims 2 pets' 2022-05-29 23:15:44 +01:00
refractionpcsx2
6562a5191a MTGS: Fix GS reset behaviour 2022-05-29 22:03:02 +01:00
Connor McLaughlin
5ef159876a Build: Don't rewrite svnrev.h unconditionally
Stops VS from recompiling the files which include it every time you hit
run.
2022-05-29 16:19:08 +01:00
Mrlinkwii
1bb86d8984 GameDB: remove gameFixes for 'nfl street 3' 2022-05-29 16:17:15 +01:00
Connor McLaughlin
edd735ce80 GS: Read local memory without sync when readbacks are disabled 2022-05-29 16:15:34 +01:00
Connor McLaughlin
4fd06b5ea8 GS: Clear current/merge textures on hardware reset 2022-05-29 16:15:18 +01:00
Connor McLaughlin
f6d997ca87 GS: Clear local memory on hardware reset 2022-05-29 16:15:18 +01:00
Connor McLaughlin
5963efcec8 GS: Get rid of redundant pointers to VM 2022-05-29 16:15:18 +01:00
Silent
f8fbfee49d GameDB: Add Auto Flush for 24 - The Game
Fixes pause menu backgrounds.
2022-05-29 14:34:15 +01:00
Mrlinkwii
4d7ee63d77 GameDB: remove gameFixes from'NFL Street 2' 2022-05-29 14:30:16 +01:00
Mrlinkwii
21b97f68fa Config: Remove unused macro from superVU. (#6240) 2022-05-29 01:04:24 +02:00
refractionpcsx2
95c91b4dc6 GS-TC: Preserve scale when resizing target for display. 2022-05-28 23:59:31 +01:00
Mrlinkwii
ca1b35a351 GameDB: add missing serials 2022-05-28 23:27:48 +01:00
Mrlinkwii
84177d38d4 GameDB: update 'Growlanser Generations' name 2022-05-28 19:28:14 +01:00
Mrlinkwii
e21589da86 Gamedb: fix up some game titles 2022-05-28 18:56:13 +01:00
refractionpcsx2
0768971f35 GS: Bug fix Scissor Optimization 2022-05-28 14:29:37 +01:00
Mrlinkwii
6c42a7f6e4 GameDB: fix up game names 2022-05-28 13:51:57 +01:00
Connor McLaughlin
a65f3bd116 GS/DX12: Fix incorrect blend factor for primid DATE 2022-05-28 05:50:21 +01:00
Connor McLaughlin
822e508d13 D3D12: Don't call GetGPUDescriptorHandleForHeapStart() on non-shader-visible heaps 2022-05-28 05:50:21 +01:00
RedDevilus
1611aeedce GameDB: Tales of Legendia + Batman Begin + ...
- Added FMV switch for Tales of Legendia which can show garbage textures
- Added Batman Begins (Autoflush and Special Texture half pixel offset for the lighting misalignment)
- Some extra clean-up on Spartan - Total Warrior
2022-05-28 05:49:36 +01:00
refractionpcsx2
7c243756bc GS: Better swapped draw direction detection on scissor opt 2022-05-28 04:42:33 +01:00
refractionpcsx2
43b53df0a0 Patches: Make cheats_ws.zip search case insensitive 2022-05-28 03:32:43 +01:00
C.W. Betts
66c6c2400a Some Qt for Mac fixes. 2022-05-27 21:21:48 -05:00
Connor McLaughlin
30096a5ae4 Qt: Add hardware check for SSE4 and AVX2 2022-05-27 17:39:09 +01:00
refractionpcsx2
c70afc24bd GUI/Qt: Prioritize serial in cover lookup 2022-05-27 11:34:39 +01:00
Connor McLaughlin
ce53b7adb1 Qt: Implement drag/drop to main window 2022-05-27 09:55:02 +01:00
Connor McLaughlin
25fa70fe9e Qt: Fix loading save state from manual file 2022-05-27 09:55:02 +01:00
RedDevilus
724957fbec Qt: Revision default hotkeys
There has been a re-order of keybindings, new keybindings and missing Single Frame GS Dump, Multi Frame GS Dump, Input Recording mode.

To be decided for the rest.
2022-05-26 19:27:04 +01:00
TellowKrinkle
9084ef35b4 GS:SW: Restore zequal for optimization 2022-05-26 03:51:39 -05:00
TellowKrinkle
e58b1054ea GS:SW: Use restrict on DrawTriangleSection
Improves compiler optimization
2022-05-26 03:51:39 -05:00
TellowKrinkle
24de0866f7 GS:SW: Don't interpolate xy fields for scanlines
By that point, xy is what's being used to advance the scanline and won't be needed as a parameter
2022-05-26 03:51:39 -05:00
TellowKrinkle
0cec99361b GS:SW: Use floats for zskip 2022-05-26 03:51:39 -05:00
TellowKrinkle
8ba745030a GS:SW: Hold double z in registers more 2022-05-26 03:51:39 -05:00
TellowKrinkle
4ddf897719 GS:SW: Use doubles for Z calculation 2022-05-26 03:51:39 -05:00
TellowKrinkle
9be7eb67d8 GS:SW: Rearrange GSVertexSW members to better match planned DoubleZ arrangement
Note: Removes zequal.  DoubleZ will fix, but until then things will break
2022-05-26 03:51:39 -05:00
TellowKrinkle
56bba522ac GS:SW: Unvectorize unneccessarily-vectorized things 2022-05-26 03:51:39 -05:00
TellowKrinkle
b6c1b3fb96 GS: Add double operations to GSVector/GSNewCodeGenerator 2022-05-26 03:51:39 -05:00
TellowKrinkle
82de13d95a GS: Better cxpr GSVector init 2022-05-26 03:51:39 -05:00
TellowKrinkle
92dd6fb575 GHActions: Improve macOS artifact name for tagged builds 2022-05-26 03:26:12 -05:00
TellowKrinkle
ced58a047d CMake: Set fp-contract=fast
Clang defaults to off, everyone else defaults to on or fast.  Allows multiplies and adds to be merged into fma
2022-05-25 21:56:21 -05:00
refractionpcsx2
2d98b877a2 Patches-NI: Remove broken Silent Hill 3 patch 2022-05-26 00:54:59 +01:00
Master Builder
a26b91291c Common/Linux/LnxHostSys: Fixed compatibility issues with FreeBSD, made error
handling more explicit
2022-05-26 00:28:44 +02:00
Connor McLaughlin
46a649afc1 GS: Add Skip Presenting Duplicate Frames option 2022-05-25 23:24:44 +01:00
Connor McLaughlin
3ce242886b VMManager: Disable symbol map update on Qt
Until it's implemented.
2022-05-25 23:24:30 +01:00
Connor McLaughlin
3b5538a09c VMManager: Fix no ws/ni patches message showing up on reset 2022-05-25 23:24:30 +01:00
Connor McLaughlin
796519f6a7 D3D12HostDisplay: Fix vsync 2022-05-26 00:04:46 +02:00
Connor McLaughlin
2365a9caab D3D12/Texture: Fix incorrect resource state for fallback staging buffer 2022-05-26 00:04:46 +02:00
Connor McLaughlin
425b5d0478 BlockdumpFileReader: Extra error checking to detection 2022-05-25 14:08:54 +01:00
Connor McLaughlin
628560850a CDVD: Fix crash when trying to scan small gzip files 2022-05-25 14:08:54 +01:00
Tzerinas
69f058e532 GameDB: Removes missed french Tak fmv fix 2022-05-25 12:12:03 +01:00
Mrlinkwii
c66b660c10 GameDB: more removal of software FMV fixes from games 2022-05-25 11:56:38 +01:00
Mrlinkwii
4fdb3322cc Gamedb: remove software FMV fixes from games 2022-05-25 11:33:24 +01:00
Connor McLaughlin
73122400e3 GSTextureCache: Expand target to fit readout height
This handles a case where you have two images stacked on top of one another (usually FMVs), and
the size of the top framebuffer is larger than the height of the image. Usually happens when
conservative FB is on, as off it'll create a 1280 high framebuffer.

The game alternates DISPFB between the top image, where the block pointer matches the target,
but when it switches to the other buffer, LookupTarget() will score a partial match on the target
because e.g. 448 < 512, but the target doesn't actually contain the full image. This usually leads
to flickering. Test case: Neo Contra intro FMVs.

So, for these cases, we simply expand the target to include both images, based on the read height.
It won't affect normal rendering, since that doesn't go through this path.
2022-05-25 10:51:54 +01:00
refractionpcsx2
d1cdfafe22 Qt: Fix auto updater
CI didn't build it, so we missed it lol
2022-05-25 10:28:43 +01:00
Connor McLaughlin
91e8a2cf0e Qt: Fix adding multi bindings from pad 2022-05-25 10:15:48 +01:00
Connor McLaughlin
b5721a92e9 Misc: Fix a bunch of recent warnings from clang 2022-05-25 10:15:48 +01:00
Connor McLaughlin
cefe4b773c Qt: Add clear bindings button to controllers 2022-05-25 10:15:48 +01:00
Connor McLaughlin
332346449f Qt: Remove presets dropdown, hide restore defaults
Until it's implemented.
2022-05-25 10:15:48 +01:00
Connor McLaughlin
2c199e7c42 Qt: Add log timestamps 2022-05-25 10:15:48 +01:00
Connor McLaughlin
2a32864856 Qt: Get rid of duplicate base setting query helpers 2022-05-25 10:15:48 +01:00
Connor McLaughlin
9481bbd2ef Qt: Add OSD message when block dumps are enabled 2022-05-25 10:15:48 +01:00
Connor McLaughlin
08aad5461e Qt: Add block dump options 2022-05-25 10:15:48 +01:00
Connor McLaughlin
0bab9474ae Qt: Add file logging option 2022-05-25 10:15:48 +01:00
Connor McLaughlin
1f802eca46 Common: Redo assertions, purge DiagnosticOrigin 2022-05-25 10:15:48 +01:00
Mrlinkwii
a02df6c980 GameDB: add 'disablePartialInvalidation' to 'Shadow Hearts 2' 2022-05-24 23:34:57 +01:00
refractionpcsx2
e0194b2b95 GUI: Enable verbose messages for patch loading. 2022-05-24 20:31:36 +01:00
RedDevilus
74f4886ea6 GameDB: Revise serial names + GsHWFixes
With Qt being released there were still illegal characters being used in the name, also found some random typo mistakes.

Fixes #6170

GsHWFixes:
- Ratatouille
- Wild Arms series
- Tony Hawk Downhill Jam
2022-05-24 20:27:50 +01:00
refractionpcsx2
d9119921de GS: Limit interlace offset to FFMD mode.
The offset is only really needed when the game is rendering half frames and expects a certain amount of offset.
2022-05-24 18:03:07 +01:00
refractionpcsx2
4a12ec6fc0 GS: Add option to disable Interlace Offset 2022-05-24 18:03:07 +01:00
refractionpcsx2
0c855cdd6d GS: Update interlacing on Metal 2022-05-24 18:03:07 +01:00
refractionpcsx2
89d44a5f60 GS: Offset interlace when upscaling 2022-05-24 18:03:07 +01:00
Connor McLaughlin
aa47018197 Qt: Apply patches on entry point compile
Fixes WRC4's entrypoint patch not being used.
2022-05-24 18:00:59 +01:00
refractionpcsx2
d5cd2446e4 GUI/Qt: Use higher quality icon 2022-05-24 17:59:05 +01:00
lightningterror
eb386fb0fb Qt: Gray out language selection.
Not yet implemented.
2022-05-24 16:59:26 +02:00
Connor McLaughlin
cb24b84bff Add cheats_ni.zip 2022-05-24 12:50:43 +01:00
Connor McLaughlin
d65522a9b4 VMManager: Add no-interlacing patches 2022-05-24 12:50:43 +01:00
Connor McLaughlin
fa91d0b705 Qt: Make relationship between vsync queue/optimal pacing clearer 2022-05-24 11:34:56 +01:00
Connor McLaughlin
ae43cfaaf2 R5900: Fix format string for TLB misses etc 2022-05-24 11:34:56 +01:00
Connor McLaughlin
8bbcb05303 MultipartFileReader: Fix use-after-free when opening multipart files
Also fixes loading uppercase filenames on Linux.
2022-05-24 11:34:56 +01:00
Connor McLaughlin
f2713462cc Qt: Fix starting after theme change 2022-05-24 11:34:56 +01:00
refractionpcsx2
ac9d406862 Adding FUNDING file
Adds a button to the project
2022-05-23 19:20:19 +01:00
Connor McLaughlin
74738022da Qt: Use SERIAL_CRC.ini naming for per-game settings 2022-05-23 17:27:11 +01:00
PCSX2 Bot
aae8d5d639 PAD: Update to latest controller database. 2022-05-23 18:20:41 +02:00
lightningterror
372ee9b6b6 Qt: Allow to load/browse block dump files. 2022-05-23 18:19:14 +02:00
lightningterror
943e21f507 Qt: Fix link/url colours in various themes.
Fixes #6148
2022-05-23 17:11:29 +02:00
Connor McLaughlin
b6308bab4f Qt: Initialize COM ourselves on EmuThread
If we don't, SDL initializes it first in STA mode, which prevents MT
mode from being used, which prevents us from using XAudio2.
2022-05-23 15:45:53 +01:00
Connor McLaughlin
6a4df2a641 GS: Move GSinit()/GSshutdown() to GS thread
This initializes COM, so it has to be done on the thread which is
actually going to use it.
2022-05-23 15:45:53 +01:00
lightningterror
a92eb4d10a Qt: Disable/remove unused buttons.
Not implemented yet.
2022-05-23 16:32:02 +02:00
Mrlinkwii
c03e52c06f GameDB: upscaling fixes for 'KimiKiss' 2022-05-23 13:35:42 +01:00
Christian Kenny
66e663757a NSIS: Remove installer as it is is not compatible with Qt 2022-05-23 13:11:46 +01:00
Connor McLaughlin
d279f61d0b VMManager: Clear memory card eject timeout when game starts
If we don't reset the timer here, when using folder memcards
the reindex will cause an eject, which a bunch of games don't
like since they access the memory card on boot.
2022-05-23 13:11:06 +01:00
Connor McLaughlin
b59d4791cf Qt: Fix game grid scale/title setting not loading 2022-05-23 13:09:41 +01:00
Connor McLaughlin
680a3802d7 Updater: Remove update zip after committing 2022-05-23 13:09:41 +01:00
Connor McLaughlin
c3ee97103f Qt: Don't display update errors for background checks
It can be annoying, e.g. if you're not connected to the internet.
2022-05-23 13:09:41 +01:00
Connor McLaughlin
489fbe628a Qt: Remove download size from update prompt
The pcsx2.net api doesn't provide it.
2022-05-23 13:09:41 +01:00
Tyler Wilding
9ba42ec950 ci: format the GameDB and make sure it stays that way 2022-05-23 13:08:48 +01:00
Tyler Wilding
b54facdbd8 ci: catch duplicate YAML keys in the GameDB 2022-05-23 13:08:48 +01:00
Tyler Wilding
5c790b8540 ci: differentiate cmake windows build from the others 2022-05-23 13:06:35 +01:00
Tyler Wilding
ef32b49e50 input-rec: add back safeguard around controller input hook and dont deref null virtual pads 2022-05-22 22:45:01 -04:00
Tyler Wilding
8fb09d07ed input-rec: ensure controller logging is disabled by default 2022-05-22 20:29:42 -04:00
kenshen112
710d3360ac Cmake: Link InputRecording 2022-05-22 23:47:14 +01:00
lightningterror
ded036b93e Qt: Remove rich discord presence button.
Not implemented.
2022-05-23 00:34:37 +02:00
Silent
364e6a1341 GameList: Mark search directory cells as read-only 2022-05-22 23:16:10 +01:00
Tyler Wilding
2aec91d8c0 input-rec: remove frame-advance and adjust folder structure 2022-05-22 17:24:02 -04:00
Tyler Wilding
4f0c880e3e input-rec: append .p2m2 automatically when browsing for a file 2022-05-22 17:24:02 -04:00
Tyler Wilding
13d623f350 input-rec: cleanup VS and CMake project files 2022-05-22 17:24:02 -04:00
Tyler Wilding
9aecf79d7f input-rec: refactor core code, freeze wxWidgets version 2022-05-22 17:24:02 -04:00
Tyler Wilding
2e8076d909 input-rec: begin achieving parity in Qt 2022-05-22 17:24:02 -04:00
Tyler Wilding
655939147a input-rec: Remove DISABLE_RECORDING usages 2022-05-22 17:24:02 -04:00
arcum42
bf899022d7 DMAC: Testing a constant value is always true. (#6122) 2022-05-22 13:38:02 -07:00
Connor McLaughlin
ed5aa4a67d Qt: Cancel game list scanning when VM starts
Because of CDVD global state, and the fact that we hijack CDVD for
getting the game details, we have to cancel the scan. Otherwise, the
scanner will clash with the game's CDVD access.
2022-05-22 22:30:02 +02:00
Connor McLaughlin
22bf3549b6 Host: Add game list refresh/cancel calls 2022-05-22 22:30:02 +02:00
Connor McLaughlin
f260a8be66 GameList: Add region string/fix cached progress increment 2022-05-22 22:30:02 +02:00
Tyler Wilding
068ab8ab36 ci: fix windows release asset structure 2022-05-22 15:55:06 -04:00
iMineLink
6fde585504 gs-hw: remove tales of abyss cu hack.
fixes ghosting when upscaling.
2022-05-22 21:54:11 +02:00
iMineLink
c45cc6928d gs-hw-tc: add some assertions on source scale. 2022-05-22 21:54:11 +02:00
iMineLink
110b7df4d5 gs-hw-tc: set scale in missing create source path. 2022-05-22 21:54:11 +02:00
iMineLink
73eea20fcc gs-hw: fix invalid reference to target texture.
if the target texture changes after the source
lookup, correctly propagate the texture update.

fixes tales of abyss fullscreen blur when upscaling.
2022-05-22 21:54:11 +02:00
TheLastRar
4f20a68b33 Core: Fix LnxFlatFileReader compile error with Qt 2022-05-22 19:54:28 +01:00
Tyler Wilding
dafef46a1b ci: add SSE4 support for tagged Qt builds 2022-05-22 14:18:50 -04:00
Christian Kenny
e283831841 HW: Use more sensible variable names for logging 2022-05-22 17:59:15 +01:00
Christian Kenny
d13c7b6b3e DMAC: Remove some old defines, optimize case statements 2022-05-22 17:59:15 +01:00
Tyler Wilding
e7d1477a7e ci: build the right solution file for Qt builds 2022-05-22 12:54:54 -04:00
Tyler Wilding
2810f6afc1 ci: update docs 2022-05-22 12:54:54 -04:00
Tyler Wilding
821811cf0c ci: create simpler and more efficient release pipeline 2022-05-22 12:54:54 -04:00
Tyler Wilding
fea666bd1e ci: make build workflows re-usable, extract common scripts 2022-05-22 12:54:54 -04:00
Tyler Wilding
193254de94 ci: improve workflow organization 2022-05-22 12:54:54 -04:00
Connor McLaughlin
b919719aeb GzippedFileReader: Fix index creation 2022-05-22 16:13:12 +01:00
Connor McLaughlin
ea051c6d5f Everything: Get rid of wx entirely from the Qt build 2022-05-22 13:58:56 +01:00
Connor McLaughlin
893b3c629d Everything: Remove a **lot** of wx, and px nonsense
- common has no wx left except for Path.
 - pcsx2core only has it in a few places (memory cards and path related
   stuff).
2022-05-22 13:58:56 +01:00
Connor McLaughlin
c07c942659 Common/StringUtil: Handle error returns in StdStringFromFormatV() 2022-05-22 13:58:56 +01:00
Connor McLaughlin
b1d6d84e6f Qt: Get rid of wx module init
We're not using any wx thread junk anymore, so this can go.
2022-05-22 13:58:56 +01:00
tellowkrinkle
1afb248e4d Optionally use system libs (#6094)
* CMake: Make zstd and libzip optionally use system-installed versions

* CMake: Make SDL2 optionally use system version

* CMake: Disable crypto support in bundled libzip

* CMake: Fix bundled SDL build on macOS
2022-05-21 20:28:06 -07:00
Mrlinkwii
cad85d76a5 GameDB: Fix 'Hajime no Ippo - Victorious Boxers' serial 2022-05-21 00:28:52 +02:00
iMineLink
29ad851a9c gs-ogl: fix depth copy shader in stretch rect. 2022-05-20 01:12:38 +02:00
Mrlinkwii
cb9eaeeff9 GameDB: fix 'R: Racing Evolution' serial 2022-05-19 17:58:45 +01:00
Christian Kenny
7c9493cbc2 Core: Refactor code for shutting down internal PS2 components. 2022-05-16 17:30:52 +01:00
Christian Kenny
d21c01f8d1 Core: Remove unused code/includes. 2022-05-16 17:30:52 +01:00
RedDevilus
f4f06c9777 GameDB: Add new serials, GS (HW) Fixes
GS (HW) Fixes:
- R - Racing Evolution
- Lemony Snicket's A Series of Unfortunate Events
- Free Running
- Sopranos

New Serials:
- Shadow Hearts II [Demo]
- GI Jockey 2 [Demo]
- Hajime no Ippo - Victorious Boxers
2022-05-16 17:30:28 +01:00
Connor McLaughlin
437b6f3f0e Host: Reset imgui state when there's no frame to present
Prevents things getting into a messed up state internally where several
frames are buffered.
2022-05-16 17:30:11 +01:00
Connor McLaughlin
a163c90f2b 3rdparty/imgui: Update to 60bea05 2022-05-16 17:30:11 +01:00
PCSX2 Bot
9d9d22fcba PAD: Update to latest controller database. 2022-05-16 18:02:34 +02:00
Connor McLaughlin
df5e175b86 GS: Support creating/replaying dumps in zstandard format 2022-05-16 15:03:29 +01:00
Connor McLaughlin
0f8bbfd64c GS: Fix aspect ratio cycle hotkey in Qt 2022-05-16 15:03:29 +01:00
Connor McLaughlin
8c270288de GS: Refactor screenshots/GS dumping triggers
i.e. make it not rubbish and a massive race condition.

Also adds GS dump saving to Qt.
2022-05-16 15:03:29 +01:00
LargoUsagi
7bd7cdd867 GameDB: Modify .hack // games to use 'dot hack' and '-'(#6086) 2022-05-16 10:36:10 +01:00
Mrlinkwii
f618713551 GameDB: update EyeToy - Play 2 compat 2022-05-16 10:11:59 +01:00
refractionpcsx2
de329e49a8 GS: Redo a bunch of the ignore offset code
Plus clean up a bunch of stuff which isn't needed
2022-05-16 10:09:42 +01:00
Connor McLaughlin
2aa6f771a9 GS/TextureCache: Handle edge cases of paltex and texture replacement 2022-05-15 11:40:49 +01:00
Connor McLaughlin
7787fcff8e GS/TextureCache: Fix partial replacement of textures with same hash and paltex on 2022-05-15 11:40:49 +01:00
SgtSteel
6e576d208e README.md: update website links (#6073)
Updated the downloads link to point to the new page;
Changed the "Want more?" link to point to the homepage
Removed GitHub Releases link for development builds, since they are available on the website.
Also removed any reference to Windows and Linux, since binaries are now available for all three major OS
2022-05-13 16:34:37 +01:00
Connor McLaughlin
00751dc5d3 GS/TextureCache: Force hash caching for replaced textures
If we didn't do this, and preloading wasn't set to full, we'd partial
load the texture, and it wouldn't be in the hash cache. Then, when the
replacement came back (after being asynchronously loaded), there'd be
nothing for it to swap out with.
2022-05-13 12:50:08 +01:00
arcum42
e456fb8f88 Qt: Hook up screenshot button. (#6070)
Qt: Implemented hotkey as well.
2022-05-12 14:53:40 -07:00
Mrlinkwii
9dd579a6d5 GameDB: add some missing serials 2022-05-12 17:31:21 +01:00
Connor McLaughlin
fbd36a4347 Qt: Fix building on Linux 2022-05-12 17:31:06 +01:00
Connor McLaughlin
7f8bfb22de Build: Fix revision extractor for Qt auto updater 2022-05-12 17:31:06 +01:00
Connor McLaughlin
943b513a52 GS/TextureReplacements: Use aligned buffer for texture dumping 2022-05-12 15:08:45 +01:00
Connor McLaughlin
221eaf1a81 Common/AlignedMalloc: Add move constructor/assignment 2022-05-12 15:08:45 +01:00
Connor McLaughlin
41f1ec445f Qt: Add auto updater UI 2022-05-12 15:03:26 +01:00
Connor McLaughlin
a289723f66 Qt: Add update extractor source 2022-05-12 15:03:26 +01:00
Connor McLaughlin
a3f6efecb8 libchdr: Use in-tree lzma instead of bundled
Since we need it for the Qt updater.
2022-05-12 15:03:26 +01:00
Connor McLaughlin
2587cf3b95 3rdparty: Add lzma/7Z SDK 21.07 2022-05-12 15:03:26 +01:00
Connor McLaughlin
d535331b4b Misc: Remove __fastcall, __fc, __concall and friends
These have no meaning in x64 (apart from throwing compiler warnings),
and we don't do 32-bit anymore. Also saves needing to include
`Pcsx2Defs.h` in files which don't otherwise need it.
2022-05-12 14:58:03 +01:00
lightningterror
6d85399ec5 GameDB: Add OPHFlagHack to Naruto - Uzumaki Chronicles 2.
Fixes game freezing.

Fixes #6053
2022-05-12 12:58:52 +02:00
lightningterror
7a113474f0 GameDB: Add textureInsideRT to Turok Evolution.
Fixes underwater levels.

Fixes #6064
2022-05-12 12:51:38 +02:00
Connor McLaughlin
0bb7cc0a1a GS: Add texture dumping/replacement/reload replacement hotkeys
Qt only.
2022-05-11 14:44:42 +01:00
Connor McLaughlin
322ff3fcb9 GS/TextureReplacements: Add options to filter dumping to direct/palette textures 2022-05-11 14:44:42 +01:00
Connor McLaughlin
d329cabf07 GS/TextureReplacements: Fix queued items not getting purged after shutdown 2022-05-11 14:44:42 +01:00
Connor McLaughlin
38c48e8b6a Vulkan/Context: Don't write timestamp on an unreset query 2022-05-11 13:07:58 +01:00
Mrlinkwii
cd0b349496 GUI: update hyperlink in WX 2022-05-11 12:58:40 +01:00
TheLastRar
7f1932e282 DEV9: Fix double calling freeifaddrs() 2022-05-11 13:14:11 +02:00
Connor McLaughlin
17f2fb4471 Qt: Fix nightly builds not showing version in title bar 2022-05-11 13:13:39 +02:00
PCSX2 Bot
022a9cc6df PAD: Update to latest controller database. 2022-05-09 20:20:19 +02:00
Connor McLaughlin
c88db3221c GS/TextureCache: Flush dirty areas of textures during TC move
Dark Cloud does a bunch of VRAM writes overlapping the render target,
then moves over the top of it. If we didn't flush these, the target
would still be considered dirty, and later we'd trash the move
destination, and/or not use it as a source.
2022-05-09 17:45:53 +01:00
TellowKrinkle
bd3e1299a3 GS:MTL: Disable blending when color isn't written
Can come up in two-pass alpha, and Metal doesn't like it if blending uses SRC1 and your shader doesn't output it
2022-05-09 17:43:47 +01:00
TellowKrinkle
3a97688804 GS: Fix TextureMinMax when coordinates are completely outside of min/max 2022-05-09 17:43:47 +01:00
TellowKrinkle
3f027b2698 GS:SW: Clamp Z with unsigned clamp 2022-05-09 17:34:19 +01:00
Mrlinkwii
916754ea6d GameDB: add VUclamping to 'Monster Hunter 2' and 'Monster Hunter G' 2022-05-09 17:29:20 +01:00
TellowKrinkle
335633a5e0 CI: Update SDL 2022-05-09 10:28:58 -05:00
Connor McLaughlin
925bfc2a99 Tests: Set PCSX2_CORE macro
They shouldn't be using wx, and it gets rid of the pthreads4w reference.
2022-05-09 16:06:33 +01:00
Connor McLaughlin
d19c767ad1 Common/Dependencies: Use deletion for declaring non-copyable
This is the preferred method in modern C++.
2022-05-09 16:06:33 +01:00
Connor McLaughlin
d2347d9972 Common/Threading: Replace TLS macros with standard thread_local 2022-05-09 16:06:33 +01:00
Connor McLaughlin
f8dcff9fc4 Common: Remove references to pthreads4w
It's only needed for wx now.
2022-05-09 16:06:33 +01:00
Connor McLaughlin
e5716922a3 Common/Threading: Move a bunch of unnecessary wrappers to gui 2022-05-09 16:06:33 +01:00
Connor McLaughlin
65e956a01c Misc: Replace use of Threading::Mutex with std::mutex in core code 2022-05-09 16:06:33 +01:00
Connor McLaughlin
a93829557b SaveState: Misc refactoring and improvements
- Block until saves are completed when resuming.
 - Save shutdown state asynchronously.
 - Add function to read screenshot out of zip file (useful for
   previous, now we're using zstd).
2022-05-09 10:20:48 +01:00
Connor McLaughlin
c21d475bbd Qt: Implement save-state-on-shutdown 2022-05-09 10:20:48 +01:00
Connor McLaughlin
935dd046da 3rdparty/SDL2: Bump to 2.0.22 release
Fixes a crash on shutdown in Windows::Gaming::Input.
2022-05-09 10:01:45 +01:00
refractionpcsx2
1b2d9f0c5d GS: Scissor opt - handle reverse read sprites 2022-05-08 18:22:12 +01:00
Connor McLaughlin
4baea67e75 Common: Remove RwMutex
It wasn't used, and if we need it, we can use std::shared_mutex.
2022-05-08 05:40:59 +01:00
Connor McLaughlin
1e8332f36a Misc: Move pxThread and friends to gui 2022-05-08 05:40:59 +01:00
Connor McLaughlin
096696bed7 Misc: Replace core usage of Semaphore with KernelSemaphore
i.e. decouple it from the UI.
2022-05-08 05:40:59 +01:00
Connor McLaughlin
756cd1ee47 System: Move old SysThread junk to gui 2022-05-08 05:40:59 +01:00
Connor McLaughlin
64534542a9 Threading: Move a couple of function declarations to correct location 2022-05-08 05:40:59 +01:00
Connor McLaughlin
b22e31c302 Common: Add WIN32_LEAN_AND_MEAN and NOMINMAX to RedtapeWindows.h
Otherwise, it doesn't get set for cmake.
2022-05-08 05:40:59 +01:00
Connor McLaughlin
008beb4896 ThreadedFileReader: Fix possible race with synchronous reads 2022-05-08 05:10:09 +01:00
refractionpcsx2
576bcc6979 GameDB: Add HPO for Dog's Life 2022-05-08 02:54:47 +01:00
refractionpcsx2
4ec345a239 GS: Improve read heights with screen offset disabled 2022-05-08 01:16:04 +01:00
RedDevilus
972bfbcccc GameDB: Monster Hunter 1
Fixes lighting on character models as caves and other locations don't turn mobs into glow-in-the-dark creatures by themselves.
2022-05-07 23:27:46 +01:00
RedDevilus
f59fbaf0eb GameDB: Star Ocean 3
Certain areas have bloom effects which are misaligned, this should fix it. Though minor regression has to be made in the minimap as full round sprite is too aggressive for bloom filter.
2022-05-07 23:08:53 +01:00
refractionpcsx2
631ed8c0fd GUI-WX: Restore panel size override.
Fixes the panels going wonky after the recent dead code removal
2022-05-07 16:10:32 +01:00
Connor McLaughlin
41e8a2a7d1 MTGS: Purge pxThread 2022-05-07 15:43:03 +01:00
Connor McLaughlin
599626b709 MTVU: Purge pxThread 2022-05-07 15:43:03 +01:00
Immersion95
0ae17ddb1a GS: Adding KOF2002 CRC IDs
Adding:
- The King of Fighters 2002 (EUR)
- The King of Fighters 2002 (JAP)
- The King of Fighters 2002 - SNK Best Collection (JAP)
- The King of Fighters 2002 (USA) from Disc 1 of the bundle of The King of Fighters 02/03
2022-05-07 15:33:27 +01:00
Immersion95
7353c26a4f GS-TC: Don't skip depth lookup on KOF2002
Don't skip draw calls on KOF2002
2022-05-07 15:33:27 +01:00
Immersion95
b8769e954e GS: Adding KOF2002 CRC Title
Adding KOF2002 CRC Title
2022-05-07 15:33:27 +01:00
Connor McLaughlin
81cd2d9be9 Qt: Add placeholder for when no games are in list 2022-05-07 15:32:59 +01:00
Connor McLaughlin
90707c453d Qt: Rework VM pausing when popup dialogs are opened
Also cleans up fullscreen transitions further.
2022-05-07 15:32:59 +01:00
Connor McLaughlin
ec0e9f078c Qt: Confirm disc change type when switching to game list 2022-05-07 15:32:59 +01:00
Connor McLaughlin
98b537575f Qt: Rework display widget swapping 2022-05-07 15:32:59 +01:00
arcum42@gmail.com
233195b020 Remove macros that 'might be needed again in the future'. 2022-05-07 05:26:46 +01:00
arcum42@gmail.com
7d71e28bfc Delete various unused px stuff. 2022-05-07 05:26:46 +01:00
arcum42@gmail.com
13e09953af Remove unused code in Dependencies.h 2022-05-07 05:26:46 +01:00
Connor McLaughlin
a85ca4108c GS/DX11: Fix a possible texture leak with sw blend and tex-is-ds 2022-05-06 09:37:53 +01:00
Connor McLaughlin
8620febeb3 GL/Context: Load wayland-egl dynamically
Gets rid of the dependency on libwayland-egl, allowing us to always use
the system version.

Solves missing symbol issues by including it in the AppImage.
2022-05-06 01:00:24 +01:00
Connor McLaughlin
af4c047c41 MetalHostDisplay: Fix fullscreen in Qt interface 2022-05-05 23:23:48 +01:00
Connor McLaughlin
bec9b34f54 Vulkan/SwapChain: Fix crash on fullscreen toggle with Mac 2022-05-05 23:23:48 +01:00
refractionpcsx2
9989daec94 GSWindow: Remove force disable full screen hack now the GS Window doesn't suck 2022-05-05 23:19:35 +01:00
Mrlinkwii
c86dd7397d microVU : correct logging and remove not needed comments 2022-05-05 23:13:33 +01:00
Connor McLaughlin
eefc81ed8c Qt: Fix incorrect resources directory on config reset 2022-05-05 09:51:56 +01:00
Connor McLaughlin
91c717376f Qt: Use app bundle resources directory on Mac 2022-05-05 09:51:56 +01:00
Connor McLaughlin
344c918b65 Qt: Fix possible race when shutting down (Mac) 2022-05-05 09:51:56 +01:00
Connor McLaughlin
deeda519b0 Qt: Remove unused host display includes from EmuThread.cpp 2022-05-05 09:51:56 +01:00
Connor McLaughlin
2db12b9d84 Qt: Hook up axis/vibration scale in controller settings 2022-05-05 09:51:56 +01:00
Connor McLaughlin
378588c67d Qt: Implement more command line arguments 2022-05-05 09:51:56 +01:00
Connor McLaughlin
119b6bdfd5 Qt: Fix not-render-to-main after start fullscreen+toggle 2022-05-05 09:51:56 +01:00
Connor McLaughlin
8751a2d330 Qt: Make win32 console less garbage 2022-05-05 09:51:56 +01:00
Connor McLaughlin
4543ddbcc2 Common/FileSystem: Don't recompress already compressed files 2022-05-05 09:46:52 +01:00
Immersion95
77a7b18b29 GameDB: Add patches for remaining KOF series
Fix for Depth precision.
Game fills upper 16bits of depth with 0xFFFF.
This results in a really high 32 bit value which is then converted to float because both hw and sw renderers lack double precision the lower 16 bits of the initial 32 bit value lose precision.

PAL : KOF2002+KOF2003
NTSC-J : NGBC+KOF2002+KOF2003
2022-05-05 09:45:43 +01:00
lightningterror
749aef1a64 GS-d3d11: Get rid of vendor check in device.
Rely on the vendor check we already use for best renderer selection.
2022-05-04 21:31:58 +02:00
lightningterror
8091b6bc1b GS: Adjust default renderer based on vendor and feature level.
Vulkan default:
Nvidia Maxwell gen2 and higher.

OpenGL default:
From Fermi to Mawell gen1.

Everything else Direct3D11.
2022-05-04 21:31:58 +02:00
refractionpcsx2
4efa845580 GS: Add missing CRC for SNK vs Capcom Chaos (J) 2022-05-04 13:23:25 +01:00
Linus Heckemann
8c9ae90753 Wayland fixes (#5979)
* Linux/PAD: only attempt to reset X screensaver on X11

This would previously crash PCSX2 after 4096 frames on Wayland.

* Linux: only grab pointer on X11

This silently disables the functionality on Wayland, but that's one
step better than the previous behaviour: PCSX2 would crash when
Shift-F12 was pressed.
2022-05-03 23:24:47 -07:00
7oxicshadow
d1117aafac Allow commandline params to be passed through to the patched apprun file (#5777) 2022-05-03 23:24:10 -07:00
TellowKrinkle
a565182b2b GS:SW: Fix lod on C rasterizer 2022-05-04 01:02:36 -05:00
TellowKrinkle
650b0ae646 GS:SW: Prevent CDrawScanline from trashing unused Z bits 2022-05-03 21:47:57 -05:00
TellowKrinkle
b677619f32 GS: Formatting 2022-05-03 21:47:57 -05:00
TellowKrinkle
2fa8f09a21 GS:SW: Only run zclamp once
Also fixes clamping in the wrong spot in the C SW rasterizer
2022-05-03 21:47:57 -05:00
lightningterror
73c9279907 GS: Cleanup variable declarations/initalizations.
GSDevice11, 12, ogl, GSRendererHW.
2022-05-03 23:28:02 +02:00
Mrlinkwii
7d8912f170 GameDB: add 'VIF1StallHack' to 'Ikusa Gami' 2022-05-03 16:31:24 +01:00
lightningterror
2601ba53d4 GS-hw: Add brackets to the recommended crc selection just in case. 2022-05-03 11:58:51 +02:00
lightningterror
81baaaa98a GS-hw: Fix recommended crc for dx12.
Full level should be selected.
Once rov is added we can remove it.
2022-05-03 11:42:40 +02:00
TellowKrinkle
c2638131b4 GS:SW: Merge SSE and AVX implementations of CDrawScanline 2022-05-02 16:28:45 -05:00
TellowKrinkle
586486b81c GS:SW: Merge SSE and AVX implementations of CSetupPrim 2022-05-02 16:28:45 -05:00
PCSX2 Bot
af75ac00e2 PAD: Update to latest controller database. 2022-05-02 18:03:05 +02:00
RedDevilus
67b66c1780 GameDB: Sniper Elite + Naruto Shippuuden Ninja 3-5 + GT4
Adds FMV switch for both and adds special texture half pixeloffset for Sniper Elite.
Finally adding Halfpixel normal offset for Gran Turismo 4.
2022-05-02 15:04:28 +01:00
RedDevilus
b3dce680b0 GSHWHack: Comment CrashBandicoot
Explains what the actual CRC does and why.
2022-05-02 15:04:08 +01:00
RedDevilus
d01a59650f GSCrc: Add missing Crash Bandicoot 2022-05-02 15:04:08 +01:00
RedDevilus
5ae987d48e GameDB: Crash Bandicoot - Wrath of Cortex
Adds missing gamefixes that influenced random corruptions and the famous fog wall.
2022-05-02 15:04:08 +01:00
Connor McLaughlin
6a6ecbf826 Common: Remove ThreadCPUTimer as it's unused now 2022-05-02 14:25:05 +01:00
Connor McLaughlin
4bdf180145 PerformanceMetrics: Switch to ThreadHandle 2022-05-02 14:25:05 +01:00
Connor McLaughlin
6ebb8c2e91 Threading: Add ThreadHandle class 2022-05-02 14:25:05 +01:00
Connor McLaughlin
5eae7a6328 Threading/Win32: Use QueryThreadCycleTime() for thread CPU time 2022-05-02 14:25:05 +01:00
TheLastRar
7d81c979fe DEV9: Fix Auto Adapter in Socket backend on Mac and FreeBSD 2022-05-02 15:01:41 +02:00
TheLastRar
c06ac00677 DEV9: Allow DHCP Server to find Gateway on Mac and FreeBSD 2022-05-02 15:01:41 +02:00
refractionpcsx2
85c754b456 GS: Limit scissor optimisation, fix repeat condition
Only allow scissors to happen on single draws, multiple draws (likely using it as a texture map) will possibly falsely limit the range.
2022-05-02 04:58:57 +01:00
refractionpcsx2
35d3547b62 GS: Fix up SW FMV switch behaviour 2022-05-02 04:53:51 +01:00
Immersion95
8661f42fce GameDB: Add SoftwareRendererFMVHack for KOF Orochi/Nests. (#5987)
The FMV has black frames when upscaled.
2022-05-02 01:46:04 +02:00
refractionpcsx2
a28098c4f8 GS: Account for frame offset in output circuit 2022-05-01 13:15:08 +01:00
arcum42@gmail.com
d45f34ee8b Remove iMisc.cpp, and move the code to System.cpp/h. 2022-05-01 11:43:14 +01:00
Connor McLaughlin
d552f8dc43 GS/HW: Implement moves in texture cache 2022-05-01 11:40:34 +01:00
Connor McLaughlin
b45360b49e VMManager: Don't load WS patches zip multiple times 2022-05-01 11:37:35 +01:00
Connor McLaughlin
fffdf8d671 Counters: Fix software renderer FMV fix with auto renderer 2022-05-01 11:36:57 +01:00
Connor McLaughlin
2634134481 microVU: Remove unused VSync() callback 2022-05-01 11:36:37 +01:00
Connor McLaughlin
c0ac71611b GS: Remove GSState.cpp
Seems like old/unused code, and we have a replacement GSDump replayer
now anyway.
2022-05-01 11:36:37 +01:00
Mrlinkwii
63ecdfefe3 Gamedb:add 'XGKickHack' to 'WRC II Extreme' 2022-04-30 22:04:41 +01:00
lightningterror
6345e8e467 GS-hw: Cleanup Half pixel offset Normal.
Now that custom res is removed, we don't need to split modx and mody.

Also purely rely on the tc to handle the HPO hack.
2022-04-30 18:30:11 +02:00
Ziemas
e96545ca29 IopCounters: missing include 2022-04-29 09:50:29 +01:00
arcum42
dc08858e0f build: Remove i386_flag, as it is no longer used. (#5897)
* build: Remove i386_flag, as it is no longer used.

build: Put back in ncpu.

* build: Move ncpu to set_make.
2022-04-28 13:35:15 -07:00
Mrlinkwii
f5787f9ba0 GameDB: Japanese entries Batch 3 2022-04-28 17:11:32 +01:00
refractionpcsx2
a271fe11e9 GS: limit merge circuit memory read height 2022-04-28 16:32:36 +01:00
RedDevilus
a20a3866d0 Qt: Append warning for Manual Hardware Renderer Fixes
Same as the WX side where if you enable this option for doing hardware renderer or upscaling fixes it will disable the automatic settings from the GameDB.
But in tooltip version.
2022-04-27 16:14:07 +01:00
RedDevilus
28d25fdf33 WX: Append warning for Manual HW Hacks
WX and Qt both will disable renderer and upscaling fixes if you want to manually handle the renderer and upscaling fixes. For years enabling this option didn't do much harm for users even if you didn't change any other setting, but since 1.7 development series automatised these to a degree it would be nice for users to know why their game looks potentially awful.
2022-04-27 16:14:07 +01:00
Connor McLaughlin
f13ad4fcb3 InputManager: Switch InputEventHandler to std::variant 2022-04-27 15:32:52 +01:00
Connor McLaughlin
a524410b0a Qt: Fix firing multiple bindings with chords 2022-04-27 15:32:52 +01:00
TellowKrinkle
8e23d8d557 GS: Fix ReadTexture on unaligned reads
No longer reads out of bounds
2022-04-27 09:33:20 +01:00
Connor McLaughlin
59531f005e Patch: Merge patch and patchHelper 2022-04-27 09:09:38 +01:00
Connor McLaughlin
4c8cba53ef Patch: Fix incorrect format string on patch error 2022-04-27 09:09:38 +01:00
Mrlinkwii
34cd53249d GameDB: Japanese entries Batch 2 2022-04-27 09:08:13 +01:00
Connor McLaughlin
14ce344a3f GS: Merge GSRendererNew and GSRendererHW 2022-04-27 09:06:05 +01:00
TellowKrinkle
cc5142000b MTGS: Prevent the emulator from crashing if GS fails to init 2022-04-27 01:49:59 -05:00
TellowKrinkle
1ad6532f1a GS:MTL: Report error if no Metal devices are available 2022-04-27 01:49:59 -05:00
TellowKrinkle
f136a1a970 WX: Make GSDumpViewer override picker properly show only enabled options 2022-04-27 01:49:59 -05:00
TellowKrinkle
a959ec7571 CI:macOS: Disable OpenGL
It won't work
2022-04-27 01:49:59 -05:00
TellowKrinkle
e1a6304e32 CMake: Set version based on git tag 2022-04-27 01:49:59 -05:00
TellowKrinkle
be05c95026 CI:macOS: Add MoltenVK to build 2022-04-27 01:49:59 -05:00
TellowKrinkle
3983e542b2 CI: Enable macOS artifacts 2022-04-27 01:49:59 -05:00
TellowKrinkle
3d76652b5f macOS: Build dependencies manually 2022-04-27 01:49:59 -05:00
lightningterror
6532dbced4 GameDB: Add preload frame data for Ninja Assault.
Fixes intro captions not displaying.
2022-04-27 00:45:36 +02:00
refractionpcsx2
fe27ebefc8 GS: Ignore fractional parts when reducing tex ranges 2022-04-26 16:57:49 +01:00
Connor McLaughlin
6e84613a14 GS: Make renderer a global 2022-04-26 10:33:05 +01:00
Connor McLaughlin
568ebc6199 GS/HW: Don't clear temporary copies for HDR/DS
Invalidating is enough here.
2022-04-26 09:45:53 +01:00
Connor McLaughlin
cf1d67d927 GS: Adjust texture coverage based on scissor
A good test case here is Resident Evil 4, the shuffles draw over the
entire framebuffer, but get scissored to each strip.
2022-04-26 09:45:53 +01:00
Connor McLaughlin
8181cc8528 GS: Only copy texture coverage area for current FRAME/Z sources 2022-04-26 09:45:53 +01:00
Connor McLaughlin
b344ee094f GS: Make CopyRect() take a destination offset 2022-04-26 09:45:53 +01:00
TellowKrinkle
b042aeacf5 PAD: Fix race on shutdown 2022-04-26 00:01:58 -05:00
NightFyre
fea58d2271 GameDB: SOCOM Combined Assault NTSC Patch (#5964) 2022-04-26 00:43:23 +01:00
refractionpcsx2
ca5da27170 GS: Correct display offsets for Interlaced (FFMD) Framebuffers 2022-04-26 00:35:52 +01:00
RedDevilus
11eab828c4 Qt: Fix VuClamp values
This was an oversight, probably from copying the EEClamp value variables.
2022-04-25 23:28:03 +01:00
RedDevilus
8ca3f9a9c2 GameDB: SOCOM 3 + Combined Assault
Fixes SPS and invisible/flickering characters.
2022-04-25 23:28:03 +01:00
Mrlinkwii
deb044357b GameDB: game fixes for 'DMC', 'Fatal Frame' and 'MX vs. ATV - Untamed' 2022-04-25 23:04:37 +01:00
PCSX2 Bot
00c07d2dff PAD: Update to latest controller database. 2022-04-25 18:09:59 +02:00
Connor McLaughlin
185ed3ce0b MTGS: Combine init/read FIFO and remove several MTGS waits 2022-04-25 13:32:53 +01:00
BuildTools
3b043250b6 UI: Rename Ultra Blending to Maximum Blending
Rename Ultra Blending to Maximum Blending
2022-04-25 11:43:04 +02:00
Connor McLaughlin
3359b3c7ab GS/DX11: Fix possible use-after-free on cached RT/DS 2022-04-25 09:27:43 +01:00
TellowKrinkle
6b1e483d28 GS: fbfetch full_barrier and one_barrier are identical 2022-04-24 23:10:38 -05:00
TellowKrinkle
d3faa05479 GS:MTL: Avoid uchar in shaders
Intel compiler's uchar codegen is buggy
2022-04-24 23:10:38 -05:00
Connor McLaughlin
73f17be890 Qt: Implement proper data directory selection 2022-04-24 06:08:37 +01:00
refractionpcsx2
9292ceedb1 GS: Correct SetScaling when ignoring offsets (FB size) 2022-04-24 01:43:08 +01:00
refractionpcsx2
d1470a9935 GS: Clean up some code and correct heights when offset by 1 2022-04-24 01:43:08 +01:00
arcum42@gmail.com
38fa137cfd build: Include CrashHandler.cpp in cmake. Fixes #5938. 2022-04-24 01:42:10 +01:00
qurious-pixel
a7288d8ad8 BUILD: exclude libgmodule-2.0 2022-04-23 18:22:31 +02:00
Connor McLaughlin
0692517f13 ElfObject: Ignore section headers when offset is invalid
This happens in V-Rally 3:

(ELF) Section header offset 14853196 is larger than file size 5898828
2022-04-22 13:09:31 +01:00
Connor McLaughlin
4f44e3fc46 GS/SW: Get rid of extra pointers to perfmon 2022-04-22 11:37:11 +01:00
Connor McLaughlin
14398da51f GS/SW: Fix use-after-free on worker thread shutdown 2022-04-22 11:37:11 +01:00
Sam H
6e8897d62b build: use system wayland libs if available (appimage) 2022-04-21 19:27:38 +01:00
Connor McLaughlin
69da1e4559 Qt: Install crash handler on startup 2022-04-21 14:21:49 +01:00
Connor McLaughlin
abde47fa18 Common: Add CrashHandler 2022-04-21 14:21:49 +01:00
seta-san
f46b406cbd ReadMe.md: Clarify only Windows 8.0 dropped. 2022-04-20 21:16:48 +01:00
RedDevilus
48313b42a2 GameDB: Mosquito + RE Dead Aim + Ice Age
Adds some missing upscaling fixes for Mister Mosquito (blurriness when upscaling) and quite a few for Resident Evil - Dead Aim.
Along with Ice Age Meltdown upscaling and a rare SPS issue and Ice Age 3 upscaling.
2022-04-20 21:07:39 +01:00
Connor McLaughlin
1e06b57f25 VMManager: Fix disc path when specifying source type 2022-04-19 12:34:03 +01:00
lightningterror
8a6c896dde vcxproj.filters: Adjust d3d shader and source file group naming to accommodate d3d12 addition. 2022-04-19 10:54:45 +02:00
lightningterror
b3c7b07813 GS-qt: Gray out texture barriers and geometry shaders on d3d or sw renderers. 2022-04-19 10:52:59 +02:00
lightningterror
65072ddbe5 readme: Remove broken screenshots.
Ideally we should put new ones.
2022-04-18 22:38:44 +02:00
lightningterror
d42fb851a2 GS-wx: Gray out texture barriers and geometry shader options on d3d. 2022-04-18 22:01:25 +02:00
lightningterror
ea0791a3bf pine: Fix Wswitch-bool warning. 2022-04-18 21:10:35 +02:00
lightningterror
8d4df7f74b spu2: Fix Wunused-private-field warning. 2022-04-18 21:10:35 +02:00
PCSX2 Bot
4b07eae80e PAD: Update to latest controller database. 2022-04-18 18:02:26 +02:00
lightningterror
77162ff637 GS-d3d11: Purge the NVIDIA hack.
The driver issue got resolved by nvidia.
2022-04-18 17:25:32 +02:00
Timothy O'Barr
e10f414724 CDVD: Rename cdrom files to Ps1CD for clarity of function (#5907) 2022-04-18 12:15:23 +01:00
Mrlinkwii
53c3f253e6 GameDB:add 'EETimingHack' to'Harry Potter and the Chamber of Secrets' 2022-04-18 12:14:22 +01:00
Connor McLaughlin
b0f20c9973 GS/DX11: Fix MMOD=1 merge background color 2022-04-18 04:29:19 +01:00
Sam H
5c3ae656a0 GS: fix display width calculation for frame when offsets off 2022-04-17 23:21:50 +01:00
TellowKrinkle
a98efdfedd GS: Per-selector C draw scanline 2022-04-17 15:22:49 -05:00
TellowKrinkle
3b8eb6731c Add more values to GSScanlineSelector ToString 2022-04-17 15:22:49 -05:00
TellowKrinkle
89bc4707ab Add to_string to GSScanlineSelector 2022-04-17 15:22:49 -05:00
TellowKrinkle
e5a8b01980 GS: Always compile C rasterizer 2022-04-17 15:22:49 -05:00
Connor McLaughlin
7194542029 Qt: Fix fullscreening in Wayland 2022-04-17 11:56:37 +01:00
Connor McLaughlin
06beadba74 CdRom: Fix clear error bit in StartReading() 2022-04-17 11:42:48 +01:00
Connor McLaughlin
b10249af7d CdRom: Remove Speed field/add accessor instead
This way it doesn't break save states.
2022-04-17 11:42:48 +01:00
Ty Lamontagne
1f04214461 Dmac: LegacyDmac.cpp -> Dmac.cpp 2022-04-17 10:54:39 +01:00
SeraphisCain
39d611e870 GameDB: Transformers Tatakai, T3: The Redemption, Urban Reign
GameDB fixes for a few games.
2022-04-17 10:47:09 +01:00
Connor McLaughlin
b913d39a50 Common/Timer: Fix closing invalid handle on Win32
Only is an issue if you have a debugger attached and the exception
enabled.
2022-04-17 10:45:22 +01:00
TellowKrinkle
eb60e9aa9b Common: Avoid libstdc++ assert 2022-04-17 10:44:02 +01:00
Mrlinkwii
53bb0c508f GameDB: upscaling fixes and documentation updates 2022-04-16 19:40:26 +01:00
Connor McLaughlin
1c50d3e4b3 GS: Add stat for barriers 2022-04-16 19:10:18 +01:00
Connor McLaughlin
de724d9570 GS/HW: Skip unnecessary barriers (usually two pass alpha) 2022-04-16 19:10:18 +01:00
Connor McLaughlin
e8293b2e06 GS/Vulkan: PrimID DATE doesn't need feedback loop 2022-04-16 19:10:18 +01:00
refractionpcsx2
904345ff82 GS: Get display width for frame when offsets off 2022-04-16 18:21:00 +01:00
Connor McLaughlin
d16592817b Frontend/OpenGLHostDisplay: Remove unused variables
clang likes to whinge about this one.
2022-04-16 13:57:23 +02:00
Connor McLaughlin
14f1a78608 GS/DX12: Fix DATE not being set in shader macros 2022-04-16 03:57:04 +01:00
refractionpcsx2
68c2a68087 microVU: Clean up warnings 2022-04-16 03:20:54 +01:00
refractionpcsx2
ae83f729db USB: Clean up warnings 2022-04-16 03:20:54 +01:00
refractionpcsx2
c53f4d0d63 SPU2: Clean up warnings 2022-04-16 03:20:54 +01:00
refractionpcsx2
cbb3134740 App/BIOS: Clean up warnings 2022-04-16 03:20:54 +01:00
refractionpcsx2
9b97c157f2 Recording: Clean up warnings 2022-04-16 03:20:54 +01:00
refractionpcsx2
11cf244e97 GS: Clean up warnings 2022-04-16 03:20:54 +01:00
kenshen112
6673bd9212 CDVD.cpp: Remove Elf parser from ps1 mode. 2022-04-16 03:19:21 +01:00
kenshen112
02dfc5d20d cdrom: Update status flags and implementations for PSX CD-Rom.
Added SEEKERROR and IDERROR status. Set StatP to account for SEEKS, READS and shell open.
Added speed to cdrom struct instead of cdvd. Adjustments to cdlPlay to be in line with No$ description.
Added MODE_INIT. Removed old needless hack. Added ToDo in cdlPlay
2022-04-16 03:19:21 +01:00
SeraphisCain
565ff86ab4 GameDB: Several game fixes and a gamelist entry correction (#5872) 2022-04-16 02:50:36 +01:00
refractionpcsx2
5a77790859 BIOS/GUI: Mark Qt only variables as maybe unused 2022-04-16 02:59:21 +02:00
refractionpcsx2
66101f8628 SPU2: Clean up warnings 2022-04-16 02:59:21 +02:00
refractionpcsx2
2f70b153f2 GS: Clean up warnings, fix a small error. 2022-04-16 02:59:21 +02:00
refractionpcsx2
31fe9979dd GS: Fix undefined behaviour on interlacing 2022-04-15 22:12:04 +01:00
RedDevilus
4fc6e9240c OSD: Minor clean up
Fixes variable for interlacemode
2022-04-15 22:01:48 +01:00
RedDevilus
0eae59ee66 GameDB: Black
GameDB Black roundsprite to half for lighting.
2022-04-15 22:01:48 +01:00
RedDevilus
8e6cd47f25 PCSX2: Fix Interlacing Ini
Oversight in having the correct config for the ini. Replaced CycleMipmap mode with the CycleInterlace one for correct OSD message.
2022-04-15 20:34:51 +01:00
Connor McLaughlin
ecdbe17fba Wx: Fix widescreen patch loading 2022-04-15 19:44:05 +01:00
Connor McLaughlin
0e9dcf74b2 Common/Semaphore: Fix WaitWithYield() returning immediately
This caused the WaitGS() issued from the main thread when applying
renderer settings (while the core thread was paused) to return
immediately, and a massive race resuming.
2022-04-15 19:43:22 +01:00
RedDevilus
5297c2a995 GameDB: Japanese entries
Adds a bunch of gamefixes and upscaling fixes to games as well as just entries.
Fixes:
- 0 Story
- Amagami
- Bleach Blade Battlers 2nd
- Chobits
- D.C. Da Capo The Origin
- Pandora - Kimi no Namae o Boku wa Shiru
- Katekyoo Hitman Reborn! Nerae!? Ring x Vongola Trainers
- Kateikyoushi Hitman Reborn!! Let's Ansatsu! Nerawareta 10 Daime!
- Kino no Tabi - The Beautiful World
- Kyuuketsu-hime Yui - Sen'yashou
- Shikigami no Shiro - Nanayozuki Gensoukyoku
- Secret of Evangelion
2022-04-15 19:41:48 +01:00
Connor McLaughlin
edf5e2c14e Vulkan/Context: Use static loading for vk_mem_alloc
In doing so, we simplify things a bit, as we can assume Vulkan 1.1
support. It needed it before anyway, and would crash on Vulkan 1.0
drivers.
2022-04-15 19:41:12 +01:00
Connor McLaughlin
9180adb850 VulkanHostDisplay: Handle surface loss better
Just try again next frame.
2022-04-15 19:41:12 +01:00
Connor McLaughlin
1b080f1777 Vulkan/Loader: Make vkDestroyInstance() a module import 2022-04-15 19:41:12 +01:00
Connor McLaughlin
0a2584172a GS/HW: Clear blend bits for color dest blend 2022-04-15 16:55:24 +02:00
Connor McLaughlin
1993203d26 GS: Add Direct3D 12 renderer 2022-04-15 12:56:41 +01:00
Connor McLaughlin
3c18cdcb1f Frontend: Add D3D12HostDisplay 2022-04-15 12:56:41 +01:00
Connor McLaughlin
e767fb8d35 Common: Add D3D12 wrapper/helper classes 2022-04-15 12:56:41 +01:00
Connor McLaughlin
3255422836 Common/StringUtil: Optimize equal stride copy case 2022-04-15 12:56:41 +01:00
Connor McLaughlin
67fa06b933 3rdparty/imgui: Enable DX12 backend 2022-04-15 12:56:41 +01:00
Connor McLaughlin
398e468c9e 3rdparty: Add D3D12MemoryAllocator 2022-04-15 12:56:41 +01:00
Connor McLaughlin
f7ee35e578 Wx: Reset/restore API state after window resize 2022-04-15 12:56:41 +01:00
Connor McLaughlin
800b458d3d Wx: Fix incorrect OSD scale after resize on Windows 2022-04-15 12:56:41 +01:00
Connor McLaughlin
3f31a4d25b GS: Fix edge case of broken alpha with no-DSB+ATST 2022-04-15 12:56:41 +01:00
Connor McLaughlin
0592abd31b GL/ContextEGL: Fix broken surface creation
Regression from #5676.
2022-04-15 11:46:07 +01:00
refractionpcsx2
55d546b892 GS: Maintain framebuffer size when not using offsets
This reduces blurriness
2022-04-15 11:07:22 +01:00
refractionpcsx2
f28e42c4fe GS: Set correct framebuffer size for output 2022-04-15 11:07:22 +01:00
refractionpcsx2
7cdc849ffa GS: Clean up new DISPLAY Merging code. 2022-04-15 11:07:22 +01:00
refractionpcsx2
eed04b3ff3 GS: Redesign some of the offset code for FFMD
Half height buffers need to be drawn half height, not stretched to full height during the draw, it will be bad times.
2022-04-15 11:07:22 +01:00
refractionpcsx2
e2044eba66 GS/Window: Add Automatic 4:3/3:2 mode, keep 4:3 separate 2022-04-15 11:07:22 +01:00
refractionpcsx2
06e6d12e2f GS: Added automatic 3:2 aspect for 480p mode 2022-04-15 11:07:22 +01:00
refractionpcsx2
48fd68ca87 GS: Implement PCRTC Offsets
This is off by default because people will complain about black borders, but I've tried to keep it to a minimum.

Enabling this option (Screen Offsets in the graphics settings) will allow you to position the screen in games which allow you to do so, maintain correct aspect ratios, and screen shake effects which are done on PCRTC (WipEout Fusion for example) will work.
2022-04-15 11:07:22 +01:00
refractionpcsx2
7ad59a7af1 GS: Remove NTSC Saturation option (No longer required) 2022-04-15 11:07:22 +01:00
refractionpcsx2
bae2c9c1d8 GS: Saturate DISPLAY heights and limit max height 2022-04-15 11:07:22 +01:00
Connor McLaughlin
3d171686b5 CI/Windows: Switch to Qt 6.3.0 2022-04-15 08:53:02 +01:00
Connor McLaughlin
f86b3a32cd Qt: Switch to QtEntryPoint.lib instead of explicit main() 2022-04-15 08:53:02 +01:00
Connor McLaughlin
59d6113ee4 VSProps: Fix Qt TLS plugins not getting copied 2022-04-15 08:53:02 +01:00
Connor McLaughlin
f270f34865 Qt: Move to Qt 6.3.0 2022-04-15 08:53:02 +01:00
Connor McLaughlin
b2514d49d2 3rdparty/wx: Fix compilation in MSVC conformance mode 2022-04-15 08:53:02 +01:00
Tyler Wilding
2951068e0c memcard: Detect and attempt to repair broken index files from the v1.7.2115 bug 2022-04-15 08:47:46 +01:00
Ty Lamontagne
a4dcaa7c14 BiosTools: Allow BIOS region patching 2022-04-15 08:44:46 +01:00
TellowKrinkle
b90de6d89f PAD: Process keycodes the same way on Linux and macOS 2022-04-15 08:43:12 +01:00
BuildTools
532a7addd4 Documentation: Update recommended OpenGL version 2022-04-15 08:42:59 +01:00
tcoyvwac
5389178644 Common: Prefer standard algorithms
GL/ContextEGL.cpp:
Prefer std::find_if over ranged-for.
2022-04-15 08:42:29 +01:00
tcoyvwac
6cbdc8c8b7 Common: Prefer pre-built array-form to assign values.
GL/ContextEGL.cpp:
Replace raw-index manipulation / arithmetic as logic. Now a variable-length array.
2022-04-15 08:42:29 +01:00
tcoyvwac
6e6a70b8ed Common: Prefer returning std::array by lambda expression
GL/ContextEGL.cpp:
Replace raw-index manipulation / arithmetic as logic. Variable now using IIFE (Immediately invoked function expression) to strengthen immutability.
2022-04-15 08:42:29 +01:00
TellowKrinkle
1a0a0423e7 Core: Switch MTGS and SysThreadBase to WorkSema 2022-04-15 08:41:58 +01:00
TellowKrinkle
b28779b0f6 Common: Add dead thread support to WorkSema
MTGS supports having exceptions kill the thread and send their result back to a thread calling WaitGS...
2022-04-15 08:41:58 +01:00
TellowKrinkle
63fd349e3c GS: Switch GSJobQueue to WorkSema 2022-04-15 08:41:58 +01:00
TellowKrinkle
481c92c1c8 MTVU: Use WorkSema 2022-04-15 08:41:58 +01:00
TellowKrinkle
d733730950 Common: Add WorkSema 2022-04-15 08:41:58 +01:00
SeraphisCain
93a9e5dd83 GameDB: Fixes for Wrestle Kingdom 1 + 2 (#5863) 2022-04-15 08:24:14 +01:00
TellowKrinkle
db9672509c 3rdparty: Update fmt to 8.1.1 2022-04-15 08:22:13 +01:00
Mrlinkwii
ffe69d313b GameDB: add missing serials 2022-04-15 08:19:43 +01:00
Silent
502a44e9f5 XInputSource: Add support for SCP API extension
Allows to query pressure sensitive DualShock 3 buttons via
XInput when DsHidMini is used in SXS mode, with its xinput1_3.dll dropped
in the emulator directory.
2022-04-15 08:18:57 +01:00
Silent
5e913b0e9e XInputSource: Fix triggers input range 2022-04-15 08:18:57 +01:00
Connor McLaughlin
864651ce8d System: Purge WinCompressNTFS.cpp
This is the most overengineered, stupid rubbish I've ever seen.
2022-04-15 08:15:40 +01:00
Connor McLaughlin
850deed6c1 HwRegs: Swap wxString desc() for std::string 2022-04-15 08:15:40 +01:00
Connor McLaughlin
63424b765d CDVD: Purge wxString 2022-04-15 08:15:40 +01:00
Connor McLaughlin
a635e84d82 FileSystem: Add path splitting helpers 2022-04-15 08:15:40 +01:00
Connor McLaughlin
6991f819f3 SaveState: Switch to zstd compression
zstd can be 10x+ fast compressing, 2x+ decompressing at default levels,
and provides slightly better ratios.

There's a hidden option in the config, SavestateZstdCompression, which
you can set to false if you want to use deflate.
2022-04-15 08:15:40 +01:00
Connor McLaughlin
a22c634cd4 3rdparty: Add zstd 2022-04-15 08:15:40 +01:00
Connor McLaughlin
80aaa962ec Common: Move IniInterface to WX GUI
Qt doesn't use it.
2022-04-15 08:15:40 +01:00
Connor McLaughlin
876ea3db52 Common: Purge pxStreams and some other wx string routines 2022-04-15 08:15:40 +01:00
Connor McLaughlin
1bfc0f3138 CDVD: Remove wxStr from SYSTEM.CNF parsing 2022-04-15 08:15:40 +01:00
Connor McLaughlin
5fa9427323 Patch: Store gamedb patches as single string 2022-04-15 08:15:40 +01:00
Connor McLaughlin
29cea58471 Patch: Remove all wx usage 2022-04-15 08:15:40 +01:00
Connor McLaughlin
4779bc830a StringUtil: Add more whitespace cleaners and ParseAssignmentString 2022-04-15 08:15:40 +01:00
Connor McLaughlin
dd8a645986 SaveState: Use libzip instead of wx 2022-04-15 08:15:40 +01:00
Connor McLaughlin
9aa2c52b20 3rdparty: Add libzip 2022-04-15 08:15:40 +01:00
Connor McLaughlin
0914b2a474 Qt: Fix compiling without Vulkan renderer 2022-04-15 07:21:18 +01:00
Connor McLaughlin
d387a1f4dc GS: Support compiling without OpenGL renderer 2022-04-15 07:21:18 +01:00
arcum42
3488aa54be Remove wx code from build.sh and a bit of cleanup. (#5817)
* build: Fix up the menu printed by build.sh.

* build: Removed wx code from build.sh.
2022-04-14 22:04:26 -07:00
lightningterror
de541aeba9 GS: Remove unused default configs. 2022-04-14 12:07:59 +02:00
lightningterror
5fb00bd6c7 GS: Fix some log warnings. 2022-04-14 00:47:08 +02:00
kenshen112
fdabc82342 Remove IopCommon.h added proper includes to files. Removing circle includes in several files that sometimes was several layers deep 2022-04-11 21:25:20 +01:00
refractionpcsx2
e5f90f176c Emitter: Fix s8 problem with displacements 2022-04-11 21:09:12 +01:00
PCSX2 Bot
6438547edc PAD: Update to latest controller database. 2022-04-11 18:33:35 +02:00
dependabot[bot]
0f0ab25fe8 Bump actions/upload-artifact from 2 to 3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 10:45:35 +01:00
TellowKrinkle
fc7a20dd0f wx: Fix compile on wx 3.1.6 2022-04-11 10:45:06 +01:00
TellowKrinkle
f8c7237bba i18n: Formatting 2022-04-11 10:45:06 +01:00
Ty Lamontagne
00af7d6835 GSState: Remove transfer direction warning 2022-04-10 07:19:52 +01:00
refractionpcsx2
86fb8e5809 GS: Flush PRIM on write if pending PRIM draw had TME 2022-04-08 11:46:27 +01:00
RedDevilus
29964c3f26 Qt: Fix interlacing
I actually made it backwards compatible but then reverted this line at the last minute, rendering the Qt variant useless. This fixes it again.
2022-04-08 08:24:54 +01:00
RedDevilus
ec787d090d Qt: Add Gzipped
WX supported this, I don't see why not add to Qt. Though no idea why anyone wants to use it above CSO or CHD if you look at filesize.
2022-04-08 08:24:54 +01:00
Connor McLaughlin
f9707e6809 LnxMisc: Use clock_gettime() instead of gettimeofday() 2022-04-07 21:22:24 +01:00
RedDevilus
5665e5e222 GameDB: Fix name + add comment
Fixes Ar Tonelico II and adds comments for Legion - The Legend of Excalibur
2022-04-06 21:06:55 +01:00
Mrlinkwii
336e5c77fe Gamedb: add 'VUSyncHack' to 'Next Generation Tennis 2003' 2022-04-06 20:36:43 +01:00
RedDevilus
d8b107f59c PCSX2: Interlacing to Deinterlacing
There are some more strings but don't want to mess around with too much
2022-04-06 19:19:01 +01:00
RedDevilus
19197fabe8 GameDB: God Of War 1 / 2
The GameDB changes were reverted but then the CRC hacks were removed so this fixes it.
2022-04-06 17:40:07 +01:00
Connor McLaughlin
3801825793 R3000A/R5900: Refactor interpreter/recompiler exits
Now, IOP breakpoints work nice and reliably in both interpreter and
recompiler, exiting as soon as possible, without leaving the event state
indeterminate.
2022-04-06 15:27:15 +01:00
Connor McLaughlin
25e15a16b1 VMManager: Add frame advance hotkey
Now that exits are consistent, this is easy.
2022-04-06 15:27:15 +01:00
Connor McLaughlin
5ac9419703 R5900: Make CPU exits consistent and safe
Previously, we would either throw an exception (ints), or longjmp out of
the recompiler when the execution state was checked. Unfortunately for
our stability, this happened at the end of the frame, just before it was
pushed to the GS, and in the middle of processing EE events (!).

Doing so not only meant that we executed a bunch of event
testing/exception code twice (once after we paused, again when we
resumed), but it also could potentially leave things in an inconsistent
state.

So instead, let's do it safely with a flag, replacing the old
iopBreakpoint flag, so there's no additional overhead on the hot path.
2022-04-06 15:27:15 +01:00
Connor McLaughlin
821e15f1ee Qt: Add QtHost::RunOnUIThread() 2022-04-06 15:22:39 +01:00
Connor McLaughlin
0efe03e726 Qt: Implement Host::RunOnCPUThread() 2022-04-06 15:22:39 +01:00
seta-san
577d6e735c Gamedb: Add Bumpy Trot Trial serial 2022-04-06 15:17:47 +01:00
Ty Lamontagne
7668123aaa gitignore: ignore bin/textures 2022-04-06 01:30:22 +02:00
Mrlinkwii
0b87d580c3 Gamedb: Add Hachi-One Diver serial. (#5828) 2022-04-05 20:40:14 +02:00
Connor McLaughlin
170a03cac6 GSDump: Drop last packet of truncated dumps 2022-04-05 12:08:06 +01:00
PCSX2 Bot
70d8acb812 PAD: Update to latest controller database. 2022-04-05 13:02:32 +02:00
TheLastRar
2670d5a9aa Core: Move Applying GameFixes into GameEntry
Also add similar logging to GS Hardware fixes (on Qt)
2022-04-05 11:12:14 +01:00
TheLastRar
44081671ac Config: Fix saving/loading EnableGameFixes in Core 2022-04-05 11:12:14 +01:00
refractionpcsx2
462b304bea GameDB: Update Simple Series entries 2022-04-05 11:06:58 +01:00
Odin Vex
059f58803c Remove erroneous unmanaged cleanup of managed code
`loadYamlFile` calls `OpenManagedCFile` which handles closing the file-handle used. Thus, closing the file-handle outside the API call to `OpenManagedCFile` is not necessary.
2022-04-05 11:04:51 +01:00
refractionpcsx2
e170e9281d GS: Fix reversed reversed GS copies. 2022-04-04 18:07:54 +01:00
Connor McLaughlin
5987e03463 GS: Force min/mag linear when trilinear is forced
Trilinear implies that min/mag will be linear. Less confusing, makes
sense, and the min/mag point + mip linear case is currently not handled
properly with regard to the GS registers.
2022-04-04 17:01:23 +01:00
Connor McLaughlin
ddbdfd47be GS: Make hardware renderer trilinear consistent
Trilinear without bilinear was inconsistent previously.
2022-04-04 17:01:23 +01:00
Connor McLaughlin
1b83e17d60 GS: Add automatic trilinear filtering level 2022-04-04 17:01:23 +01:00
AndreAuth
bc7ed4e7d0 GameDB: Metal Gear Solid 3 PAL - Fix blurry characters (#5819) 2022-04-04 11:33:16 +01:00
refractionpcsx2
283c7fa88c GS: Improve autoflush rect checks 2022-04-04 11:25:25 +01:00
Connor McLaughlin
d01ee3163d Qt: Add performance metrics to status bar 2022-04-03 23:59:05 +01:00
Mrlinkwii
90457e32b6 Gamedb: update changes to pdf 2022-04-03 10:09:05 +01:00
refractionpcsx2
4cb6c94693 CI/Docs: Update validation and document 2022-04-03 08:50:09 +01:00
refractionpcsx2
93c78a27b3 GS: Add interlace override to gamedb, revert earlier change 2022-04-03 08:50:09 +01:00
Connor McLaughlin
50452848e7 BiosTools: Bounds check strings in LoadBiosVersion() 2022-04-03 07:57:42 +01:00
Connor McLaughlin
4f70fd9583 VMManager: Make EE rec toggles reliable
Before, it'd swap out the Cpu while it was executing...
2022-04-03 07:57:02 +01:00
Connor McLaughlin
e6c8354ec8 EERec: Purge PCSX2_SEH define
No longer needed since we don't have 32-bit.
2022-04-03 07:57:02 +01:00
Connor McLaughlin
a1e77002c3 iR5900: Exit on NeedsReset not IsReset
This is an edge case which can be hit in Goemon, but also when changing
settings in Qt, as they will be applied at guest vsync time, which is
called within the JIT.

Also, do the reset before entering JIT code, rather than when the first
block is compiled.
2022-04-03 07:57:02 +01:00
Connor McLaughlin
099cd52381 gitignore: Remove unused portaudio files 2022-04-03 06:09:09 +02:00
lightningterror
0d1675fbaa GS-hw: Purge custom resolution entirely.
Code debt, not used anymore, get rid of it.
2022-04-02 16:54:26 +02:00
lightningterror
f021da5627 GS-tc-hw: Fix Normal Half pixel offset on 7x upscale. 2022-04-01 13:58:54 +02:00
refractionpcsx2
906480b8e2 GS: Only flush on PRIM if a new draw is requested 2022-04-01 10:48:22 +01:00
refractionpcsx2
38b83af714 GS: Improve interlace handling and odd frames 2022-04-01 10:48:01 +01:00
Tyler Wilding
05dab12b7c releases: simplify discord announcements, and link to the right page 2022-04-01 10:45:59 +01:00
TellowKrinkle
c0628a64a6 GS: Add Metal renderer to settings 2022-03-31 23:51:27 -05:00
TellowKrinkle
5ecaa9459d GS: Add Metal renderer 2022-03-31 23:51:27 -05:00
TellowKrinkle
24b2277206 GS: Give names to blend enums 2022-03-31 23:51:27 -05:00
TellowKrinkle
8e60d2c72e GS: Rename Int32 texture to PrimID
Not always Int32
2022-03-31 23:51:27 -05:00
TellowKrinkle
cfe2f9e6b4 Common: Add helpers for enum classes 2022-03-31 23:51:27 -05:00
TellowKrinkle
0a11b5898a CMake: Disable PCH for mm files 2022-03-31 23:51:27 -05:00
TellowKrinkle
be49de6fa0 Config: Format Pcsx2Config 2022-03-31 23:51:27 -05:00
RedDevilus
1ad52e918b GameDB: Caspian
Reduces ghosting but on normal vertex causes the rainbow corruption at the screen sides
2022-03-31 15:45:12 +01:00
Tzerinas
53388336d2 GameDB: Fixes for Tomb Raider Games
Added the FMV Hack for every game except Underworld and the missing mipmap Setting for the US version of Legend.
2022-03-31 15:44:58 +01:00
Chromaryu
4e1496e736 GameDB: Add Zwei AutoFix 2022-03-31 15:43:22 +01:00
RedDevilus
216c964d13 GameDB: Silent Hill Origins
Wildarms while making the alignment perfect in the 3D environment, messes with the maps.
2022-03-31 12:03:31 +01:00
Angel Toloza
6bb828eb8f GameDB : Atelier Marie + Elie: Salburg no Renkinjutsushi 1&2 (#5784) 2022-03-30 23:45:14 +01:00
Tzerinas
511845a1c4 GameDB: Corrected GSHW Fixes for Radiata Stories
Adds Special (Texture) and Align Sprite to Radiata Stories.
2022-03-30 23:39:28 +01:00
RedDevilus
89f10e1605 GameDB: ':' to '-' + GS and other fixes
Windows doesn't like you to use ':' in folders this caused issues for when CK1 did savestates in folders and now it's also messing with unable to add covers in Qt so better to replace them and also to avoid other issues now and the future.
GS HW Fixes and other fixes for:
- Adventures of Cookie & Cream, The
- Brothers in Arms - Earned in Blood / Road to Hill 30
- Black
- Chaos Legion
- God Hand
- Knockout Kings 2001
- Kuon
- Outrun 2006 / 2 SP
- Project Eden
- Psi-Ops - The Mindgate
- Punisher, The
- Ratchet Deadlocked (USA) / Gladiator (Europe) / 3 Up Your Arsenal
- Silent Hills Origins / Shattered Memories / 3 / 4
- SoulCalibur II / III

Also made sure that the comments and their spacing were consistent.
2022-03-30 23:38:18 +01:00
Connor McLaughlin
76b4e93604 Vulkan/ShaderCache: Don't delete cache when running 2 instances 2022-03-30 12:38:08 +02:00
Connor McLaughlin
cec089a271 D3D11/ShaderCache: Don't delete cache when running 2 instances 2022-03-30 12:38:08 +02:00
PCSX2 Bot
b4bd36c4b2 PAD: Update to latest controller database. 2022-03-28 18:04:15 +02:00
RedDevilus
338eb42b04 Qt: Reduce max SPU - Change Speed Preset
Qt has a leftover from the old SPU2-X values which is 3000 ms (3 seconds) latency meaning that if an user sets it to the max it will do something like this: Videoframe ~150 / 180 happens and it makes the first sound after 3 seconds for the first videoframe which is far too long. Also changed 1% speed as it messed with the GSdump player and too stuttery to be usable in other usecases.
2022-03-28 10:44:04 +01:00
lightningterror
8e42fce0aa gamedb: Add alignSprite to GOW 2.
Fixes water vertical lines.
2022-03-28 10:16:59 +02:00
lightningterror
a7900b342e GS-hw: Purge GodOfWar 1 and 2 crc hacks.
Not needed, can be solved with upscaling hw hacks, and gs db fixes are a thing.
2022-03-28 09:59:41 +02:00
Connor McLaughlin
506bbe1c08 GS/OpenGL: Don't emit #extension after #define for FXAA
This is technically not valid GLSL.
2022-03-28 09:24:51 +02:00
Connor McLaughlin
d32d8cc0ec Shaders/FXAA: Fix warnings with Vulkan compiler 2022-03-28 09:24:51 +02:00
Connor McLaughlin
0cb9655523 GS/Vulkan: Remove unused color attribute
Would likely be getting optimized out anyway.
2022-03-28 09:24:51 +02:00
Connor McLaughlin
3067bef82d GS/Vulkan: Implement FXAA 2022-03-28 09:24:51 +02:00
Connor McLaughlin
486764be03 GS/Vulkan: Implement shadeboost 2022-03-28 09:24:51 +02:00
Connor McLaughlin
5e336138d0 Qt: Add shadeboost settings 2022-03-28 09:24:51 +02:00
Connor McLaughlin
4a5180bc0a GS: Put shadeboost params in uniforms
Compiling variants for these is silly.
2022-03-28 09:24:51 +02:00
dependabot[bot]
dd28e33612 Bump peter-evans/create-pull-request from 3 to 4
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3 to 4.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v3...v4)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 09:10:03 +02:00
dependabot[bot]
b66c0411df Bump actions/cache from 2.1.7 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 09:09:41 +02:00
arcum42
c59b114a1d Build: Remove cross compiling from build.sh. (#5713) 2022-03-27 17:38:41 -07:00
TheLastRar
352faeddb2 DEV9: Add Socket api mode 2022-03-27 16:16:19 +01:00
TheLastRar
140d44d826 DEV9: Add code for reading ARP, TCP & ICMP packets 2022-03-27 16:16:19 +01:00
TheLastRar
db220001f6 DEV9: Add cloning of packets 2022-03-27 16:16:19 +01:00
TheLastRar
5ac9b5576a DEV9: Add PayloadData classes 2022-03-27 16:16:19 +01:00
TheLastRar
b23873e0ed DEV9: Add adapter reset function 2022-03-27 16:16:19 +01:00
TheLastRar
284ec35699 DEV9: Add GetHeaderLength() to IP_Packet 2022-03-27 16:16:19 +01:00
TheLastRar
cb0e629dd3 DEV9: Make internal servers protected 2022-03-27 16:16:19 +01:00
TheLastRar
1aaadd6228 DEV9: Make DHCP_Server::GetGatewaysLinux() public
Needed for auto adapter on linux, if only to check if an adapter has a gateway
2022-03-27 16:16:19 +01:00
TheLastRar
e20a357340 DEV9: Allow user DHCP settings to be overridden 2022-03-27 16:16:19 +01:00
TheLastRar
fef2952d47 DEV9: Fix typo in DHCP_Packet 2022-03-27 16:16:19 +01:00
TheLastRar
f4b2e0dd7a DEV9: Correct PayloadPtr::WriteBytes() 2022-03-27 16:16:19 +01:00
Connor McLaughlin
d3aace98ac GS/OpenGL: Fix fb target conflict without fbfetch 2022-03-27 04:33:20 +01:00
Connor McLaughlin
3a7f82eb66 GS/HW: Fix fbmask not inserting barriers
Or, missing the fb copy for D3D/barriers off.

Regression from fbfetch PR.
2022-03-27 04:33:20 +01:00
Connor McLaughlin
3e24b678c4 Build: Don't install pcsx2 core static lib on Linux 2022-03-26 14:11:33 +00:00
Connor McLaughlin
2ab6ca06ed Qt: Fix compile issues on Linux 2022-03-26 14:11:33 +00:00
Connor McLaughlin
9ac5041b43 Qt: Fix double entries in audio output modules 2022-03-26 14:11:33 +00:00
Connor McLaughlin
9262422d01 Qt: Add missing null terminator in audio settings 2022-03-26 07:56:52 +00:00
Mrlinkwii
9f04becc7a GameDB : various game improvements 2022-03-25 17:00:57 +00:00
RedDevilus
8485af6cac GameDB: GS HW Fix XI
The game also needs round sprite half for the transitional areas and red forest because of vertical lines similar to Star Ocean 3.
+ other fixes, read the GameDB comments for more information.
Relevant games:
- Atelier Iris 3 - Grand Phantasm
- Baldur's Gate - Dark Alliance 1 / 2
- Call of Duty 2 - Big Red One
- Dark Cloud 1 / 2
- Mana Khemia 1 / 2
- Sims 2 - Castaway
- Valkyrie 2 - Silmeria
2022-03-25 16:31:07 +00:00
TheLastRar
48f7e6c63f DEV9: Add Qt UI 2022-03-25 13:50:25 +00:00
TheLastRar
e1fb84d6a3 DEV9: Separate HddCreate code from Wx
Also disable auto generating an image on boot if one is not found
2022-03-25 13:50:25 +00:00
TheLastRar
5db9a738c5 Config: Integrate internal DNS host list on Qt 2022-03-25 13:50:25 +00:00
TheLastRar
145e75624d Config: Allow setting DNS1/2 internal instead of manual/auto 2022-03-25 13:50:25 +00:00
Connor McLaughlin
d09b49e17c Qt: Hook up automatic mapping 2022-03-25 12:51:31 +00:00
Connor McLaughlin
fdc3ca1227 PAD: Add automatic mapping functions 2022-03-25 12:51:31 +00:00
Connor McLaughlin
51d47a1455 InputManager: Add generic input mappings 2022-03-25 12:51:31 +00:00
Connor McLaughlin
9504671919 PAD: Add macro buttons 2022-03-25 12:51:31 +00:00
Connor McLaughlin
e5248db844 StringUtil: Add SplitString() 2022-03-25 12:51:31 +00:00
Connor McLaughlin
551d013b63 Qt: Add shutdown hotkey 2022-03-25 12:51:18 +00:00
Connor McLaughlin
d65950cda2 VMManager: Add BIOS check on startup
Except when running GS dumps.
2022-03-25 12:51:18 +00:00
Connor McLaughlin
15c38a0a4e GSDumpReplayer: Add missing license header 2022-03-25 12:51:18 +00:00
TheLastRar
74ed14496b Qt: GS Settings Fixes 2022-03-25 10:26:23 +00:00
Connor McLaughlin
1fa6fb0a8c Qt: Add memory card settings 2022-03-25 10:26:09 +00:00
Connor McLaughlin
3dc6ae115f Qt: Implement (partial) audio settings 2022-03-25 10:26:09 +00:00
Connor McLaughlin
fa36b9b5cb MemoryCardFile: Add formatted/mtime to query, rename/delete ops 2022-03-25 10:26:09 +00:00
Connor McLaughlin
47fff9304b FileSystem: Add DeleteDirectory() and recursive variant 2022-03-25 10:26:09 +00:00
Mrlinkwii
29c0d93864 GUI/Docs : update compatibility URLs 2022-03-23 10:27:36 +00:00
RedDevilus
38ff521851 GameDB: Megaman + Nicktoons
Megaman X - Command Mission flickering FMV fix and fix for the lighting in the game Nicktoons Unite!
2022-03-22 22:02:30 +00:00
RedDevilus
34de1bffc6 GameDB: Remove outdated comments
The gameDB still had some leftover comments that aren't true anymore. In the past before 1.7.2002 / https://github.com/PCSX2/pcsx2/pull/3936 you needed to use full boot to correctly pass your chosen BIOS language to be piped to the game. Basically fast boot defaulted to the first entry in the available language list.
Full boot:
If you want to see BIOS logo - Good
Region check - Bad

Fast boot:
Immediately jump into the game - Good
Skips region check - Good
Now acts like full boot for languages - Good
2022-03-22 20:58:02 +00:00
Connor McLaughlin
8dc1592278 GSDumpReplayer: Fix ReadFIFO2 packet executing on wrong thread 2022-03-22 16:50:31 +00:00
Mrlinkwii
5b86205349 Gamedb: add 'VUSyncHack' to Totally Spies! Totally Party 2022-03-22 14:45:35 +00:00
Mrlinkwii
0d4fbd540e Gamedb: Fix 'SLES-54453' title 2022-03-22 14:27:39 +00:00
Connor McLaughlin
b9edabc236 Qt: Fix incorrect setting binding for display linear 2022-03-22 13:38:26 +00:00
Connor McLaughlin
180d9ae9c9 Qt: Correct EE/IOP console defaults 2022-03-22 13:38:26 +00:00
Connor McLaughlin
80cc2f0cb7 Qt: Log machine caps on startup 2022-03-22 13:38:26 +00:00
Connor McLaughlin
1927896442 GS: Fix some edge cases with fbfetch
Second alpha pass with A masked, DATE enabled, etc.
2022-03-21 20:24:09 +00:00
RedDevilus
bf9c1176b6 GameDB: Fix Midnightclub 3 + Add Evangelion Jo
Special texture to:
Midnight club 3
Evangelion - Jo
2022-03-21 20:23:54 +00:00
Tzerinas
166156519a GameDB: Fixes to TeamICO games.
Adds the Software Renderer FMV hack to ICO and Half-Pixel Offset (Vertex) to both games.
2022-03-21 20:16:46 +00:00
lightningterror
d89daa1b25 misc: A few more 32bit cleanups. 2022-03-21 20:56:03 +01:00
lightningterror
efc17f265c readme: Update to reflect recent drop of 32bit. 2022-03-21 20:28:33 +01:00
lightningterror
8427e6fd3e emitter test: Cleanup 32bit code. 2022-03-21 20:21:36 +01:00
lightningterror
f1ac712eba build: Remove _M_X86_64, __M_X86_64, _M_X86_32 defines.
32bit cleanup.
2022-03-21 20:21:36 +01:00
lightningterror
0d4394a749 core: Clean up 32bit code. 2022-03-21 20:21:36 +01:00
lightningterror
9dac598113 common: Clean up 32bit code. 2022-03-21 20:21:36 +01:00
lightningterror
6db573d255 emitter: Clean up 32bit code. 2022-03-21 20:21:36 +01:00
Connor McLaughlin
9b21f31b0d GS/Vulkan: Fix crash is vertex/index buffer causes exec 2022-03-21 18:36:31 +00:00
lightningterror
2fedecb809 GS-hw: Purge Evangelion crc hack.
It's broken, HPO special does the job.
Someone should add it to the hw gamefixes.
2022-03-21 17:25:25 +01:00
PCSX2 Bot
b24a8c70e3 PAD: Update to latest controller database. 2022-03-21 17:14:41 +01:00
RedDevilus
d6684efd26 GameDB: GS HW Batch X
Relevant:
Bully
Colosseum - Road to Freedom
Dark Chronicle (Dark Cloud 2)
Killzone
God of War
Gun
Midnight Club 3
Mortal Kombat - Deadly Alliance
Need for Speed Carbon / Most Wanted / Undercover
Prince of Persia - Sand of Time / The Two Thrones / Warrior Within
Resident Evil 4 (BioHazard 4)
Thrillville / Off the Rails
2022-03-21 15:04:45 +00:00
TellowKrinkle
644241959a GS: Fix inverted DSB check 2022-03-21 02:33:38 +00:00
TellowKrinkle
273c1b1922 GS: Clean up leftover definitions
Accidentally leftover during the blend op refactor
2022-03-21 02:33:38 +00:00
Connor McLaughlin
45682c382f GS: Add NO_COLOR flag to PS (depth-only) 2022-03-20 23:41:33 +00:00
Connor McLaughlin
4e6b86f8f4 GS/Vulkan: Use VK_ARM_rasterization_order_attachment_access if available 2022-03-20 23:41:33 +00:00
Connor McLaughlin
a6b4ca69db GS/Vulkan: Support rendering without D32S8 2022-03-20 23:41:33 +00:00
Connor McLaughlin
6b32e00097 GS: Make factors part of blend state
Instead of using the blend map indices.
2022-03-20 23:41:33 +00:00
Connor McLaughlin
19d310475b GS: Draw alpha pass when dual source blend is missing 2022-03-20 23:41:33 +00:00
Connor McLaughlin
a8b9df3952 GS: Utilize GL_EXT_framebuffer_fetch where available 2022-03-20 23:41:33 +00:00
Connor McLaughlin
bb75c78c1a GS: Add option to disable texture barriers/geometry shaders 2022-03-20 23:41:33 +00:00
Mrlinkwii
57ea137982 Gamedb: add missing serials 2022-03-20 23:25:42 +00:00
refractionpcsx2
9721ed0fb3 GS: Use pixel format mask for FBMSK checks 2022-03-20 23:24:42 +00:00
Mrlinkwii
224863fbd5 GameDB: adds 'VUSyncHack' to Panzer Elite Action - Fields of Glory 2022-03-20 17:40:43 +00:00
Mrlinkwii
1d459d8fab Gamedb: Remove VU rounding form 'Hitman - Contracts' 2022-03-20 15:30:00 +00:00
arcum42@gmail.com
33e0ac729e Core: Remove memcmp_mmx. 2022-03-20 12:54:58 +00:00
Connor McLaughlin
268ecf42c3 Build: Remove 32bit configs from vsprops 2022-03-20 12:53:42 +00:00
refractionpcsx2
708281f00b GS: Properly detect 16bit format on Texture Shuffle + Convert 2022-03-20 06:49:16 +00:00
RedDevilus
56b68a50e9 GameDB: Even more GS HW Fixes
Affects:
Ape Escape 3
Armored Core Last Raven
Berserk
Forever Kingdom
Front Mission 4 / 5
Need For Speed Underground 1 / 2
Kings Field 4 - The Ancient City
Test Drive Unlimited
Jak 2 / 3 / X
2022-03-20 05:57:18 +00:00
RedDevilus
e4048dc2dd CI: Update labeler to expand WX 2022-03-20 04:50:29 +00:00
TheLastRar
5949c772d1 Qt: Fix bugs relating to per-game settings 2022-03-20 04:13:45 +00:00
RafaelTrepaUnCarballo
63998b64cc fix comment format 2022-03-20 04:10:11 +00:00
RafaelTrepaUnCarballo
fbb3ea142a Add files via upload
Added gshack (wild arms hack) for all releases of Wild Arms Alter Code F
2022-03-20 04:10:11 +00:00
Tyler Wilding
435f760b5d GameDB: remove duplicate YAML keys 2022-03-20 04:03:03 +00:00
Tyler Wilding
f47129bd72 deps: update rapid-yaml to v0.4.1 2022-03-20 04:03:03 +00:00
Tyler Wilding
aa42acfe22 common: fix method name and clarify some behaviour 2022-03-20 04:03:03 +00:00
Tyler Wilding
ddfe6ac5c1 memcard: update ryml parsing for folder memory cards
also make the file handling safer
2022-03-20 04:03:03 +00:00
Tyler Wilding
624dff1b96 gamedb: move away from deprecated ryml::parse func 2022-03-20 04:03:03 +00:00
Tyler Wilding
8d498b564d deps: update rapid-yaml to latest commit
has a bug fix that we hit in folder memory cards
2022-03-20 04:03:03 +00:00
Christian Kenny
26561261bc Core: Remove unused code 2022-03-20 04:00:27 +00:00
Connor McLaughlin
44728be719 Misc: Fix incorrect printf of std::string_view 2022-03-20 04:00:13 +00:00
Tzerinas
678bb1218b GameDB: Add fixes for Tak Games
SoftwareRendererFMVHack for Tak 1&2, Half-Pixel Offset (Texture) for Guardians of Gross.
2022-03-20 04:00:04 +00:00
RedDevilus
c496e80eac PCSX2-GUI: Rename skipdraw and IDC for Partial Invalidation
Skipdraw and SkipDrawOffset isn't obvious to what it is. SkipDrawStart and SkipDrawEnd makes it obvious it's a range of values.
Also forgot to change the IDC for Disabling Partial Invalidation.
2022-03-20 03:59:38 +00:00
refractionpcsx2
269db188d0 Build: Remove 32bit from CMake. 2022-03-20 00:39:39 +00:00
refractionpcsx2
f5afbfd4f5 GS: Remove 32bit code from SW renderer 2022-03-20 00:39:39 +00:00
refractionpcsx2
ccd86a242c EE/VU JIT: Remove 32bit code 2022-03-20 00:39:39 +00:00
refractionpcsx2
42a5cb7ad2 Build: Remove 32bit targets from VS solution 2022-03-20 00:39:39 +00:00
Tyler Wilding
6977323d88 ci: remove redundant words from job names
its always 64bit now!
2022-03-19 21:19:48 +00:00
Tyler Wilding
7b1d03d45a ci: add link to previous release page in discord announcement 2022-03-19 21:19:48 +00:00
Tyler Wilding
8a4f1ef51a ci: stop building 32-bit
At this point -- not cleaning up the solution files / etc, only our actions.

Until the 32bit code itself is removed, we should still have an easy way to flip these back on.
2022-03-19 21:19:48 +00:00
Mrlinkwii
9b50bb2e81 Gamedb: remove no longer needed comments 2022-03-19 15:56:06 +00:00
Connor McLaughlin
4f27d779a1 GS/DX11: Fix incorrect format check for compressed textures 2022-03-19 03:57:20 +00:00
RedDevilus
73c6353351 Qt: Partial Invalidation
Some missing strings from the renaming.
2022-03-18 23:47:21 +00:00
Immersion95
f571b66a43 GameDB: HW fixes for Mega Man/Rockman X7 + Clamping mode fix (#5694) 2022-03-18 20:53:48 +00:00
BuildTools
901664ba44 GameDB: Rename fastTextureInvalidation
Attempt 2 renames fastTextureInvalidation to disablePartialInvalidation for more consistency with the new GUI name.
2022-03-18 13:52:36 +00:00
Immersion95
02012b5491 GameDB: HW fixes for Rockman X8
SoftwareRendererFMVHack for the NTSC-J & NTSC-K version of Megaman X8
2022-03-18 10:24:58 +00:00
TellowKrinkle
4f57e40c91 GS:SW: Fix lod on x64 2022-03-18 03:59:51 -05:00
RedDevilus
832e536a9e GameDB: Haunting Ground + 50 Cent and Level 5
Ranging from blurriness to font artifacts.
2022-03-18 08:44:33 +00:00
BuildTools
c2316ca5bc GUI: Rename Fast Texture Invalidation
Renames Fast Texture Invalidation to Disable Partial Invalidation.

Update GraphicsSettingsWidget.ui
2022-03-18 02:11:12 +00:00
refractionpcsx2
3535edcfa1 GameDB: Add partial preloading to Stolen 2022-03-17 18:40:11 +00:00
KrossX
a4932ed0f1 GameDB: Add DMABusy fix to Shining Wind 2022-03-17 14:33:07 +00:00
seta-san
515d9040a1 GameDB: Add gsHWFixes for Tales of Symphonia
Co-Authored-By: RedDevilus <martensregis@gmail.com>
2022-03-17 09:16:20 +00:00
Connor McLaughlin
fe3a743814 ImGuiManager: Cap usage percents to 100% 2022-03-17 09:10:12 +00:00
Connor McLaughlin
8e08cd772b PerformanceMetrics: Add GPU time 2022-03-17 09:10:12 +00:00
Connor McLaughlin
206f80c5f4 GS: Compute SW CPU per-thread not per-draw 2022-03-17 09:10:12 +00:00
RedDevilus
c6ce380042 GameDB: More GS HW Fixes
Some extra comments for Monster Lab and SSX Tricky.

New entries:

- Alter Echo
- Beyond Good and Evil
- Dragon Ball Z - Budokai Tenkaichi 2
- Fatal Frame 1 / 3
- Ghost in the Shell - Stand Alone Complex
- Global Defence Force
- Xenosaga 1 / 2 / 3
2022-03-17 08:57:58 +00:00
lightningterror
939d98d660 Qt: Allow skipdraw up to 10k max. 2022-03-17 02:44:14 +01:00
lightningterror
c9a3420f85 GS: Fix Wunused-variable warnings. 2022-03-17 00:50:28 +01:00
refractionpcsx2
9a1a399bac GameDB: Add a bunch of hw fixes and upscaling fixes 2022-03-16 23:40:53 +00:00
RedDevilus
c8aac1dca9 GameDB: Ace Combat + Soul Calibur + Metal Gear Solid Series
Missing mipmap from the Europese Ace Combat Zero/4/5, Align Sprite for them and Round Sprite. Align Sprite for SoulCalibur series.
Metal Gear 2 substance gets round sprite for font and Metal Gear 3 Subsistence gets Special (Texture) for blurriness.
2022-03-16 22:38:39 +00:00
lightningterror
14c17916f5 GS-hw: Optimize blending equations based on alpha value.
It will allow us to use free sw blending without texture barriers.

Will be especially helpful for opengl/vulkan.
2022-03-16 15:17:00 +01:00
RedDevilus
7b0576d7cc GameDB: Dog Island and COD Final Fronts (#5671) 2022-03-16 07:24:05 +00:00
Blackbird88
ecb118d5af GameDB: Add gsHWFixes for GTA LCS/VCS (#5662)
Co authored by @Blackbird88
2022-03-15 20:22:19 +00:00
RedDevilus
efbf187b35 GameDB: Upscaling GS Batch 2
Adds second batch of upscaling fixes.
2022-03-15 20:21:15 +00:00
Tzerinas
2ea3feba90 GameDB: Add Upscaling Fixes to Onimusha 3
Adds Half-Pixel Offset: Special (Texture) and Round Sprite (Full) to Onimusha 3: Demon Siege
2022-03-15 20:19:06 +00:00
Tzerinas
f265257efb GameDB: Add Software FMV to Grandia 2 and Xtreme
Adds the SoftwareRendererFMV hack to Grandia 2 and Xtreme. Also adjusted titles.
2022-03-15 20:18:43 +00:00
lightningterror
13cc0caed7 GS Debugger: Fix hw hacks behavior not properly disabling. 2022-03-15 15:46:24 +01:00
refractionpcsx2
2068240e1a GS: Adjust Auto Flush to catch edge cases
Affected Beyond Good and Evil water
2022-03-15 10:15:21 +00:00
Tzerinas
7f5901f022 GameDB: GS HW renderer fixes for Tales of the Abyss
Description of Changes
Add Half-Pixel Offset: Special (Texture) to Tales of the Abyss.
2022-03-15 09:38:24 +00:00
Tokman5
a022de6225 GameDB: Add gsHWFixes for Shutokou Battle 01. (#5659)
Co-authored-by: Tokman5 <isozin_1210@yahoo.co.jp>
2022-03-15 08:12:52 +00:00
RedDevilus
f5570b7f40 GameDB: Rogue Galaxy
Adds half roundsprite to make upscaled HW more like software mode such as minimap while fighting.
2022-03-15 08:11:17 +00:00
RedDevilus
7e1c48694a GameDB: Upscaling GS Batch 1
Fixes the lint and adds a bunch of upscaling fixes.
2022-03-15 00:54:38 +00:00
lightningterror
a546f61ea8 Qt: Fix Round sprite hack not applying. 2022-03-14 23:43:25 +01:00
PCSX2 Bot
7ecac10eee PAD: Update to latest controller database. 2022-03-14 22:20:49 +01:00
Mrlinkwii
ee2e10e86b GameDB: correct and update serials 2022-03-14 19:15:50 +00:00
RedDevilus
7752f44a90 GameDB: Documentation
Add values for GameDB, GUI options and the default to easier make GameDB changes
2022-03-14 19:14:40 +00:00
refractionpcsx2
e01fc3eb47 GS: Loosen requirement for half bottom 2022-03-14 19:14:26 +00:00
SaltyBet
910c8190e0 GameDB: Added missing variants of NAMCO games 2022-03-14 15:47:02 +00:00
SaltyBet
a62ccc0d69 GameDB: Auto GS HW renderer fixes for some NAMCO games
- Tekken 4
- Tekken 5
- Tekken Tag Tournament
2022-03-14 15:47:02 +00:00
Dreadmoth
4f47041108 GameDB: Metal Arms - Glitch in the System (PAL)
Force disable mVU Flag Hack to prevent SPS
2022-03-14 15:33:39 +00:00
Connor McLaughlin
16cfde0538 GS: Use single array for dump packets 2022-03-14 15:26:19 +00:00
Connor McLaughlin
6a15d46461 Qt: Improve boot filename autodetection 2022-03-14 15:26:19 +00:00
Connor McLaughlin
4331ae1925 VMManager: Support playing back GS dumps 2022-03-14 15:26:19 +00:00
Connor McLaughlin
4d85d916b7 GS: Move dump file loading to core 2022-03-14 15:26:19 +00:00
Connor McLaughlin
4f4b14dd4d GameList: Add GetEntryByCRC() 2022-03-14 15:26:19 +00:00
Connor McLaughlin
444e650711 StringUtil: Add StartsWithNoCase/EndsWithNoCase 2022-03-14 15:26:19 +00:00
refractionpcsx2
c65ccaa153 GS-Config: Clear missing manual GS fixes 2022-03-14 11:08:39 +00:00
Connor McLaughlin
6b54db9b75 GS/VertexTrace: Fix min/max when last provoking vertex unsupported
This was causing incorrect min/max alpha values due to the index swap,
which caused the sides of text boxes in KH to disappear (because the
alpha test optimized to always failing).

Closes #5639.
2022-03-14 08:47:32 +00:00
Mrlinkwii
3bab470db6 Docs : Add GS hardware fixes and MTVUSpeedHack 2022-03-13 18:33:37 +00:00
refractionpcsx2
adf01cb56a GS-Build: Fix Dump Verticles for linux 2022-03-13 05:01:51 +00:00
refractionpcsx2
bbe3af7f61 GS-Debug: Dump verticles with draws
- Move context dumping to the top so we see it as the game set, not after we've messed with it.
Thanks to tadanokojin for these changes
2022-03-13 03:46:16 +00:00
refractionpcsx2
3e7d32c807 GameDB: Give slightly clearer message for GS Fix override 2022-03-13 03:18:44 +00:00
refractionpcsx2
76e25cb738 GameDB: Add mipmapping/trilinear for Hot Shots/Everybody's Golf games 2022-03-13 02:34:29 +00:00
refractionpcsx2
8f0dc34847 GS: Improvements to MTBA address calculation 2022-03-13 01:55:08 +00:00
RedDevilus
fc6ec2cc02 GameDB: Transformers Armada: Prelude to Energon
Adds missing VIFFIFO + force disabling MTVU for not getting black screen
2022-03-13 01:53:48 +00:00
refractionpcsx2
34b7b07ff8 GameDB: Added a whole host of auto GS HW renderer fixes 2022-03-13 01:53:15 +00:00
Connor McLaughlin
6c33b73cdd GS: Make TC offset changable without recreating 2022-03-12 20:48:51 +00:00
Connor McLaughlin
1e86ba4120 GS: Append game serial/name to dump filename 2022-03-12 20:48:51 +00:00
Connor McLaughlin
89c79aa6c3 GSDump: Add embedded screenshot 2022-03-12 20:48:51 +00:00
Connor McLaughlin
4ed748fa30 GSDump: Add extensible header and serial
Serial is used to apply hw fixes.
2022-03-12 20:48:51 +00:00
Connor McLaughlin
5569e94f41 GS: Make setting change detection more fine grained
Avoids the slower full restart when it's not needed.
2022-03-12 20:48:51 +00:00
Connor McLaughlin
892eec79ed Workflows: Fix lint-gamedb for gsHWFixes 2022-03-12 20:48:51 +00:00
Connor McLaughlin
b248b4a8af GameDB: Add HW fixes for GTASA/GOW/GOW2 2022-03-12 20:48:51 +00:00
Connor McLaughlin
39fe467b64 GS: Purge CRCs of unused titles 2022-03-12 20:48:51 +00:00
Connor McLaughlin
1c301ec889 GS: Move point list palette to gamedb 2022-03-12 20:48:51 +00:00
Connor McLaughlin
de5690ddcb GS: Move texture-inside-rt flag to gamedb 2022-03-12 20:48:51 +00:00
Connor McLaughlin
f376c8f7ae GS: Remove second source of truth for HWMipmap 2022-03-12 20:48:51 +00:00
Connor McLaughlin
2e199d47a8 GS: Move automatic mipmapping override to gamedb 2022-03-12 20:48:51 +00:00
Connor McLaughlin
96269db93e GameDatabase: Add ability to override GS fixes 2022-03-12 20:48:51 +00:00
Connor McLaughlin
d35db63d73 GS: Reference GSConfig instead of using theApp
Removes multiple sources of truth, enables overrides.
2022-03-12 20:48:51 +00:00
refractionpcsx2
9d003486c2 GS-hw: Attempt to improve half screen detection 2022-03-12 12:28:18 +00:00
refractionpcsx2
0c4b85980c GS: Support local to local transfers that overwrite themselves 2022-03-12 12:27:43 +00:00
Connor McLaughlin
5961db6b9b GS/Vulkan: Elide render pass restarts on depth buffer toggle 2022-03-12 12:22:51 +00:00
Connor McLaughlin
d0039c2920 Gif_Unit: Vectorize analyzeTag() 2022-03-12 12:10:32 +00:00
TellowKrinkle
5bdec2f532 x86emitter: Fix x64 8-bit rmw codegen 2022-03-11 12:59:57 +00:00
refractionpcsx2
fd758bb307 GameDB: Added MTVU disable to InstantVU off games 2022-03-11 10:25:15 +00:00
refractionpcsx2
a11d09ebdf Git: Update GameDB Validation script 2022-03-11 10:25:15 +00:00
refractionpcsx2
d294064da6 GameDB: Disable MTVU on T-Bit games 2022-03-11 10:25:15 +00:00
refractionpcsx2
fd4a5acc40 MTVU: Try to make T-Bit more reliable.
Add MTVUSpeedHack option to GameDB so it can be forcefully disabled
2022-03-11 10:25:15 +00:00
refractionpcsx2
05a7a61257 GS/Autoflush: Handle different page widths/arrangements 2022-03-11 10:24:26 +00:00
refractionpcsx2
90a4a11d49 GS: Add Auto Flush for Z buffer draws
Adjust Burnout CRC hack
2022-03-11 10:24:26 +00:00
lightningterror
d9f914eb7c GS-hw: Move the Ad to As equation swap when alpha is masked to Basic level and higher on gl/vk.
Safer this way, otherwise need to take in to account when accumulation, non recursive, and blend mix is enabled, or manually enable them on Minimum level.

Everything that we need is enabled on Basic level.

Change is done for clamp 1 only.
2022-03-09 23:24:44 +01:00
TheLastRar
134242973b Config: Set a sane default value for HddSizeSectors 2022-03-09 10:07:54 +00:00
TheLastRar
92900d8dc8 Config: Fix manual subnet mask save/load 2022-03-09 10:07:54 +00:00
Ziemas
7a970e1d00 Filesystem: Properly convert stat return to bool.
Two of the overloads where wrong.
2022-03-09 09:33:51 +00:00
Connor McLaughlin
e8e0f355fc GS/WX: Fix default adapter causing unnecessary GS restarts 2022-03-09 09:14:36 +00:00
Mrlinkwii
3202fd88d2 Gamedb: add VU clamping to 'DT Racer' and update MGS2 hack 2022-03-09 00:10:00 +00:00
RedDevilus
1c66c904ab GameDB: Katamari games
Katamari games have become sensitive again to this hack. It's forcefully disabled for this PR to fix performance and other breaking issues.
2022-03-09 00:08:21 +00:00
lightningterror
784e090081 GS-hw: Improve how we handle blending when output is Cd.
Disable hw blending on Cd output,
Disable rgb write on Cd output.
2022-03-08 23:46:27 +01:00
Connor McLaughlin
2d08d3dc94 GL/Context: Drop GL string logging back to devbuilds 2022-03-08 10:39:50 +01:00
Connor McLaughlin
237b9754c6 Qt: Log graphics driver info on startup 2022-03-08 10:39:50 +01:00
Connor McLaughlin
74bbccdf59 Wx: Log graphics driver info on startup 2022-03-08 10:39:50 +01:00
Connor McLaughlin
062d625901 Vulkan/Context: Allow non-debug device when validation layers unavailable 2022-03-08 10:39:50 +01:00
Connor McLaughlin
3f30c2bda2 VulkanHostDisplay: Improve Vulkan version reporting 2022-03-08 10:39:50 +01:00
PCSX2 Bot
0702692746 PAD: Update to latest controller database. 2022-03-07 17:11:41 +01:00
dependabot[bot]
11a218b1aa Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 14:15:25 +01:00
Connor McLaughlin
f4acff1321 Qt: Fix incorrect dropdown value in game properties 2022-03-07 14:14:49 +01:00
Connor McLaughlin
a8ee746c39 Qt: Fix live changing game settings not applying 2022-03-07 14:14:49 +01:00
Connor McLaughlin
ddd5fc7bf3 VMManager: Fix brief unpause before shutdown 2022-03-07 14:14:04 +01:00
lightningterror
22dfe05287 GS-hw: Optimize blending when ALPHA.A is equal to ALPHA.B.
Set ALPHA A B to 0 (Cs), and ALPHA.C to 0 (As).
2022-03-07 14:13:19 +01:00
refractionpcsx2
fa78e1295a GS: Handle Auto Flush across pages + scissor, add TEXFLUSH
Fixes Jak 3 shadows, partially fixes Beyond Good and Evil water, improves Auto Flush performance hugely (x3 in Jak 2 @ 3x Native)
2022-03-06 03:07:37 +00:00
refractionpcsx2
4a634ca154 GS: Fix compilation of GS SW Int Rasterizer 2022-03-05 16:55:54 +00:00
refractionpcsx2
bd1f5d0888 GS: Adjust Tekken 5 CRC hack for fire effect, fixes sun bleed.
Fixes #2766
2022-03-05 15:55:36 +00:00
Connor McLaughlin
2f028c5f40 Qt: Implement CTRL+C and confirm shutdown 2022-03-04 17:41:28 +00:00
Connor McLaughlin
56c8843406 Qt: Add log options to debug menu 2022-03-04 17:41:28 +00:00
Connor McLaughlin
37c4c596b5 Qt: Fix a few warnings on Linux 2022-03-04 17:41:28 +00:00
Connor McLaughlin
7b0bde4f1f Qt: Move section/key in setting binder
It's passed in by value, so elide the copy.
2022-03-04 17:41:28 +00:00
Connor McLaughlin
5c5c7d64a8 Qt: Remove version check macros
Not needed anymore since we require Qt6 on all platforms.
2022-03-04 17:41:28 +00:00
lightningterror
565189d08c GS-hw: Fix Wunused-variable warning in GSRendererHW. 2022-03-03 22:27:40 +01:00
lightningterror
682580e318 GS-hw: Fix Wsign-compare warnings in GSRendererNew. 2022-03-03 22:27:40 +01:00
lightningterror
74e3d6470a GS-hw: Fix Wunused-but-set-variable warnings in GSTextureCache. 2022-03-03 22:27:40 +01:00
refractionpcsx2
b4e6a715fc EE/JIT: Flush const on LDL/LDR instructions 2022-03-03 16:18:16 +00:00
Mrlinkwii
85f0d44997 Gamedb: add patch for Cars 2022-03-03 11:29:52 +00:00
TellowKrinkle
294855700d GS:OGL: Don't memset C++ objects 2022-03-02 12:10:12 +00:00
TellowKrinkle
099ddfedc7 GS:Mac: Properly init vulkan on main thread 2022-03-02 12:02:15 +00:00
TellowKrinkle
d9e2bcef6d GS:Mac: Nicer message send 2022-03-02 12:02:15 +00:00
TellowKrinkle
7a628f1a12 WX: Make texture dump location configurable 2022-03-02 11:58:44 +00:00
Mrlinkwii
75bc680934 GameDB: add 'VUSyncHack' to 'Tiger Woods PGA Tour 2002' and update documentation 2022-03-02 11:36:11 +00:00
Connor McLaughlin
0c98b5ff76 GS/TextureCache: Don't let hash cache memusage go negative 2022-03-01 17:34:59 +00:00
arcum42
11918e5846 Disable warnings on several third party libraries. (#5519) 2022-02-28 21:14:52 -08:00
refractionpcsx2
2c33bf8c6f GUI/Qt: Update VU Sync option in Qt interface 2022-02-28 19:29:53 +00:00
refractionpcsx2
e833a67bb7 VU: Rework VUKickstart in to VUSync, swap behaviour 2022-02-28 19:29:53 +00:00
refractionpcsx2
6dc5087cbd VU: Run sync ahead on small blocks 2022-02-28 19:29:53 +00:00
PCSX2 Bot
eabda670ac PAD: Update to latest controller database. 2022-02-28 17:52:52 +01:00
Connor McLaughlin
845e7930d7 microVU: Move VU0 micro flag instance setup to program start
They're only used in micro mode, so no point updating them in a cop2
chain.
2022-02-28 15:07:15 +00:00
Connor McLaughlin
d20bfa240d EE: Add COP2 flag hack 2022-02-28 15:07:15 +00:00
Connor McLaughlin
ba27a46ac6 GS/TextureCache: Don't count replacements in hash cache budget
Large replacement textures were causing the hash cache to disable
itself. There's plenty of other massive VRAM sinks in PCSX2 that we need
to consider before we can say we're managing VRAM well anyway.
2022-02-28 09:38:12 +00:00
Connor McLaughlin
866e5bd929 GS/TextureReplacements: Disable generated mipmaps on compressed textures
They should be provided in the file.
2022-02-28 09:38:12 +00:00
TellowKrinkle
1beb5517a7 Pad: Fix connection of macOS GameController framework controllers 2022-02-28 09:51:11 +01:00
TheLastRar
a12ad1f627 Config: Clang format Pcsx2Config 2022-02-28 09:44:14 +01:00
TheLastRar
c18be9dde7 Dependencies: Remove LibXml 2022-02-28 09:44:14 +01:00
TheLastRar
4eba400170 DEV9: Don't enforce MTA requirement
Also CoUninitialize() needs to be called for all successful calls to CoInitialize/Ex(), not just those that return S_OK
2022-02-28 09:44:14 +01:00
TheLastRar
dc376ab161 DEV9: Clang format net.cpp 2022-02-28 09:44:14 +01:00
TheLastRar
5ff49a78eb Config: Add DEV9 options to global struct
Additionally switch to using std::string in various locations in DEV9
2022-02-28 09:44:14 +01:00
TheLastRar
6df50992c4 DEV9: Remove old settings/log directory functions 2022-02-28 09:44:14 +01:00
TheLastRar
5d2bcfaa38 DEV9: Fix off by one error on LBA range check 2022-02-28 09:44:14 +01:00
TheLastRar
990d7ad0f7 DEV9: Correct DEV9 include in Tap 2022-02-28 09:44:14 +01:00
TheLastRar
510283cd4d DEV9: Rename DEV9's Config.h to DEV9Config.h 2022-02-28 09:44:14 +01:00
TheLastRar
dcc183179a DEV9: Use fs namespace instead of ghc 2022-02-28 09:44:14 +01:00
TheLastRar
30bc9b04c5 DEV9: Use UTF8 strings on windows for AdapterEntry 2022-02-28 09:44:14 +01:00
dependabot[bot]
8aaeb1c7ce Bump actions/setup-node from 2 to 3
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 09:25:18 +01:00
AKuHAK
1984c68516 PCSX2: Add ability to combine CLI options --elf or --irx with --gameargs
Exception: if full path to host: contains spaces, then arguments will be ignored. To avoid this you can use relative paths when possible.
2022-02-28 09:20:01 +01:00
refractionpcsx2
c81c89d6d9 GUI/Qt: Fix startup project for debugger 2022-02-28 07:34:52 +00:00
refractionpcsx2
9ce2405f3f GUI/Qt: Fix loading ELF files from menu 2022-02-28 07:05:15 +00:00
refractionpcsx2
21fba45a3c GameDB: Added patch for PowerDrome US 2022-02-27 15:22:42 +00:00
refractionpcsx2
a0bbdcefb3 GS: Ignore 24bit on DATE and Handle Reversed Color and Z
Clamp Framebuffer width to 1-32
2022-02-27 15:22:42 +00:00
lightningterror
753da789a0 GS-hw: Adjust DATE selection.
Remove fbmask check from DATE,
Enable DATE_BARRIER with one barrier when alpha isn't written and there is no alpha test.
2022-02-26 17:48:27 +01:00
lightningterror
cd5ce6e162 GH-workflows: Remove os mentions for auto pad db update.
Not needed anymore.
2022-02-24 14:52:41 +01:00
Connor McLaughlin
5a25cc171d GS: Add texture dumping and replacement system 2022-02-24 10:18:49 +00:00
Connor McLaughlin
32dc68f103 GS: Support BC1/BC2/BC3/BC7 compressed texture formats 2022-02-24 10:18:49 +00:00
Connor McLaughlin
69a500d657 GS: Add Swap() to GSTexture 2022-02-24 10:18:49 +00:00
Connor McLaughlin
ed9f34de5f Common/FileSystem: Add EnsureDirectoryExists() 2022-02-24 10:18:49 +00:00
iMineLink
d6f1291c0b GS: skip no output draws. 2022-02-24 10:12:59 +00:00
iMineLink
01079f5162 GS: upscale regardless of PCRTC enabling. 2022-02-24 10:12:59 +00:00
RedDevilus
9b0dc287c1 PCSX2-GUI: Rename Interlacing to Deinterlacing
So to sketch what is an annoying issue is that this for years has been wrongly presented to users.
None Interlacing = Interlacing but if used with a no-interlacing patch it will look like progressive but PCSX2 or really the internal PS2 side only detects interlacing mode. Which blows my mind that the user wouldn't be wrong to assume that None Interlacing = Interlacing.
Weave = Interlacing method (saw-tooth)
Bob = Likely the sharpest but can do vertical bouncing.
Blending = A bit blurry but the most consistent and has no bouncing.

I didn't change the code just the visual presentation to the users.

Example in gif format: https://upload.wikimedia.org/wikipedia/de/1/1e/Interlaced_Animation.gif
2022-02-24 00:38:01 +00:00
lightningterror
bb92566781 GS-hw: Don't trigger no overlap check for DATE_BARRIER on d3d11.
d3d11 doesn't support DATE_BARRIER, it's better to let the Date one cases handle it as it will be more accurate.
2022-02-23 20:48:00 +01:00
Connor McLaughlin
17b1c664a8 GS: Add option to disable status indicators
Fast forward/pause icons.
2022-02-23 15:45:47 +00:00
Connor McLaughlin
2eaba084c7 GS/TextureCache: Fix target not getting invalidated in some cases
This would happen when there was a source from local memory with the
same pointer as the target.

Fixes sky getting messed up in the Jak 3 menu when the hash cache is
enabled.
2022-02-23 15:45:19 +00:00
arcum42@gmail.com
ff75ab73cc Qt: Fix qt compilation on linux. 2022-02-22 19:23:51 +00:00
RedDevilus
3c54593456 Qt: Add themes
Ranging from ColorBlind themes to flashy to pastel. Based on the Fusion factory. 3 Light and 1 Dark extra themes (2 light and 2 dark themes on master) with enough variability and choice.
It's just a placeholder for when other factories are implemented and perhaps even viable for future community-based static or dynamic ones.
2022-02-22 16:13:09 +00:00
RedDevilus
39dfb2e606 Qt: Resize default headersize BIOS
Qt: Resize default headersize BIOS

The first column was too small and visually makes it harder to see what BIOS you have.
2022-02-22 16:13:09 +00:00
PCSX2 Bot
4e7ade8612 pad-windows/unix: Update to latest controller database. 2022-02-21 21:22:07 +01:00
seta-san
664013e7ad Qt: Fix type on graphics panel (#5553) 2022-02-21 19:10:14 +00:00
Connor McLaughlin
9d51c64d92 GS: Support mipmaps in hash cache 2022-02-21 16:50:57 +01:00
Connor McLaughlin
ee82c7834d GS: Auto-disable hash cache when it's too large 2022-02-21 16:50:57 +01:00
Connor McLaughlin
b389c6e103 GS: Only allocate valid page array when needed 2022-02-21 16:50:57 +01:00
Connor McLaughlin
b3a2d3c1e4 GS: Track hash cache memory usage 2022-02-21 16:50:57 +01:00
Connor McLaughlin
5d33af13ca GS: Add full (hash cache) texture preloading option 2022-02-21 16:50:57 +01:00
Connor McLaughlin
6b2a851dec GS/Vulkan: Fix uploading large (>64MB) textures 2022-02-21 16:50:57 +01:00
Connor McLaughlin
3b3072801c GS/OpenGL: Fix uploading large (>16MB) textures 2022-02-21 16:50:57 +01:00
Connor McLaughlin
9ed33d4337 GS/HW: Fix mipmap level not updating on live config change 2022-02-21 16:50:57 +01:00
Mrlinkwii
728b3eb5db Core: remove not needed logging 2022-02-21 10:46:29 +01:00
Connor McLaughlin
f73398ea84 GS/Vulkan: Fix warning when compiling RGBA8->RGB5A1 shader
Also gets rid of the program info log length check, since that's been
long removed in glslang.
2022-02-20 14:03:33 +00:00
lightningterror
2b646c2153 GS-hw: Disable dithering if blend mix is enabled.
It breaks stuff since we do a mix of hw/sw.
2022-02-20 02:31:03 +01:00
lightningterror
f83692c0df GS-ogl: Remove GL_ARB_get_texture_sub_image.
Not used.
Also remove some not used commented out defines.
2022-02-19 18:08:05 +01:00
lightningterror
b8236b1b1c GS-hw: Partially revert #5540
Allow to wrap on colclip.
For real tho, ideal solution is sw blend, doing any clamp/wrap is wrong on blend mix.
2022-02-19 00:38:13 +01:00
lightningterror
1a3d77b2c0 GS-hw: Fix d3d11 depth sample shader.
Also adjust some comments to match updated shader names.
2022-02-18 19:21:01 +01:00
lightningterror
816ee9e545 GS-hw: Prefer sw blend for clr_blend1_2 on ultra blending.
Opengl/Vulkan: Prefer sw blend over hw for clr_blend1_2 on ultra blending, doing hw is less accurate and will introduce rounding issues.

Direct3D11: Prefer sw blend over hw for clr_blend1_2 only when primitives don't overlap.
2022-02-18 19:06:49 +01:00
lightningterror
06766ddb98 GS-hw: Don't wrap on 16bit destination format for blend mix.
Helps Dog's Life blending, we shouldn't wrap as we do more blend math afterward which will be wrong if we wrapped before.
2022-02-18 19:00:54 +01:00
lightningterror
7151848406 GS-hw: Rename alpha_clamp to blend_mix. 2022-02-18 19:00:54 +01:00
Ziemas
45b5347092 SPU2: Don't cap pitch setting on register write.
While 0x3FFF is indeed the highest playable pitch I think that the
register is 16 bits wide and that the cap is enforced by the pitch
counter algorithm.

This fixes the air time ticking sound in Jak X.
2022-02-18 12:32:04 +00:00
Ty Lamontagne
5b6986c230 Core: Export recompiler offsets 2022-02-16 17:51:40 +00:00
Connor McLaughlin
de195d9b20 Qt: Add game summary and audio/memcard placeholders 2022-02-16 17:34:53 +01:00
Connor McLaughlin
b47552c08f Qt: Add per-game settings UI 2022-02-16 17:34:53 +01:00
Mrlinkwii
48dabd3ca2 QT: Add icon for Hk BIOS. 2022-02-15 20:54:27 +01:00
lockhart
91ac0368e3 GameDB: Add Ratchet & Clank demo and Spider-Man 3 Fixes + several new entries as well as the removal of the virtual-on Ontario program fixes.
This commit fixes several entries from the GameIndex, removes the clamping fixes from Virtual On ontario program which wasn't needed, adds several rounding fixes to Ratchet 1 titles to fix the Hydrodisplacer Behaviour and adds several entries as well.

For Ratchet 1, After having done tests on actual hardware,

the results shows that even real hardware will behave badly on the retail version....

However, the demo does indeed have an issue, so let's fix that.

Also, this fixes an oversight made for Spiderman 3 in the past, now the proper fix is applied.
2022-02-15 12:58:27 +00:00
Connor McLaughlin
dfe4bc199f GS/HW: Use integers for depth conversion shaders
Fixes z-fighting in reflections in DBZ BT3, maybe others?
2022-02-15 10:41:37 +01:00
PCSX2 Bot
1630404621 pad-windows/unix: Update to latest controller database. 2022-02-14 21:06:50 +01:00
Mrlinkwii
02c66491e8 Gamedb: add 'VUKickstartHack' to 'Jet Li - Rise to Honor' 2022-02-14 18:29:57 +00:00
refractionpcsx2
d4b1d9abe5 GS-hw: Increase 32->16bit conversion accuracy
Improves Dogs life (no longer goes completely black right away, but has decal problems)
Vastly improves texture quality in Spider-Man 3 when using Framebuffer Conversion to fix the textures
2022-02-14 14:50:21 +00:00
Ty Lamontagne
6ab77be8fc COP2: Move COP2 timing messages to release builds. 2022-02-14 01:52:44 +00:00
RedDevilus
6cf518e7df actions: Add windows category for SDL
Upcoming Qt will feature native support for multiple controllers + remapping for all relevant OSes. This makes the step a bit easier.

Rationale:
Windows has cleaner code (becoming just like OnePad) and no more DS4/DualSense/Switch Pro/... wrapper such as steam or DS4Windows (ryochan7) though will still work if you want it.
Linux will have OnePad legacy remapping.
Mac will have feature parity to some extent.
2022-02-14 01:50:57 +00:00
Mrlinkwii
8f1745bf44 Gamedb: add EETimingHack to 'Obscure 2' and patch to 'Snoopy Vs Red Baron' 2022-02-14 01:50:39 +00:00
lightningterror
38f1ae34ad GS-hw: Prefer sw blend when one barrier is already enabled and prims don't overlap.
More accurate, speed will be the same.
2022-02-13 14:11:51 +01:00
refractionpcsx2
ad415945a6 GS-hw: Apply clamp/wrap when FBMask enabled 2022-02-11 19:33:38 +01:00
Frank Hartung
a44fe29b8d CMake: add back HarfBuzz to fix build (#5510)
- pango relies on HarfBuzz & pulls in its headers
2022-02-10 17:56:19 -08:00
RedDevilus
c1d96fc876 CI: Label Qt into GUI/Qt
The label has recently been changed into GUI/Qt for more clarity that it touches upon a GUI toolkit just like WX. Also added the 3rdparty for the binary.
2022-02-10 21:04:28 +01:00
Florin9doi
65db50df5d Qt: Add icon for Cn BIOS. 2022-02-10 21:02:55 +01:00
Blackbird88
f009d6f9e7 GameDB: Add missing Gran Turismo demos 2022-02-09 10:56:25 +00:00
4700 changed files with 470764 additions and 1292157 deletions

View File

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

View File

@@ -26,13 +26,17 @@ The following is a list of *general* style recommendations that will make review
* Please try to prefix your commit message, indicating what area of the project was modified.
* For example `gs: message...`.
* 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
* GUI (SourceTree) - https://www.atlassian.com/blog/sourcetree/interactive-rebase-sourcetree
* Code Styling and Formatting
* [Consult the style guide](https://github.com/tadanokojin/pcsx2/blob/coding-guide/pcsx2/Docs/Coding_Guidelines.md)
* Run `clang-format` using the configuration file in the root of the repository
* Visual Studio Setup - https://devblogs.microsoft.com/cppblog/clangformat-support-in-visual-studio-2017-15-7-preview-1/
* IMPORTANT - if you are running `clang-format` on unrelated changes (ie. formatting an entire file), please do so in a separate commit.
@@ -41,9 +45,9 @@ The following is a list of *general* style recommendations that will make review
## General Documentation And Coding Strategies
* [Commenting Etiquette](https://github.com/PCSX2/pcsx2/wiki/Commenting-Etiquette)
* [Coding style](https://github.com/PCSX2/pcsx2/wiki/Code-Formatting-Guidelines)
* [More comprehensive style-guide (Currently in Draft)](https://github.com/tadanokojin/pcsx2/blob/coding-guide/pcsx2/Docs/Coding_Guidelines.md)
* [wxWidgets coding strategies](https://github.com/PCSX2/pcsx2/wiki/wxWidgets-Coding-Strategies)
## Tasks

3
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,3 @@
# These are supported funding model platforms
github: [PCSX2]

View File

@@ -60,16 +60,13 @@ body:
label: Operating System
options:
- Windows 11
- Windows 10 (32bit)
- Windows 10 (64bit)
- Windows 8.1 (32bit)
- Windows 8.1 (64bit)
- Linux (32bit) - Specify Distro Below
- Linux (64bit) - Specify Distro Below
- macOS (Monteray)
- macOS (BigSur)
- macOS (Catalina)
- macOS (Mojave)
- Linux (64bit) - Specify distro below
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input

View File

@@ -54,9 +54,6 @@ body:
Please make sure your system meets our requirements for OS version, CPU and GPU
- [System Requirements](https://github.com/PCSX2/pcsx2#system-requirements)
We **do not** accept bug reports for **unsupported operating systems**.
- [For macOS Support](https://forums.pcsx2.net/Thread-Native-Mac-Testing-Build)
Performance issues as a result of not meeting our hardware requirements are not valid
Please read our known issues pages for AMD and Intel drivers.
@@ -78,16 +75,13 @@ body:
label: Operating System
options:
- Windows 11
- Windows 10 (32bit)
- Windows 10 (64bit)
- Windows 8.1 (32bit)
- Windows 8.1 (64bit)
- Linux (32bit) - Specify Distro Below
- Linux (64bit) - Specify Distro Below
- macOS (Monteray)
- macOS (BigSur)
- macOS (Catalina)
- macOS (Mojave)
- Linux (64bit) - Specify distro below
- macOS 13 (Ventura)
- macOS 12 (Monterey)
- macOS 11 (Big Sur)
- macOS 10.15 (Catalina)
- macOS 10.14 (Mojave)
validations:
required: true
- type: input

42
.github/labeler.yml vendored
View File

@@ -12,7 +12,6 @@
- 'cmake/**/*'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- 'buildbot.xml'
- 'build.sh'
'Dependencies':
- '3rdparty/*'
@@ -24,18 +23,17 @@
- '**/*.md'
- '*.pdf'
- '**/*.pdf'
'GUI/WX':
- 'pcsx2/gui/*'
- 'pcsx2/gui/**/*'
'Qt':
'GUI/Qt':
- 'pcsx2-qt/*'
- 'pcsx2-qt/**/*'
- '3rdparty/Qt/*'
- '3rdparty/Qt/**/*'
'GameDB':
- '**/GameIndex.*'
'Installer | Package':
- 'nsis/*'
- 'nsis/**/*'
- 'build.sh'
'Translations':
- 'pcsx2-qt/Translations/*'
# Tools / Features
'Debugger':
@@ -49,6 +47,9 @@
'TAS Functionality':
- 'pcsx2/Recording/*'
- 'pcsx2/Recording/**/*'
'RetroAchievements':
- 'pcsx2/Frontend/Achievements.*'
- 'pcsx2/Achievements.*'
# Emulation Components
'Counters':
@@ -68,18 +69,34 @@
'GS':
- 'pcsx2/GS/*'
- 'pcsx2/GS/**/*'
'GS: Direct3D':
- 'bin/resources/shaders/*'
- 'bin/resources/shaders/**/*'
'GS: Direct3D 11':
- 'pcsx2/GS/Renderers/DX11/*'
- 'pcsx2/GS/Renderers/DX11/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
'GS: Direct3D 12':
- 'pcsx2/GS/Renderers/DX12/*'
- 'pcsx2/GS/Renderers/DX12/**/*'
- 'bin/resources/shaders/dx11/*'
- 'bin/resources/shaders/dx11/**/*'
'GS: Hardware':
- 'pcsx2/GS/Renderers/HW/*'
- 'pcsx2/GS/Renderers/HW/**/*'
'GS: OpenGL':
- 'pcsx2/GS/Renderers/OpenGL/*'
- 'pcsx2/GS/Renderers/OpenGL/**/*'
- 'bin/resources/shaders/opengl/*'
- 'bin/resources/shaders/opengl/**/*'
'GS: Vulkan':
- 'pcsx2/GS/Renderers/Vulkan/*'
- 'pcsx2/GS/Renderers/Vulkan/**/*'
- 'bin/resources/shaders/vulkan/*'
- 'bin/resources/shaders/vulkan/**/*'
'GS: Metal':
- 'pcsx2/GS/Renderers/Metal/*'
- 'pcsx2/GS/Renderers/Metal/**/*'
'GS: Texture Cache':
- 'pcsx2/GS/Renderers/*TextureCache*.*'
- 'pcsx2/GS/Renderers/**/*TextureCache*.*'
@@ -100,12 +117,9 @@
'Memory Card':
- 'pcsx2/gui/MemoryCard*'
- 'pcsx2/gui/**/MemoryCard*'
'PAD: Linux/Mac':
- 'pcsx2/PAD/Linux/*'
- 'pcsx2/PAD/Linux/**/*'
'PAD: Windows':
- 'pcsx2/PAD/Windows/*'
- 'pcsx2/PAD/Windows/**/*'
'PAD':
- 'pcsx2/PAD/*'
- 'pcsx2/PAD/**/*'
'SPU2':
- 'pcsx2/SPU2/*'
- 'pcsx2/SPU2/**/*'

View File

@@ -0,0 +1,14 @@
# CI Documentation
## Releases
```mermaid
sequenceDiagram
PCSX2 Repo->>Actions: PR is merged or commit is pushed to master
Actions->>PCSX2 Repo: Increment latest tag and push, create a draft release
Actions->>Actions: Kicked off pipeline on the tag push, build relevant configs
Actions->>PCSX2 Repo: Rename and upload artifacts to draft release, publish the release
Actions->>Discord: Announce release via a WebHook
PCSX2 Repo->>Web API: POST webhook to API informing it that a new release has occurred
Web API->>Web API: Update cache with new release
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -1,47 +0,0 @@
@startuml
participant User as user
participant Github as github
participant "Create Release WF" as create
participant "Build WFs" as build
participant "Finalize Release WF" as finalize
participant Discord as discord
==Nightly Release==
user -> github : New Commit on master (from PR, or directly)
...waiting for commit push event to fire...
github -> create : Push a new git tag, patch incrementing latest Version
alt from-pr? case
create -> create : Use links to the PR as a description
else was a commit
create -> create : Use Commit Message as Description
end
create -> create : Generate release notes
create -> github : Create new draft release, associated with tag and with the notes
note right
Draft releases are not public facing, only those with write access can see them!
end note
...waiting for push tag event to fire...
loop for all build workflows
github -> build : Build the tag commit
build -> build : .exe will use the git tag for it's title and such
build -> build : Upload the generated artifact to the associated release
alt all-artifacts-uploaded? case
build -> github : Publish the release
user -> github : Can now download the artifacts on the published release
end
note right
This is the only area where an eventual consistency issue is apparent
It is because GitHub does not fire events for when draft releases are edited
This is glossed over in the initial impl and can be improved and be made eventually consistent as well
end note
...waiting for release publish event to fire...
github -> finalize : Announce the Release
finalize -> github : Gather all asset links, and format message embed.
finalize -> discord : Announce new build via a WebHook
...waiting for announcement...
user -> discord : Can download artifacts from links via the discord
@enduml

View File

@@ -0,0 +1,29 @@
name: 🏭 Update Controller Database
on:
schedule:
- cron: "0 16 * * 1" # every monday @ 12pm EST - https://crontab.guru/#0_16_*_*_1
jobs:
update-controller-db:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Latest DB and Prepare DB File
run: |
cd .github/workflows/scripts/controller-db/
wget -O game_controller_db.txt https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
python ./update-db.py
mv ./game_controller_db.txt ${{github.workspace}}/bin/resources/game_controller_db.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
title: "PAD: Update to latest controller database"
commit-message: "PAD: Update to latest controller database."
committer: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
author: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
body: "Weekly automatic update of SDL Controller DB"
reviewers: lightningterror

View File

@@ -1,27 +0,0 @@
name: 📝 Validate GameDB
on:
push:
branches:
- master
paths:
- '**/GameIndex.yaml'
pull_request:
branches:
- master
paths:
- '**/GameIndex.yaml'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Validate GameDB
env:
SCRIPT_DIR: .github/workflows/scripts/validation/lint-gamedb
run: |
pip install -r "${SCRIPT_DIR}/requirements.txt"
python "${SCRIPT_DIR}/lint-gamedb.py"

31
.github/workflows/lint_gamedb.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: 📝 Validate GameDB
on:
push:
branches:
- master
paths:
- '**/GameIndex.yaml'
pull_request:
branches:
- master
paths:
- '**/GameIndex.yaml'
jobs:
lint:
name: Lint and Validate GameDB
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Validate Contents
run: |
npm install -g ajv-cli
ajv validate -s ./pcsx2/Docs/gamedb-schema.json --spec=draft2020 -d ./bin/resources/GameIndex.yaml
- name: Check Formatting
run: |
npm install -g prettier
prettier --check ./bin/resources/GameIndex.yaml

View File

@@ -1,239 +0,0 @@
name: 🐧 Linux Builds
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
paths-ignore:
- "**/*.md"
- "**/*.bat"
- "**/*.cmd"
- "**/*.props"
- "**/*.sln"
- ".clang-format"
- ".codacy.yaml"
- ".github/*"
- ".github/workflows/lint-gamedb.yml"
- ".github/workflows/macos-workflow.yml"
- ".github/workflows/pr-triage.yml"
- ".github/workflows/scripts/windows/**"
- ".github/workflows/scripts/validation/**"
- ".github/workflows/windows-workflow.yml"
- ".gitignore"
- "bin/PCSX2_keys.ini.default"
- "build.sh"
- "buildbot.xml"
- "pcsx2/CDVD/Windows/**"
- "pcsx2/DEV9/Win32/**"
- "pcsx2/PAD/Windows/**"
- "pcsx2/SPU2/Windows/**"
- "pcsx2/USB/Win32/**"
- "pcsx2/windows/**"
jobs:
build:
strategy:
# Prevent one build from failing everything (although maybe those should be included as experimental builds instead)
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
platform: x86
compiler: gcc
cmakeflags: -DLTO_PCSX2_CORE=ON
appimage: true
experimental: false
- os: ubuntu-18.04
platform: x64
compiler: gcc
cmakeflags: -DLTO_PCSX2_CORE=ON
appimage: true
experimental: false
- os: ubuntu-18.04
platform: x86
compiler: clang
# Need to disable PCH until cmake 3.17
# (PCH conflicts with ccache, fixed by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4400)
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
detail: " nopch"
appimage: false
experimental: false
- os: ubuntu-18.04
platform: x86
compiler: gcc
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
detail: " nopch"
appimage: false
experimental: false
- os: ubuntu-18.04
platform: x86
compiler: gcc
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON -DARCH_FLAG=-march=haswell
detail: " avx2 nopch"
appimage: false
experimental: false
name: ${{ matrix.platform }} | ${{ matrix.compiler }}${{ matrix.detail }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 100M
SDL: SDL2-2.0.16
PATCHELF_VERSION: 0.12
steps:
# NOTE - useful for debugging
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: |
# echo "$GITHUB_CONTEXT"
# echo ${{ github.event.pull_request.title }}
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout Submodules
if: steps.cache-submodules.outputs.cache-hit != 'true'
run: git submodule update --init --recursive -j $(getconf _NPROCESSORS_ONLN)
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files
uses: actions/cache@v2.1.7
with:
path: .ccache
key: ${{ matrix.os }} ${{ matrix.platform }} ${{ matrix.compiler }}${{ matrix.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ matrix.os }} ${{ matrix.platform }} ${{ matrix.compiler }}${{ matrix.detail }} ccache
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
run: |
ARCH=$([ "${{ matrix.platform }}" == x86 ] && echo "32bit" || echo "64bit")
ARTIFACT_NAME=""
if [ ${{ github.event_name }} == "pull_request" ]; then
PR_SHA=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
ARTIFACT_NAME="PCSX2-${ARCH}"
if [ ! -z "${{ github.event.pull_request.number }}" ]; then
PR_NUM=${{ github.event.pull_request.number }}
ARTIFACT_NAME="${ARTIFACT_NAME}-pr[${PR_NUM}]"
fi
ARTIFACT_NAME="${ARTIFACT_NAME}-sha[${PR_SHA}]"
if [ ! -z "${{ github.event.pull_request.title }}" ]; then
PR_TITLE=$(echo "${{ github.event.pull_request.title }}" | tr -cd '[a-zA-Z0-9[:space:]]_-')
ARTIFACT_NAME="${ARTIFACT_NAME}-title["${PR_TITLE}""
fi
else
SHA=$(git rev-parse --short "$GITHUB_SHA")
ARTIFACT_NAME="PCSX2-${ARCH}-sha[${SHA}"
fi
TRIMMED_ARTIFACT_NAME=$(printf "%.199s]" "$ARTIFACT_NAME")
echo "name=$TRIMMED_ARTIFACT_NAME"
echo "##[set-output name=name;]${TRIMMED_ARTIFACT_NAME}"
echo "##[set-output name=arch;]${ARCH}"
- name: Install Packages
env:
PLATFORM: ${{ matrix.platform }}
COMPILER: ${{ matrix.compiler }}
run: .github/workflows/scripts/linux/install-packages.sh
- name: Cache Dependencies
uses: actions/cache@v2.1.7
with:
path: |
3rdparty/${{ env.SDL }}
3rdparty/patchelf-${{ env.PATCHELF_VERSION }}
key: ${{ matrix.os }} ${{ matrix.platform }} ${{ env.SDL }} patchelf-${{ env.PATCHELF_VERSION }}
- name: Build Dependencies
run: |
if [[ ! -e 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} ]]; then
curl -sSfL https://github.com/NixOS/patchelf/releases/download/${{ env.PATCHELF_VERSION }}/patchelf-${{ env.PATCHELF_VERSION }}.tar.bz2 | tar -xjC 3rdparty
mv 3rdparty/patchelf-${{ env.PATCHELF_VERSION }}* 3rdparty/patchelf-${{ env.PATCHELF_VERSION }}
cd 3rdparty/patchelf-${{ env.PATCHELF_VERSION }}
./configure
make && cd ../../
fi
sudo make -C 3rdparty/patchelf-${{ env.PATCHELF_VERSION }} install
if [[ ! -e 3rdparty/${{ env.SDL }} ]]; then
curl -sL https://libsdl.org/release/${{ env.SDL }}.tar.gz | tar -xzC 3rdparty
cd 3rdparty/${{ env.SDL }}
if [ "${{ matrix.platform }}" == "x86" ]; then
./configure --build=i686-pc-linux-gnu CC=${{ matrix.compiler }} CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 --prefix=/usr --libdir=/usr/lib/i386-linux-gnu
else
./configure --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu
fi
make -j $(getconf _NPROCESSORS_ONLN) && cd ../../
fi
sudo make -C 3rdparty/${{ env.SDL }} install
- name: Generate CMake
env:
PLATFORM: ${{ matrix.platform }}
COMPILER: ${{ matrix.compiler }}
ADDITIONAL_CMAKE_ARGS: ${{ matrix.cmakeflags }}
run: .github/workflows/scripts/linux/generate-cmake.sh
- name: Build PCSX2
working-directory: build
run: ../.github/workflows/scripts/linux/compile.sh
- name: Run Tests
working-directory: ./build
run: ninja unittests
- name: Package AppImage
if: matrix.appimage == true
env:
PLATFORM: ${{ matrix.platform }}
COMPILER: ${{ matrix.compiler }}
name: ${{ steps.artifact-metadata.outputs.name }}
run: .github/workflows/scripts/linux/appimage.sh
- name: Upload artifact
if: matrix.appimage == true
uses: actions/upload-artifact@v2
with:
name: ${{ steps.artifact-metadata.outputs.name }}
path: ci-artifacts
# ---- Release / Tagging related steps ----
- name: Prepare Build Artifacts
if: github.repository == 'PCSX2/pcsx2' && startsWith(github.ref, 'refs/tags/') && matrix.appimage == true
run: |
mv ./ci-artifacts/*.AppImage ./ci-artifacts/linux-AppImage-${{ steps.artifact-metadata.outputs.arch }}.AppImage
ls ./ci-artifacts/
- name: Upload Assets and Potential Publish Release
if: github.repository == 'PCSX2/pcsx2' && startsWith(github.ref, 'refs/tags/') && matrix.appimage == true
env:
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
ASSET_DIR: ${{ github.WORKSPACE }}/ci-artifacts
ASSET_EXTENSION: AppImage
TAG_TO_SEARCH_FOR: ${{ github.REF }}
run: |
cd ./.github/workflows/scripts/releases/upload-release-artifacts
npm ci
node index.js

View File

@@ -0,0 +1,20 @@
name: 🐧 Linux Builds
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
build_linux_qt:
name: "AppImage"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt"
compiler: clang
cmakeflags: ""
buildAppImage: true
secrets: inherit

129
.github/workflows/linux_build_qt.yml vendored Normal file
View File

@@ -0,0 +1,129 @@
name: Linux Build Steps
on:
workflow_call:
inputs:
jobName:
required: true
type: string
os:
required: false
type: string
default: ubuntu-20.04
platform:
required: false
type: string
default: x64
compiler:
required: true
type: string
cmakeflags:
required: true
type: string
buildAppImage:
required: false
type: boolean
default: false
detail:
required: false
type: string
default: ""
cheats_url:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
jobs:
build_linux:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 100M
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: linux
GUI_FRAMEWORK: QT
ARCH: ${{ inputs.platform }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: ./.github/workflows/scripts/common/name-artifacts.sh
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.compiler }} ${{ inputs.detail }} ccache
- name: Install Packages
env:
COMPILER: ${{ inputs.compiler }}
run: .github/workflows/scripts/linux/install-packages-qt.sh
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} deps ${{ hashFiles('.github/workflows/scripts/linux/build-dependencies-qt.sh') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: .github/workflows/scripts/linux/build-dependencies-qt.sh
- name: Download cheats
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
- name: Generate CMake
env:
COMPILER: ${{ inputs.compiler }}
ADDITIONAL_CMAKE_ARGS: ${{ inputs.cmakeflags }}
run: .github/workflows/scripts/linux/generate-cmake-qt.sh
- name: Build PCSX2
working-directory: build
run: ../.github/workflows/scripts/linux/compile.sh
- name: Run Tests
working-directory: ./build
run: ninja unittests
- name: Package AppImage
if: inputs.buildAppImage == true
env:
NAME: ${{ steps.artifact-metadata.outputs.artifact-name }}
run: |
.github/workflows/scripts/linux/appimage-qt.sh "$(realpath .)" "$(realpath ./build)" "$HOME/deps" "$NAME"
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
mv "${NAME}.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts/
- name: Upload artifact
if: inputs.buildAppImage == true
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: ci-artifacts

View File

@@ -1,118 +0,0 @@
name: 🍎 MacOS Builds
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.bat'
- '**/*.cmd'
- '**/*.props'
- '**/*.sln'
- '.clang-format'
- '.codacy.yaml'
- '.github/*'
- '.github/workflows/lint-gamedb.yml'
- '.github/workflows/linux-workflow.yml'
- '.github/workflows/pr-triage.yml'
- '.github/workflows/scripts/windows/**'
- '.github/workflows/scripts/validation/**'
- '.github/workflows/windows-workflow.yml'
- '.gitignore'
- 'bin/PCSX2_keys.ini.default'
- 'build.sh'
- 'buildbot.xml'
- 'pcsx2/CDVD/Windows/**'
- 'pcsx2/DEV9/Win32/**'
- 'pcsx2/PAD/Windows/**'
- 'pcsx2/SPU2/Windows/**'
- 'pcsx2/USB/Win32/**'
- 'pcsx2/windows/**'
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.bat'
- '**/*.cmd'
- '**/*.props'
- '**/*.sln'
- '.clang-format'
- '.codacy.yaml'
- '.github/*'
- '.github/workflows/lint-gamedb.yml'
- '.github/workflows/linux-workflow.yml'
- '.github/workflows/pr-triage.yml'
- '.github/workflows/scripts/windows/**'
- '.github/workflows/scripts/validation/**'
- '.github/workflows/windows-workflow.yml'
- '.gitignore'
- 'bin/PCSX2_keys.ini.default'
- 'build.sh'
- 'buildbot.xml'
- 'pcsx2/CDVD/Windows/**'
- 'pcsx2/DEV9/Win32/**'
- 'pcsx2/PAD/Windows/**'
- 'pcsx2/SPU2/Windows/**'
- 'pcsx2/USB/Win32/**'
- 'pcsx2/windows/**'
jobs:
build:
strategy:
# Prevent one build from failing everything (although maybe those should be included as experimental builds instead)
fail-fast: false
matrix:
os: [macos-11.0]
platform: [x64]
experimental: [false]
name: ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 30
steps:
# NOTE - useful for debugging
# - name: Dump GitHub context
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: |
# echo "$GITHUB_CONTEXT"
# echo ${{ github.event.pull_request.title }}
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout Submodules
run: git submodule update --init --recursive -j $(getconf _NPROCESSORS_ONLN)
- name: Install Packages
env:
PLATFORM: ${{ matrix.platform }}
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_ANALYTICS: 1
run: |
# To save time, only brew update if running the install without it fails
function do-install() {
brew install sound-touch portaudio wxwidgets sdl2 libsamplerate
}
if ! do-install; then
brew update
do-install
fi
- name: Generate CMake Files
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_PO=FALSE -DLTO_PCSX2_CORE=ON -B build .
- name: Build PCSX2
working-directory: build
run: make -j$(getconf _NPROCESSORS_ONLN) # macOS doesn't use make install
- name: Run Tests
working-directory: build
run: make -j$(getconf _NPROCESSORS_ONLN) unittests

155
.github/workflows/macos_build.yml vendored Normal file
View File

@@ -0,0 +1,155 @@
name: MacOS Build Steps
on:
workflow_call:
inputs:
jobName:
required: true
type: string
os:
required: false
type: string
default: macos-11.0
platform:
required: false
type: string
default: x64
gui:
required: true
type: string
cheats_url:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
jobs:
build_macos:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 90
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPRESS: true
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 100M
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: macos
GUI_FRAMEWORK: ${{ inputs.gui }}
ARCH: ${{ inputs.platform }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: ./.github/workflows/scripts/common/name-artifacts.sh
- name: Install Packages
env:
PLATFORM: ${{ inputs.platform }}
HOMEBREW_NO_INSTALL_CLEANUP: 1
HOMEBREW_NO_ANALYTICS: 1
run: |
brew unlink libjpeg || true # Conflicts with our self-built dependencies
brew unlink libpng || true
# Unlike other packages, brew's MoltenVK build uses MoltenVK's minimum macOS version of 10.13 so we can use it
if ! brew install molten-vk ccache; then
brew update
brew install molten-vk ccache
fi
- name: Cache Dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: ~/deps
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} deps ${{ hashFiles('.github/workflows/scripts/macos/build-dependencies.sh') }}
- name: Build Dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
env:
GUI: ${{ inputs.gui }}
run: .github/workflows/scripts/macos/build-dependencies.sh
- name: Download cheats
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
run: echo "timestamp=$(date -u "+%Y-%m-%d-%H;%M;%S")" >> $GITHUB_OUTPUT
- name: Cache ccache cache
uses: actions/cache@v3
with:
path: .ccache
key: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} ccache ${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ inputs.os }} ${{ inputs.platform }} ${{ inputs.gui }} ccache
- name: Generate CMake Files
run: |
cmake -DCMAKE_PREFIX_PATH="$HOME/deps" \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_OPENGL=OFF \
-DDISABLE_ADVANCE_SIMD=ON \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DUSE_SYSTEM_LIBS=OFF \
-DUSE_SYSTEM_SDL2=ON \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
-B build .
- name: Build PCSX2
working-directory: build
run: |
ccache -p
ccache -s
ccache -z
make -j$(getconf _NPROCESSORS_ONLN) # macOS doesn't use make install
ccache -s
# Ensure there's no global constructors in multi-isa files
for dir in */CMakeFiles/GS-{avx,avx2}.dir; do
if find "$dir" -name "*.o" | xargs nm | grep _GLOBAL_; then
echo "::error::Multi-isa files must not have global constructors!"
exit 1
fi
done
- name: Run Tests
if: inputs.gui == 'Qt'
working-directory: build
run: make -j$(getconf _NPROCESSORS_ONLN) unittests
- name: Prepare Build Artifacts
run: |
cp /usr/local/lib/libMoltenVK.dylib build/pcsx2*/PCSX2.app/Contents/Frameworks/
TAG="$(git tag --points-at HEAD)"
if [ -z "$TAG" ]; then
APPNAME="${{ steps.artifact-metadata.outputs.artifact-name }}"
else
APPNAME="PCSX2-$TAG"
fi
mv build/pcsx2*/PCSX2.app "$APPNAME.app"
tar cvzf "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" "$APPNAME.app"
mkdir ci-artifacts
cp "${{ steps.artifact-metadata.outputs.artifact-name }}.tar.gz" ci-artifacts/macOS-${{ inputs.gui }}.tar.gz
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: "*.tar.gz"

View File

@@ -0,0 +1,18 @@
name: 🍎 MacOS Builds
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
build_macos_qt:
name: "Defaults"
uses: ./.github/workflows/macos_build.yml
with:
jobName: "Qt"
gui: "Qt"
secrets: inherit

View File

@@ -1,24 +0,0 @@
name: 📢 Announce Release
on:
release:
types: [published]
jobs:
announce:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Announce Release
env:
DISCORD_BUILD_WEBHOOK: ${{ secrets.DISCORD_BUILD_WEBHOOK }}
run: |
cd ./.github/workflows/scripts/releases/announce-release
npm ci
node index.js

View File

@@ -1,62 +0,0 @@
# Whenever a commit is pushed to master (ideally via a pull-request!)
# this action will create the next release, which means:
# 1. tag master with the proper version
# 2. create a new draft release (pre-released if a nightly build)
# 3. add release notes
name: 🏭 Create Release
on:
push:
branches:
- master
# TODO - future work
# workflow_dispatch:
# inputs:
# isStable:
# description: 'Should it be a stable release?'
# required: true
# default: 'false'
# versionTag:
# description: 'The version to tag with'
# required: true
jobs:
cut-release:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Docs - https://github.com/mathieudutour/github-tag-action
# Workflows cannot trigger other workflows implicitly
# - https://github.community/t/github-actions-workflow-not-triggering-with-tag-push/17053/7
- name: Bump Version and Push Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.BOT_PAT }}
tag_prefix: v
default_bump: patch
# Generate the Release Notes
- name: Generate Release Notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.SHA }}
run: |
cd ./.github/workflows/scripts/releases/generate-release-notes
npm ci
node index.js
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
ls
# Docs - https://github.com/softprops/action-gh-release
- name: Create a GitHub Release
uses: softprops/action-gh-release@v1
if: steps.tag_version.outputs.new_tag
with:
body_path: ./release-notes.md
draft: true
prerelease: true
tag_name: ${{ steps.tag_version.outputs.new_tag }}

24
.github/workflows/release_announce.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: 📢 Announce Release
on:
release:
types: [published]
jobs:
announce:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Announce Release
env:
DISCORD_BUILD_WEBHOOK: ${{ secrets.DISCORD_BUILD_WEBHOOK }}
run: |
cd ./.github/workflows/scripts/releases/announce-release
npm ci
node index.js

71
.github/workflows/release_new_tag.yml vendored Normal file
View File

@@ -0,0 +1,71 @@
# Whenever a commit is pushed to master (ideally via a pull-request!)
# this action will create the next release, which means:
# 1. tag master with the proper version
# 2. create a new draft release (pre-released if a nightly build)
# 3. add release notes
name: 🏭 Create Release
on:
push:
branches:
- master
# TODO - future work
# workflow_dispatch:
# inputs:
# isStable:
# description: 'Should it be a stable release?'
# required: true
# default: 'false'
# versionTag:
# description: 'The version to tag with'
# required: true
jobs:
cut-release:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
name: "Create Tag and Release"
steps:
- uses: actions/checkout@v3
# Docs - https://github.com/mathieudutour/github-tag-action
- name: Bump Version and Push Tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
# Workflows cannot trigger other workflows implicitly
# - https://github.community/t/github-actions-workflow-not-triggering-with-tag-push/17053/7
github_token: ${{ secrets.BOT_PAT }}
tag_prefix: v
default_bump: patch
# TODO - we could do this and remove the node.js script, but auto-generated notes only work
# with PRs -- not commits (determine how much we care).
# - name: Create Draft Release
# env:
# GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
# run: |
# echo "Creating release with tag - ${{ steps.tag_version.outputs.new_tag }}"
# gh release create ${{ steps.tag_version.outputs.new_tag }} --draft --generate-notes -title ${{ steps.tag_version.outputs.new_tag }}
- name: Generate Release Notes
env:
OWNER: PCSX2
REPO: pcsx2
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMIT_SHA: ${{ github.SHA }}
run: |
cd ./.github/workflows/scripts/releases/generate-release-notes
npm ci
node index.js
mv ./release-notes.md ${GITHUB_WORKSPACE}/release-notes.md
- name: Create a GitHub Release
uses: softprops/action-gh-release@v1
if: steps.tag_version.outputs.new_tag
with:
body_path: ./release-notes.md
draft: true
prerelease: true
tag_name: ${{ steps.tag_version.outputs.new_tag }}

115
.github/workflows/release_pipeline.yml vendored Normal file
View File

@@ -0,0 +1,115 @@
name: 🏭 Release Pipeline
on:
push:
tags:
- v*
jobs:
# Build Everything
# Linux
build_linux_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "Linux"
uses: ./.github/workflows/linux_build_qt.yml
with:
jobName: "Qt"
compiler: clang
cmakeflags: ""
buildAppImage: true
secrets: inherit
# Windows
build_windows_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: CMake
buildSystem: cmake
secrets: inherit
build_qt_sse4:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - SSE4"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release
simd: "SSE4"
secrets: inherit
build_qt_avx2:
if: github.repository == 'PCSX2/pcsx2'
name: "Windows - AVX2"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release AVX2
secrets: inherit
# MacOS
build_macos_qt:
if: github.repository == 'PCSX2/pcsx2'
name: "MacOS"
uses: ./.github/workflows/macos_build.yml
with:
jobName: "Qt"
gui: "Qt"
secrets: inherit
# Upload the Artifacts
upload_artifacts:
if: github.repository == 'PCSX2/pcsx2'
needs:
- build_linux_qt
- build_windows_qt
- build_qt_sse4
- build_qt_avx2
- build_macos_qt
name: "Upload Artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare Artifact Folder
run: mkdir ./ci-artifacts/
- uses: actions/download-artifact@v3
name: Download all Artifacts
with:
path: ./ci-artifacts/
- name: Display structure of downloaded files
run: ls ./ci-artifacts/
# Prepare artifacts, they are all zips from github!
- name: Prepare Artifacts
working-directory: ./ci-artifacts/
run: for d in *windows*/; do 7z a "${d}asset.7z" ./$d/*; done
# Artifact Naming:
# MacOS: PCSX2-<tag>-macOS-[additional hyphen seperated tags]
# Windows|Linux: PCSX2-<tag>-<windows|linux>-<32bit|64bit>--[additional hyphen seperated tags]
- name: Name and Upload the Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.REF }}
SCAN_DIR: ${{ github.WORKSPACE }}/ci-artifacts
OUT_DIR: ${{ github.WORKSPACE }}/ci-artifacts/out
run: |
gh release list --repo PCSX2/pcsx2
mkdir -p ${{ github.WORKSPACE }}/ci-artifacts/out
python ./.github/workflows/scripts/releases/rename-release-assets.py
ls ${{ github.WORKSPACE }}/ci-artifacts/out
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
gh release upload "${TAG_VAL}" ${{ github.WORKSPACE }}/ci-artifacts/out/* --repo PCSX2/pcsx2 --clobber
- name: Publish Release
env:
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
run: |
TAG_VAL=$(echo ${{ github.REF }} | awk -F'refs/tags/' '{print $2}')
gh release edit ${TAG_VAL} --draft=false --repo PCSX2/pcsx2

View File

@@ -0,0 +1,57 @@
#!/bin/bash
# Artifact Naming Scheme:
# PCSX2-<OS>-<GUI>-[ARCH]-[SIMD]-[pr\[PR_NUM\]]-[title|sha\[SHA|PR_TITLE\]
# -- limited to 200 chars
# Outputs:
# - artifact-name
# Inputs as env-vars
# OS
# BUILD_SYSTEM
# GUI_FRAMEWORK
# ARCH
# SIMD
# EVENT_NAME
# PR_TITLE
# PR_NUM
# PR_SHA
NAME=""
if [ "${OS}" == "macos" ]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}"
elif [[ ("${OS}" == "windows" && "$BUILD_SYSTEM" != "cmake") ]]; then
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}-${SIMD}"
else
NAME="PCSX2-${OS}-${GUI_FRAMEWORK}-${ARCH}"
fi
# Add cmake if used to differentate it from msbuild builds
# Else the two artifacts will have the same name and the files will be merged
if [[ ! -z "${BUILD_SYSTEM}" ]]; then
if [ "${BUILD_SYSTEM}" == "cmake" ]; then
NAME="${NAME}-${BUILD_SYSTEM}"
fi
fi
# Add PR / Commit Metadata
if [ "$EVENT_NAME" == "pull_request" ]; then
PR_SHA=$(git rev-parse --short "${PR_SHA}")
if [ ! -z "${PR_NUM}" ]; then
NAME="${NAME}-pr[${PR_NUM}]"
fi
NAME="${NAME}-sha[${PR_SHA}]"
if [ ! -z "${PR_TITLE}" ]; then
PR_TITLE=$(echo "${PR_TITLE}" | tr -cd '[a-zA-Z0-9[:space:]]_-')
NAME="${NAME}-title[${PR_TITLE}"
fi
else
SHA=$(git rev-parse --short "$GITHUB_SHA")
NAME="${NAME}-sha[${SHA}"
fi
# Trim the Name
NAME=$(printf "%.199s]" "$NAME")
echo "${NAME}"
echo "artifact-name=${NAME}" >> "$GITHUB_OUTPUT"

View File

@@ -1,6 +1,7 @@
import os
relevant_categories = [
"# Windows",
"# Mac OS X",
"# Linux"
]

View File

@@ -1,3 +0,0 @@
#!/bin/bash
$APPDIR/AppRun-patched

4
.github/workflows/scripts/linux/AppRun-qt vendored Executable file
View File

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

View File

@@ -1,10 +0,0 @@
#!/bin/bash
export LD_LIBRARY_PATH="$APPDIR/usr/lib:$LD_LIBRARY_PATH"
export BINARY_NAME=$(basename "$ARGV0")
if [[ ! -e "$PWD/$BINARY_NAME.config" ]]; then
mkdir "$PWD/$BINARY_NAME.config"
fi
export XDG_CONFIG_HOME="$PWD/$BINARY_NAME.config"
mkdir -p "$HOME"/.local/share/icons/hicolor/scalable/apps && cp "$APPDIR"/PCSX2.png "$HOME"/.local/share/icons/hicolor/scalable/apps

290
.github/workflows/scripts/linux/appimage-qt.sh vendored Executable file
View File

@@ -0,0 +1,290 @@
#!/usr/bin/env bash
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
# of the public at large and to the detriment of our heirs and
# successors. We intend this dedication to be an overt act of
# relinquishment in perpetuity of all present and future rights to this
# software under copyright law.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# For more information, please refer to <http://unlicense.org/>
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
if [ "$#" -ne 4 ]; then
echo "Syntax: $0 <path to pcsx2 directory> <path to build directory> <deps prefix> <output name>"
exit 1
fi
PCSX2DIR=$1
BUILDDIR=$2
DEPSDIR=$3
NAME=$4
BINARY=pcsx2-qt
APPDIRNAME=PCSX2.AppDir
STRIP=llvm-strip-12
declare -a SYSLIBS=(
"libaio.so.1"
"libz.so.1"
"libuuid.so.1"
"libapparmor.so.1"
"libblkid.so.1"
"libbsd.so.0"
"libdbus-1.so.3"
"libgcrypt.so.20"
"liblzma.so.5"
"libmount.so.1"
"libnsl.so.1"
"libpcre.so.3"
"libselinux.so.1"
"libsystemd.so.0"
"libudev.so.1"
"libwrap.so.0"
"libharfbuzz.so.0"
"libFLAC.so.8"
"libSoundTouch.so.1"
"libXau.so.6"
"libXcomposite.so.1"
"libXcursor.so.1"
"libXdamage.so.1"
"libXdmcp.so.6"
"libXext.so.6"
"libXfixes.so.3"
"libXi.so.6"
"libXinerama.so.1"
"libXrandr.so.2"
"libXrender.so.1"
"libXxf86vm.so.1"
"libasyncns.so.0"
"libcrypto.so.1.1"
"libjpeg.so.8"
"liblz4.so.1"
"libogg.so.0"
"libpcap.so.0.8"
"libpng16.so.16"
"libpulse.so.0"
"libsamplerate.so.0"
"libsndfile.so.1"
"libvorbis.so.0"
"libvorbisenc.so.2"
"libxcb.so.1"
"libxcb-render.so.0"
"libxcb-shm.so.0"
"libxkbcommon.so.0"
"libxkbcommon-x11.so.0"
"pulseaudio/libpulsecommon-13.99.so"
"libasound.so.2"
"libfreetype.so.6"
"libpcre2-16.so.0"
"libexpat.so.1"
"libffi.so.7"
"libgraphite2.so.3"
"libresolv.so.2"
"libgpg-error.so.0"
"libpcre2-16.so.0"
"libpng16.so.16"
"libxcb-icccm.so.4"
"libxcb-image.so.0"
"libxcb-keysyms.so.1"
"libxcb-randr.so.0"
"libxcb-render.so.0"
"libxcb-render-util.so.0"
"libxcb-shape.so.0"
"libxcb-sync.so.1"
"libxcb-util.so.1"
"libxcb-xfixes.so.0"
"libxcb-xkb.so.1"
"libevdev.so.2"
"libgudev-1.0.so.0"
"libinput.so.10"
"libjpeg.so.8"
"libmtdev.so.1"
"libpng16.so.16"
"libudev.so.1"
"libuuid.so.1"
"libcurl.so.4"
"libnghttp2.so.14"
"libidn2.so.0"
"librtmp.so.1"
"libssh.so.4"
"libpsl.so.5"
"libssl.so.1.1"
"libnettle.so.7"
"libgnutls.so.30"
"libgssapi_krb5.so.2"
"libldap_r-2.4.so.2"
"liblber-2.4.so.2"
"libbrotlidec.so.1"
"libunistring.so.2"
"libhogweed.so.5"
"libgmp.so.10"
"libp11-kit.so.0"
"libtasn1.so.6"
"libkrb5.so.3"
"libk5crypto.so.3"
"libcom_err.so.2"
"libkrb5support.so.0"
"libsasl2.so.2"
"libgssapi.so.3"
"libbrotlicommon.so.1"
"libkeyutils.so.1"
"libheimntlm.so.0"
"libkrb5.so.26"
"libasn1.so.8"
"libhcrypto.so.4"
"libroken.so.18"
"libwind.so.0"
"libheimbase.so.1"
"libhx509.so.5"
"libsqlite3.so.0"
"libcrypt.so.1"
)
declare -a DEPLIBS=(
"libSDL2-2.0.so.0"
)
declare -a QTLIBS=(
"libQt6Core.so.6"
"libQt6Gui.so.6"
"libQt6Network.so.6"
"libQt6OpenGL.so.6"
"libQt6Svg.so.6"
"libQt6WaylandClient.so.6"
"libQt6WaylandCompositor.so.6"
"libQt6WaylandEglClientHwIntegration.so.6"
"libQt6WaylandEglCompositorHwIntegration.so.6"
"libQt6Widgets.so.6"
"libQt6XcbQpa.so.6"
)
declare -a QTPLUGINS=(
"plugins/iconengines"
"plugins/imageformats"
"plugins/platforms"
#"plugins/platformthemes" # Enable this if we want to ship GTK+ themes at any point.
"plugins/tls"
"plugins/wayland-decoration-client"
"plugins/wayland-graphics-integration-client"
"plugins/wayland-graphics-integration-server"
"plugins/wayland-shell-integration"
"plugins/xcbglintegrations"
)
set -e
if [ ! -f appimagetool-x86_64.AppImage ]; then
retry_command wget -O appimagetool-x86_64.AppImage https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
fi
OUTDIR=$(realpath "./$APPDIRNAME")
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
rm -fr "$OUTDIR"
mkdir "$OUTDIR"
mkdir "$OUTDIR/usr"
echo "Copying binary and resources..."
cp -a "$BUILDDIR/bin" "$OUTDIR/usr"
# Patch RPATH so the binary goes hunting for shared libraries in the AppDir instead of system.
echo "Patching RPATH in ${BINARY}..."
patchelf --set-rpath '$ORIGIN/../lib' "$OUTDIR/usr/bin/$BINARY"
# Currently we leave the main binary unstripped, uncomment if this is not desired.
#$STRIP "$OUTDIR/usr/bin/$BINARY"
# Libraries we pull in from the system.
echo "Copying system libraries..."
mkdir -p "$OUTDIR/usr/lib" "$OUTDIR/usr/lib/pulseaudio"
for lib in "${SYSLIBS[@]}"; do
blib=$(basename "$lib")
if [ -f "/lib/x86_64-linux-gnu/$lib" ]; then
cp "/lib/x86_64-linux-gnu/$lib" "$OUTDIR/usr/lib/$blib"
elif [ -f "$CHROOT/usr/lib/x86_64-linux-gnu/$lib" ]; then
cp "$CHROOT/usr/lib/x86_64-linux-gnu/$lib" "$OUTDIR/usr/lib/$blib"
elif [ -f "$CHROOT/lib/$lib" ]; then
cp "$CHROOT/lib/$lib" "$OUTDIR/usr/lib/$blib"
elif [ -f "$CHROOT/usr/lib/$lib" ]; then
cp "$CHROOT/usr/lib/$lib" "$OUTDIR/usr/lib/$blib"
else
echo "*** Failed to find '$blib'"
exit 1
fi
$STRIP "$OUTDIR/usr/lib/$blib"
done
# Dependencies we built, at this point it's just SDL.
echo "Copying dependency libraries..."
for lib in "${DEPLIBS[@]}"; do
blib=$(basename "$lib")
if [ -f "$DEPSDIR/lib/$lib" ]; then
cp "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib/$blib"
else
echo "*** Failed to find '$blib'"
exit 1
fi
$STRIP "$OUTDIR/usr/lib/$blib"
done
echo "Copying Qt libraries..."
for lib in "${QTLIBS[@]}"; do
cp -aL "$DEPSDIR/lib/$lib" "$OUTDIR/usr/lib"
$STRIP "$OUTDIR/usr/lib/$lib"
done
echo "Copying Qt plugins..."
mkdir -p "$OUTDIR/usr/lib/plugins"
for plugin in "${QTPLUGINS[@]}"; do
mkdir -p "$OUTDIR/usr/lib/$plugin"
cp -aL "$DEPSDIR/$plugin"/*.so "$OUTDIR/usr/lib/$plugin/"
done
for so in $(find "$OUTDIR/usr/lib/plugins" -iname '*.so'); do
# This is ../../ because it's usually plugins/group/name.so
echo "Patching RPATH in ${so}..."
patchelf --set-rpath '$ORIGIN/../..' "$so"
$STRIP "$so"
done
for so in $(find "$OUTDIR/usr/lib" -maxdepth 1); do
if [ -f "$so" ]; then
echo "Patching RPATH in ${so}"
patchelf --set-rpath '$ORIGIN' "$so"
fi
done
echo "Creating qt.conf..."
cat > "$OUTDIR/usr/bin/qt.conf" << EOF
[Paths]
Plugins = ../lib/plugins
EOF
echo "Copy desktop/icon..."
cp "$PCSX2DIR/pcsx2/Resources/AppIcon64.png" "$OUTDIR/PCSX2.png"
cp "$SCRIPTDIR/pcsx2-qt.desktop" "$OUTDIR/PCSX2.desktop"
cp "$SCRIPTDIR/AppRun-qt" "$OUTDIR/AppRun"
echo "Generate AppImage"
./appimagetool-x86_64.AppImage -v "$OUTDIR" "$NAME.AppImage"

View File

@@ -1,59 +0,0 @@
#!/bin/bash
set -ex
echo "${PLATFORM}"
if [ "${PLATFORM}" == "x86" ]; then
APPARCH="i686"
ARCH="i386"
LIBARCH="i386-linux-gnu"
else
APPARCH="x86_64"
ARCH="x86_64"
LIBARCH="x86_64-linux-gnu"
fi
cd /tmp
curl -sSfLO "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-$ARCH.AppImage"
chmod a+x linuxdeploy*.AppImage
./linuxdeploy-"$ARCH".AppImage --appimage-extract
curl -sSfL "https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh" -o /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-gtk.sh
chmod a+x /tmp/squashfs-root/usr/bin/linuxdeploy-plugin-gtk.sh
mv /tmp/squashfs-root/usr/bin/patchelf /tmp/squashfs-root/usr/bin/patchelf.orig
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
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
mkdir -p squashfs-root/usr/share/applications && cp ./squashfs-root/PCSX2.desktop ./squashfs-root/usr/share/applications
mkdir -p squashfs-root/usr/share/icons && cp ./squashfs-root/PCSX2.png ./squashfs-root/usr/share/icons
mkdir -p squashfs-root/usr/share/icons/hicolor/scalable/apps && cp ./squashfs-root/PCSX2.png ./squashfs-root/usr/share/icons/hicolor/scalable/apps
mkdir -p squashfs-root/usr/share/pixmaps && cp ./squashfs-root/PCSX2.png ./squashfs-root/usr/share/pixmaps
mkdir -p squashfs-root/usr/lib/
mkdir -p squashfs-root/usr/optional/libstdc++
mkdir -p squashfs-root/usr/optional/libgcc_s
cp ./.github/workflows/scripts/linux/AppRun "$GITHUB_WORKSPACE"/squashfs-root/AppRun
curl -sSfL "https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-$APPARCH" -o "$GITHUB_WORKSPACE"/squashfs-root/AppRun-patched
curl -sSfL "https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-$APPARCH.so" -o "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/exec.so
chmod a+x ./squashfs-root/AppRun
chmod a+x ./squashfs-root/runtime
chmod a+x ./squashfs-root/AppRun-patched
chmod a+x ./squashfs-root/usr/optional/exec.so
echo "$name" > "$GITHUB_WORKSPACE"/squashfs-root/version.txt
mkdir -p "$GITHUB_WORKSPACE"/squashfs-root/apprun-hooks
cp /usr/lib/$LIBARCH/libthai.so.0 "$GITHUB_WORKSPACE"/squashfs-root/usr/lib/
cp --dereference /usr/lib/"$LIBARCH"/libstdc++.so.6 "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/libstdc++/libstdc++.so.6
cp --dereference /lib/"$LIBARCH"/libgcc_s.so.1 "$GITHUB_WORKSPACE"/squashfs-root/usr/optional/libgcc_s/libgcc_s.so.1
chmod +x .github/workflows/scripts/linux/app-variables.sh
cp .github/workflows/scripts/linux/app-variables.sh "$GITHUB_WORKSPACE"/squashfs-root/apprun-hooks
export UPD_INFO="gh-releases-zsync|PCSX2|pcsx2|latest|$name.AppImage.zsync"
export OUTPUT="$name.AppImage"
/tmp/squashfs-root/AppRun --appdir="$GITHUB_WORKSPACE"/squashfs-root/ --plugin gtk -d "$GITHUB_WORKSPACE"/squashfs-root/PCSX2.desktop -i "$GITHUB_WORKSPACE"/squashfs-root/PCSX2.png --output appimage
mkdir -p "$GITHUB_WORKSPACE"/ci-artifacts/
ls -al .
mv "$name.AppImage" "$GITHUB_WORKSPACE"/ci-artifacts # && mv "$name.AppImage.zsync" "$GITHUB_WORKSPACE"/ci-artifacts
chmod -R 777 ./ci-artifacts
cd ./ci-artifacts
ls -al .

View File

@@ -0,0 +1,125 @@
#!/usr/bin/env bash
set -e
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
QT=6.3.1
mkdir -p deps-build
cd deps-build
cat > SHASUMS <<EOF
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
d7bdd55e2908ded901dcc262157100af2a490bf04d31e32995f6d91d78dfdb97 qttranslations-everywhere-src-$QT.tar.xz
6f14fea2d172a5b4170be3efcb0e58535f6605b61bcd823f6d5c9d165bb8c0f0 qtwayland-everywhere-src-$QT.tar.xz
EOF
curl -L \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtwayland-everywhere-src-$QT.tar.xz"
shasum -a 256 --check SHASUMS
echo "Building SDL..."
tar xf "$SDL.tar.gz"
cd "$SDL"
./configure --prefix "$INSTALLDIR" --disable-dbus --without-x --disable-video-opengl --disable-video-opengles --disable-video-vulkan --disable-wayland-shared --disable-ime --disable-oss --disable-alsa --disable-jack --disable-esd --disable-pipewire --disable-pulseaudio --disable-arts --disable-nas --disable-sndio --disable-fusionsound --disable-diskaudio
make "-j$NPROCS"
make install
cd ..
# Couple notes:
# -fontconfig is needed otherwise Qt Widgets render only boxes.
# -qt-doubleconversion avoids a dependency on libdouble-conversion.
# ICU avoids pulling in a bunch of large libraries, and hopefully we can get away without it.
# OpenGL is needed to render window decorations in Wayland, apparently.
echo "Building Qt Base..."
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
mkdir build
cd build
../configure -prefix "$INSTALLDIR" -release -no-dbus -gui -widgets -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -- -DFEATURE_dbus=OFF -DFEATURE_icu=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF
cmake --build . --parallel
cmake --install .
cd ../../
echo "Building Qt SVG..."
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel
cmake --install .
cd ../../
echo "Building Qt Wayland..."
tar xf "qtwayland-everywhere-src-$QT.tar.xz"
cd "qtwayland-everywhere-src-$QT"
# qtwayland does not build without qml/qtdeclarative in 6.3.1. Work around it.
patch -u src/compositor/CMakeLists.txt <<EOF
--- src/compositor/CMakeLists.txt 2022-06-08 13:44:30.000000000 +1000
+++ src/compositor/CMakeLists.txt 2022-07-17 20:05:25.461881785 +1000
@@ -46,7 +46,6 @@
global/qtwaylandcompositorglobal.h
global/qtwaylandqmlinclude.h
global/qwaylandcompositorextension.cpp global/qwaylandcompositorextension.h global/qwaylandcompositorextension_p.h
- global/qwaylandquickextension.cpp global/qwaylandquickextension.h
global/qwaylandutils_p.h
hardware_integration/qwlclientbufferintegration.cpp hardware_integration/qwlclientbufferintegration_p.h
wayland_wrapper/qwlbuffermanager.cpp wayland_wrapper/qwlbuffermanager_p.h
EOF
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel
cmake --install .
cd ../../
echo "Installing Qt Tools..."
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# From Mac build-dependencies.sh:
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
# Avoid it by not building Linguist, since we only need the tools that come with it
patch -u src/linguist/CMakeLists.txt <<EOF
--- src/linguist/CMakeLists.txt
+++ src/linguist/CMakeLists.txt
@@ -14,7 +14,7 @@
add_subdirectory(lrelease-pro)
add_subdirectory(lupdate)
add_subdirectory(lupdate-pro)
-if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png)
+if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND TARGET Qt::PrintSupport AND NOT no-png)
add_subdirectory(linguist)
endif()
EOF
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF ..
cmake --build . --parallel
cmake --install .
cd ../../
echo "Installing Qt Translations..."
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
mkdir build
cd build
cmake -G Ninja -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel
cmake --install .
cd ../../
echo "Cleaning up..."
cd ..
rm -r deps-build

16
.github/workflows/scripts/linux/functions.sh vendored Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
function retry_command {
# Package servers tend to be unreliable at times..
# Retry a bunch of times.
local RETRIES=10
for i in $(seq 1 "$RETRIES"); do
"$@" && break
if [ "$i" == "$RETRIES" ]; then
echo "Command \"$@\" failed after ${RETRIES} retries."
exit 1
fi
done
}

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -e
if [ "${COMPILER}" = "clang" ]; then
echo "Using clang toolchain"
cat > "$HOME/clang-toolchain.cmake" << EOF
set(CMAKE_C_COMPILER /usr/bin/clang-12)
set(CMAKE_CXX_COMPILER /usr/bin/clang++-12)
set(CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld")
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-fuse-ld=lld")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld")
EOF
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_TOOLCHAIN_FILE=$HOME/clang-toolchain.cmake"
fi
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
# Generate CMake into ./build
# DISABLE_ADVANCE_SIMD is needed otherwise we end up doing -march=native.
# shellcheck disable=SC2086
cmake \
-B build \
-G Ninja \
$ADDITIONAL_CMAKE_ARGS \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DQT_BUILD=ON \
-DCUBEB_API=ON \
-DX11_API=ON \
-DWAYLAND_API=ON \
-DENABLE_SETCAP=OFF \
-DCMAKE_PREFIX_PATH="$HOME/deps" \
-DUSE_SYSTEM_SDL2=ON \
-DUSE_SYSTEM_ZSTD=OFF \
-DDISABLE_ADVANCE_SIMD=TRUE

View File

@@ -1,32 +0,0 @@
#!/bin/bash
set -e
if [ "${COMPILER}" = "gcc" ]; then
export CC=gcc-10
export CXX=g++-10
else
export CC=clang
export CXX=clang++
fi
if [ "${PLATFORM}" = x86 ]; then
ADDITIONAL_CMAKE_ARGS="$ADDITIONAL_CMAKE_ARGS -DCMAKE_TOOLCHAIN_FILE=cmake/linux-compiler-i386-multilib.cmake"
fi
echo "Additional CMake Args - ${ADDITIONAL_CMAKE_ARGS}"
# Generate CMake into ./build
cmake \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DPACKAGE_MODE=TRUE \
-DWAYLAND_API=TRUE \
-DDISABLE_ADVANCE_SIMD=TRUE \
-DDISABLE_PCSX2_WRAPPER=TRUE \
-DCMAKE_INSTALL_PREFIX="squashfs-root/usr/" \
-DOpenGL_GL_PREFERENCE="LEGACY" \
-DOPENGL_opengl_LIBRARY="" \
-DXDG_STD=TRUE \
$ADDITIONAL_CMAKE_ARGS \
-GNinja \
-B build

View File

@@ -0,0 +1,77 @@
#!/bin/bash
SCRIPTDIR=$(dirname "${BASH_SOURCE[0]}")
source "$SCRIPTDIR/functions.sh"
set -e
# Packages - Build and Qt
declare -a BUILD_PACKAGES=(
"build-essential"
"git"
"cmake"
"ccache"
"ninja-build"
"libclang-dev" # Qt goes hunting for libclang-11 specifically.
"libclang-11-dev"
"libclang-12-dev"
"patchelf"
"libglib2.0-dev"
"libfontconfig1-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"libpng-dev"
"libfreetype-dev"
"libinput-dev"
"libxcb-*-dev"
"libxkbcommon-dev"
"libxkbcommon-x11-dev"
"libxrender-dev"
"libwayland-dev"
"libgl1-mesa-dev"
"libegl-dev"
"libegl1-mesa-dev"
"libgl1-mesa-dev"
"libssl-dev"
)
# Packages - PCSX2
declare -a PCSX2_PACKAGES=(
"libaio-dev"
"libasound2-dev"
"libbz2-dev"
"libcurl4-openssl-dev"
"libegl1-mesa-dev"
"libgl1-mesa-dev"
"libgtk-3-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"liblzma-dev"
"libpcap0.8-dev"
"libpng-dev"
"libpulse-dev"
"librsvg2-dev"
"libsamplerate0-dev"
"libsoundtouch-dev"
"libudev-dev"
"libx11-xcb-dev"
"pkg-config"
"zlib1g-dev"
)
if [ "${COMPILER}" = "gcc" ]; then
BUILD_PACKAGES+=("g++-10")
else
BUILD_PACKAGES+=("llvm-12" "lld-12" "clang-12")
fi
retry_command sudo apt-get -qq update && break
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
retry_command sudo apt-get -y install "${BUILD_PACKAGES[@]}"
# Install packages needed by pcsx2
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]}")
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
retry_command sudo apt-get -y install "${PCSX2_PACKAGES[@]}"

View File

@@ -1,63 +0,0 @@
#!/bin/bash
set -e
# Packages - Build Environment
declare -a BUILD_PACKAGES=(
"ccache"
"cmake"
"ninja-build"
)
# Packages - PCSX2
declare -a PCSX2_PACKAGES=(
"libaio-dev"
"libbz2-dev"
"libegl1-mesa-dev"
"libgdk-pixbuf2.0-dev"
"libgl1-mesa-dev"
"libgtk-3-dev"
"libharfbuzz-dev"
"libjpeg-dev"
"liblzma-dev"
"libpcap0.8-dev"
"libpng-dev"
"libpulse-dev"
"librsvg2-dev"
"libsamplerate0-dev"
"libsoundtouch-dev"
"libudev-dev"
"libwxgtk3.0-gtk3-dev"
"libx11-xcb-dev"
"libxml2-dev"
"pkg-config"
"portaudio19-dev"
"zlib1g-dev"
)
if [ "${COMPILER}" = "gcc" ]; then
BUILD_PACKAGES+=("g++-10-multilib")
else
BUILD_PACKAGES+=("clang-9")
PCSX2_PACKAGES+=("libstdc++-10-dev")
fi
# - https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md
ARCH=""
echo "${PLATFORM}"
if [ "${PLATFORM}" == "x86" ]; then
ARCH=":i386"
sudo dpkg --add-architecture i386
fi
sudo apt-get -qq update
# Install packages needed for building
echo "Will install the following packages for building - ${BUILD_PACKAGES[*]}"
#sudo apt remove gcc-9 g++-9
sudo apt-get -y install "${BUILD_PACKAGES[@]}"
# Install packages needed by pcsx2
PCSX2_PACKAGES=("${PCSX2_PACKAGES[@]/%/"${ARCH}"}")
echo "Will install the following packages for pcsx2 - ${PCSX2_PACKAGES[*]}"
sudo apt-get -y install "${PCSX2_PACKAGES[@]}"

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=PCSX2
StartupWMClass=PCSX2
GenericName=PlayStation 2 Emulator
Comment=Sony PlayStation 2 emulator
Exec=pcsx2-qt
Icon=PCSX2
Keywords=game;emulator;
Categories=Game;Emulator;

View File

@@ -0,0 +1,124 @@
#!/bin/bash
set -e
export MACOSX_DEPLOYMENT_TARGET=10.14
INSTALLDIR="$HOME/deps"
NPROCS="$(getconf _NPROCESSORS_ONLN)"
SDL=SDL2-2.26.0
PNG=1.6.37
JPG=9e
SOUNDTOUCH=soundtouch-2.3.1
QT=6.3.1
mkdir deps-build
cd deps-build
export PKG_CONFIG_PATH="$INSTALLDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L$INSTALLDIR/lib -dead_strip $LDFLAGS"
export CFLAGS="-I$INSTALLDIR/include -Os $CFLAGS"
export CXXFLAGS="-I$INSTALLDIR/include -Os $CXXFLAGS"
cat > SHASUMS <<EOF
8000d7169febce93c84b6bdf376631f8179132fd69f7015d4dadb8b9c2bdb295 $SDL.tar.gz
505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca libpng-$PNG.tar.xz
4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d jpegsrc.v$JPG.tar.gz
6900996607258496ce126924a19fe9d598af9d892cf3f33d1e4daaa9b42ae0b1 $SOUNDTOUCH.tar.gz
0a64421d9c2469c2c48490a032ab91d547017c9cc171f3f8070bc31888f24e03 qtbase-everywhere-src-$QT.tar.xz
7b19f418e6f7b8e23344082dd04440aacf5da23c5a73980ba22ae4eba4f87df7 qtsvg-everywhere-src-$QT.tar.xz
c412750f2aa3beb93fce5f30517c607f55daaeb7d0407af206a8adf917e126c1 qttools-everywhere-src-$QT.tar.xz
d7bdd55e2908ded901dcc262157100af2a490bf04d31e32995f6d91d78dfdb97 qttranslations-everywhere-src-$QT.tar.xz
EOF
curl -L \
-O "https://libsdl.org/release/$SDL.tar.gz" \
-O "https://downloads.sourceforge.net/project/libpng/libpng16/$PNG/libpng-$PNG.tar.xz" \
-O "https://www.ijg.org/files/jpegsrc.v$JPG.tar.gz" \
-O "https://www.surina.net/soundtouch/$SOUNDTOUCH.tar.gz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtbase-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qtsvg-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttools-everywhere-src-$QT.tar.xz" \
-O "https://download.qt.io/official_releases/qt/${QT%.*}/$QT/submodules/qttranslations-everywhere-src-$QT.tar.xz" \
shasum -a 256 --check SHASUMS
echo "Installing SDL..."
tar xf "$SDL.tar.gz"
cd "$SDL"
./configure --prefix "$INSTALLDIR" --without-x
make "-j$NPROCS"
make install
cd ..
echo "Installing libpng..."
tar xf "libpng-$PNG.tar.xz"
cd "libpng-$PNG"
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
make "-j$NPROCS"
make install
cd ..
echo "Installing libjpeg..."
tar xf "jpegsrc.v$JPG.tar.gz"
cd "jpeg-$JPG"
./configure --prefix "$INSTALLDIR" --disable-dependency-tracking
make "-j$NPROCS"
make install
cd ..
echo "Installing soundtouch..."
tar xf "$SOUNDTOUCH.tar.gz"
cd "$SOUNDTOUCH"
cmake -B build -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Base..."
tar xf "qtbase-everywhere-src-$QT.tar.xz"
cd "qtbase-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_optimize_size=ON -DFEATURE_dbus=OFF -DFEATURE_framework=OFF -DFEATURE_icu=OFF -DFEATURE_opengl=OFF -DFEATURE_printsupport=OFF -DFEATURE_sql=OFF -DFEATURE_gssapi=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt SVG..."
tar xf "qtsvg-everywhere-src-$QT.tar.xz"
cd "qtsvg-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=MinSizeRel
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Tools..."
tar xf "qttools-everywhere-src-$QT.tar.xz"
cd "qttools-everywhere-src-$QT"
# Linguist relies on a library in the Designer target, which takes 5-7 minutes to build on the CI
# Avoid it by not building Linguist, since we only need the tools that come with it
patch -u src/linguist/CMakeLists.txt <<EOF
--- src/linguist/CMakeLists.txt
+++ src/linguist/CMakeLists.txt
@@ -14,7 +14,7 @@
add_subdirectory(lrelease-pro)
add_subdirectory(lupdate)
add_subdirectory(lupdate-pro)
-if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png)
+if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND TARGET Qt::PrintSupport AND NOT no-png)
add_subdirectory(linguist)
endif()
EOF
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release -DFEATURE_assistant=OFF -DFEATURE_clang=OFF -DFEATURE_designer=OFF -DFEATURE_kmap2qmap=OFF -DFEATURE_pixeltool=OFF -DFEATURE_pkg_config=OFF -DFEATURE_qev=OFF -DFEATURE_qtattributionsscanner=OFF -DFEATURE_qtdiag=OFF -DFEATURE_qtplugininfo=OFF
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Installing Qt Translations..."
tar xf "qttranslations-everywhere-src-$QT.tar.xz"
cd "qttranslations-everywhere-src-$QT"
cmake -B build -DCMAKE_PREFIX_PATH="$INSTALLDIR" -DCMAKE_INSTALL_PREFIX="$INSTALLDIR" -DCMAKE_BUILD_TYPE=Release
make -C build "-j$NPROCS"
make -C build install
cd ..
echo "Cleaning up..."
cd ..
rm -r deps-build

View File

@@ -8,53 +8,23 @@ if (!releaseInfo.prerelease) {
process.exit(0);
}
const assets = releaseInfo.assets;
let windowsAssetLinks = "";
let linuxAssetLinks = "";
for (var i = 0; i < assets.length; i++) {
let asset = assets[i];
if (asset.name.includes("symbols")) {
continue;
}
if (asset.name.includes("windows")) {
let friendlyName = asset.name;
try {
friendlyName = asset.name.split("windows-")[1].split(".7z")[0].replace("-", " ");
} catch (e) {
console.log(e);
}
windowsAssetLinks += `- [${friendlyName}](${asset.browser_download_url})\n`
} else if (asset.name.includes("linux")) {
let friendlyName = asset.name;
try {
friendlyName = asset.name.split("linux-")[1].split(".AppImage")[0].replace("-", " ");
} catch (e) {
console.log(e);
}
linuxAssetLinks += `- [${friendlyName}](${asset.browser_download_url})\n`
}
}
// Publish Webhook
const embed = new MessageEmbed()
.setColor('#FF8000')
.setTitle('New PCSX2 Nightly Build Available!')
.setDescription("To download the latest or previous builds, [visit the official downloads page](https://pcsx2.net/downloads/).")
.addFields(
{ name: 'Version', value: releaseInfo.tag_name, inline: true },
{ name: 'Release Link', value: `[Github Release](${releaseInfo.html_url})`, inline: true },
{ name: 'Installation Steps', value: '[See Here](https://github.com/PCSX2/pcsx2/wiki/Nightly-Build-Usage-Guide)', inline: true },
{ name: 'Included Changes', value: releaseInfo.body, inline: false }
);
if (windowsAssetLinks != "") {
embed.addField('Windows Downloads', windowsAssetLinks, false);
}
if (linuxAssetLinks != "") {
embed.addField('Linux Downloads', linuxAssetLinks, false);
}
// Get all webhooks, simple comma-sep string
const webhookUrls = process.env.DISCORD_BUILD_WEBHOOK.split(",");
const webhookClient = new WebhookClient({ url: process.env.DISCORD_BUILD_WEBHOOK });
await webhookClient.send({
embeds: [embed],
});
for (const url of webhookUrls) {
const webhookClient = new WebhookClient({ url: url });
await webhookClient.send({
embeds: [embed],
});
}

View File

@@ -1,11 +1,15 @@
import { Octokit } from "@octokit/rest";
import { throttling } from "@octokit/plugin-throttling";
import { retry } from "@octokit/plugin-retry";
let owner = process.env.OWNER;
let repo = process.env.REPO;
Octokit.plugin(throttling);
Octokit.plugin(retry);
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
userAgent: 'PCSX2/pcsx2',
userAgent: `${owner}/${repo}`,
log: {
debug: () => { },
info: () => { },
@@ -39,14 +43,14 @@ let commitSha = process.env.COMMIT_SHA;
console.log(`Searching for Commit - ${commitSha}`);
const { data: commit } = await octokit.rest.repos.getCommit({
owner: "PCSX2",
repo: "pcsx2",
owner: owner,
repo: repo,
ref: commitSha,
});
const { data: associatedPulls } = await octokit.rest.repos.listPullRequestsAssociatedWithCommit({
owner: "PCSX2",
repo: "pcsx2",
owner: owner,
repo: repo,
commit_sha: commit.sha,
});

View File

@@ -0,0 +1,46 @@
import os
import shutil
tag = os.environ['TAG'].split("refs/tags/")[1]
scan_dir = os.environ['SCAN_DIR']
output_dir = os.environ['OUT_DIR']
accepted_exts = ["AppImage", "tar.gz", "7z"]
for dir_name in os.listdir(scan_dir):
asset_name = "pcsx2-{}".format(tag)
if "macos" in dir_name.lower():
asset_name += "-macos"
elif "linux" in dir_name.lower():
asset_name += "-linux-AppImage-64bit"
elif "windows" in dir_name.lower():
asset_name += "-windows-64bit"
else:
continue;
if "avx2" in dir_name.lower():
asset_name += "-AVX2"
elif "sse4" in dir_name.lower():
asset_name += "-SSE4"
asset_name += "-Qt"
if "symbols" in dir_name.lower():
asset_name += "-symbols"
print(asset_name)
dir_handled = False
for file in os.listdir(os.path.join(scan_dir, dir_name)):
for ext in accepted_exts:
if file.endswith(ext):
dir_handled = True
print("Moving {} to out dir".format(file))
shutil.move(os.path.join(scan_dir, dir_name, file), os.path.join(output_dir, asset_name + "." + ext))
break
if dir_handled:
break
if not dir_handled:
print("Could not find asset in directory when one was expected")
exit(1)

View File

@@ -1,2 +0,0 @@
node_modules/
*.md

View File

@@ -1,145 +0,0 @@
import { Octokit } from "@octokit/rest";
import { throttling } from "@octokit/plugin-throttling";
import { retry } from "@octokit/plugin-retry";
Octokit.plugin(throttling);
Octokit.plugin(retry);
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
userAgent: 'PCSX2/pcsx2',
log: {
debug: () => { },
info: () => { },
warn: console.warn,
error: console.error
},
throttle: {
onRateLimit: (retryAfter, options) => {
octokit.log.warn(
`Request quota exhausted for request ${options.method} ${options.url}`
);
// Retry twice after hitting a rate limit error, then give up
if (options.request.retryCount <= 2) {
console.log(`Retrying after ${retryAfter} seconds!`);
return true;
}
},
onAbuseLimit: (retryAfter, options) => {
// does not retry, only logs a warning
octokit.log.warn(
`Abuse detected for request ${options.method} ${options.url}`
);
},
}
});
let assetDir = process.env.ASSET_DIR;
let tagToSearchFor = process.env.TAG_TO_SEARCH_FOR.split("refs/tags/")[1];
console.log(`Searching in - ${assetDir}`);
console.log(`Searching for tag - ${tagToSearchFor}`);
const { data: recentReleases } = await octokit.rest.repos.listReleases({
owner: "PCSX2",
repo: "pcsx2",
per_page: 100
});
let release = undefined;
for (var i = 0; i < recentReleases.length; i++) {
if (recentReleases[i].tag_name == tagToSearchFor) {
release = recentReleases[i];
break;
}
}
if (release == undefined) {
console.log(`Unable to find release with tag - ${tagToSearchFor}`);
process.exit(1);
}
// Upload any assets we need to, don't upload assets that are already there!
const { data: releaseAssetsPre } = await octokit.rest.repos.listReleaseAssets({
owner: "PCSX2",
repo: "pcsx2",
release_id: release.id,
per_page: 100
});
import glob from 'glob';
import * as fs from 'fs';
import * as path from 'path';
glob(assetDir + `/**/*${process.env.ASSET_EXTENSION}`, {}, async (err, files) => {
for (var i = 0; i < files.length; i++) {
let foundDuplicate = false;
for (var j = 0; j < releaseAssetsPre.length; j++) {
let existingAsset = releaseAssetsPre[j];
if (existingAsset.name == `pcsx2-${release.tag_name}-${path.basename(files[i])}`) {
foundDuplicate = true;
break;
}
}
if (foundDuplicate) {
continue;
}
var assetBytes = fs.readFileSync(files[i], null);
const { data: uploadAsset } = await octokit.rest.repos.uploadReleaseAsset({
owner: "PCSX2",
repo: "pcsx2",
release_id: release.id,
name: `pcsx2-${release.tag_name}-${path.basename(files[i])}`,
data: assetBytes,
});
}
});
// Ideally there would be a webhook event for when an artifact is added to a draft release
// unfortunately, such a thing does not exist yet. Therefore, we have to wait a bit
// for the API to become consistent
// TODO - future work - we could check previous draft releases to become eventually consistent as well
// - draft releases should only be a temporary state, so anything that remains a draft had a problem
await new Promise(resolve => setTimeout(resolve, 10 * 1000));
// Poll the release, and check to see if it's ready to be published
const { data: releaseAssetsPost } = await octokit.rest.repos.listReleaseAssets({
owner: "PCSX2",
repo: "pcsx2",
release_id: release.id,
per_page: 100
});
// Expected Assets, if we have all of them, we will publish it
let expectedAssets = {
"windows-32bit-sse4": false,
"windows-32bit-avx2": false,
"windows-64bit-sse4": false,
"windows-64bit-avx2": false,
"linux-appimage-32bit": false,
"linux-appimage-64bit": false
}
for (var i = 0; i < releaseAssetsPost.length; i++) {
let asset = releaseAssetsPost[i];
if (asset.name.includes("symbols")) {
continue;
}
for (var j = 0; j < Object.keys(expectedAssets).length; j++) {
let expectedNamePrefix = Object.keys(expectedAssets)[j];
if (asset.name.toLowerCase().includes(expectedNamePrefix)) {
expectedAssets[expectedNamePrefix] = true;
break;
}
}
}
console.log(expectedAssets);
if (Object.values(expectedAssets).every(Boolean)) {
await octokit.rest.repos.updateRelease({
owner: "PCSX2",
repo: "pcsx2",
release_id: release.id,
draft: false
});
}

View File

@@ -1,559 +0,0 @@
{
"name": "upload-release-artifacts",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.12.0",
"glob": "^7.2.0"
}
},
"node_modules/@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"dependencies": {
"@octokit/types": "^6.0.3"
}
},
"node_modules/@octokit/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz",
"integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==",
"dependencies": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.0",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"dependencies": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"dependencies": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/openapi-types": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.1.0.tgz",
"integrity": "sha512-dWZfYvCCdjZzDYA3lIAMF72Q0jld8xidqCq5Ryw09eBJXZdcM6he0vWBTvw/b5UnGYqexxOyHWgfrsTlUJL3Gw=="
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "2.16.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.9.tgz",
"integrity": "sha512-gfSCMgz5scFKsR0dW4jaYsDJVt/UwCHp4dF7sHlmSekZvwzvLiOAGZ4MQkEsL5DW9hIk2W+UQkYZMTA1b6Wsqw==",
"dependencies": {
"@octokit/types": "^6.33.0"
}
},
"node_modules/@octokit/plugin-request-log": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA=="
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "5.12.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.12.1.tgz",
"integrity": "sha512-0nY3htfl6x9UkPcqv8pm9vOC/bTA7f4IMDWln13neHRdNWQvOQgZ9fRxK7BAc74rye4yVINEFi9Yb9rnGUvosA==",
"dependencies": {
"@octokit/types": "^6.33.0",
"deprecation": "^2.3.1"
}
},
"node_modules/@octokit/plugin-retry": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
"dependencies": {
"@octokit/types": "^6.0.3",
"bottleneck": "^2.15.3"
}
},
"node_modules/@octokit/plugin-throttling": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.5.2.tgz",
"integrity": "sha512-Eu7kfJxU8vmHqWGNszWpg+GVp2tnAfax3XQV5CkYPEE69C+KvInJXW9WajgSeW+cxYe0UVdouzCtcreGNuJo7A==",
"dependencies": {
"@octokit/types": "^6.0.1",
"bottleneck": "^2.15.3"
}
},
"node_modules/@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
"integrity": "sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA==",
"dependencies": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"dependencies": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
},
"node_modules/@octokit/rest": {
"version": "18.12.0",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz",
"integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==",
"dependencies": {
"@octokit/core": "^3.5.1",
"@octokit/plugin-paginate-rest": "^2.16.8",
"@octokit/plugin-request-log": "^1.0.4",
"@octokit/plugin-rest-endpoint-methods": "^5.12.0"
}
},
"node_modules/@octokit/types": {
"version": "6.33.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz",
"integrity": "sha512-0zffZ048M0UhthyPXQHLz4038Ak46nMWZXkzlXvXB/M/L1jYPBceq4iZj4qjKVrvveaJrrgKdJ9+3yUuITfcCw==",
"dependencies": {
"@octokit/openapi-types": "^11.1.0"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/before-after-hook": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
},
"node_modules/bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"node_modules/deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"node_modules/glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
}
},
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dependencies": {
"brace-expansion": "^1.1.7"
},
"engines": {
"node": "*"
}
},
"node_modules/node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}
},
"dependencies": {
"@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"requires": {
"@octokit/types": "^6.0.3"
}
},
"@octokit/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz",
"integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==",
"requires": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.0",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"requires": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"requires": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/openapi-types": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.1.0.tgz",
"integrity": "sha512-dWZfYvCCdjZzDYA3lIAMF72Q0jld8xidqCq5Ryw09eBJXZdcM6he0vWBTvw/b5UnGYqexxOyHWgfrsTlUJL3Gw=="
},
"@octokit/plugin-paginate-rest": {
"version": "2.16.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.9.tgz",
"integrity": "sha512-gfSCMgz5scFKsR0dW4jaYsDJVt/UwCHp4dF7sHlmSekZvwzvLiOAGZ4MQkEsL5DW9hIk2W+UQkYZMTA1b6Wsqw==",
"requires": {
"@octokit/types": "^6.33.0"
}
},
"@octokit/plugin-request-log": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
"integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA=="
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "5.12.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.12.1.tgz",
"integrity": "sha512-0nY3htfl6x9UkPcqv8pm9vOC/bTA7f4IMDWln13neHRdNWQvOQgZ9fRxK7BAc74rye4yVINEFi9Yb9rnGUvosA==",
"requires": {
"@octokit/types": "^6.33.0",
"deprecation": "^2.3.1"
}
},
"@octokit/plugin-retry": {
"version": "3.0.9",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz",
"integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==",
"requires": {
"@octokit/types": "^6.0.3",
"bottleneck": "^2.15.3"
}
},
"@octokit/plugin-throttling": {
"version": "3.5.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.5.2.tgz",
"integrity": "sha512-Eu7kfJxU8vmHqWGNszWpg+GVp2tnAfax3XQV5CkYPEE69C+KvInJXW9WajgSeW+cxYe0UVdouzCtcreGNuJo7A==",
"requires": {
"@octokit/types": "^6.0.1",
"bottleneck": "^2.15.3"
}
},
"@octokit/request": {
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.2.tgz",
"integrity": "sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA==",
"requires": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"requires": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
},
"@octokit/rest": {
"version": "18.12.0",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz",
"integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==",
"requires": {
"@octokit/core": "^3.5.1",
"@octokit/plugin-paginate-rest": "^2.16.8",
"@octokit/plugin-request-log": "^1.0.4",
"@octokit/plugin-rest-endpoint-methods": "^5.12.0"
}
},
"@octokit/types": {
"version": "6.33.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.33.0.tgz",
"integrity": "sha512-0zffZ048M0UhthyPXQHLz4038Ak46nMWZXkzlXvXB/M/L1jYPBceq4iZj4qjKVrvveaJrrgKdJ9+3yUuITfcCw==",
"requires": {
"@octokit/openapi-types": "^11.1.0"
}
},
"balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"before-after-hook": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
},
"bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"glob": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}
}
}

View File

@@ -1,18 +0,0 @@
{
"name": "upload-release-artifacts",
"version": "1.0.0",
"description": "",
"main": "index.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"@octokit/plugin-retry": "^3.0.9",
"@octokit/plugin-throttling": "^3.5.2",
"@octokit/rest": "^18.12.0",
"glob": "^7.2.0"
}
}

View File

@@ -1,199 +0,0 @@
import yaml
# Assumes this is ran from the root of the repository
file_path = "./bin/resources/GameIndex.yaml"
# These settings have to be manually kept in sync with the emulator code unfortunately.
# up to date validation should ALWAYS be provided via the application!
allowed_game_options = [
"name",
"region",
"compat",
"roundModes",
"clampModes",
"gameFixes",
"speedHacks",
"memcardFilters",
"patches",
]
allowed_round_modes = ["eeRoundMode", "vuRoundMode"]
allowed_clamp_modes = ["eeClampMode", "vuClampMode"]
allowed_game_fixes = [
"VuAddSubHack",
"FpuCompareHack",
"FpuMulHack",
"FpuNegDivHack",
"XGKickHack",
"EETimingHack",
"SkipMPEGHack",
"OPHFlagHack",
"DMABusyHack",
"VIFFIFOHack",
"VIF1StallHack",
"GIFFIFOHack",
"GoemonTlbHack",
"VUKickstartHack",
"IbitHack",
"VUOverflowHack",
]
allowed_speed_hacks = ["mvuFlagSpeedHack", "InstantVU1SpeedHack"]
# Patches are allowed to have a 'default' key or a crc-32 key, followed by
allowed_patch_options = ["author", "content"]
issue_list = []
def is_hex_number(string):
try:
int(string, 16)
return True
except Exception:
return False
def validate_string_option(serial, key, value):
if not isinstance(value, str):
issue_list.append("[{}]: '{}' must be a string".format(serial, key))
def validate_int_option(serial, key, value, low, high):
if not isinstance(value, int) or (value < low or value > high):
issue_list.append(
"[{}]: '{}' must be an int and between {}-{} (inclusive)".format(
serial, key, low, high
)
)
def validate_list_of_strings(serial, key, value):
if not isinstance(value, list) or not all(isinstance(item, str) for item in value):
issue_list.append("[{}]: '{}' must be a list of strings".format(serial, key))
def validate_valid_options(serial, key, value, allowed_values):
if value not in allowed_values:
issue_list.append("[{}]: Invalid '{}' option [{}]".format(serial, key, value))
def validate_clamp_round_modes(serial, key, value, allowed_values):
if not isinstance(value, dict):
issue_list.append("[{}]: '{}' must be a valid object".format(serial, key))
return
for mode_key, mode_value in value.items():
validate_valid_options(serial, key, mode_key, allowed_values)
validate_int_option(serial, key, mode_value, 0, 3)
def validate_game_fixes(serial, key, value):
if not isinstance(value, list):
issue_list.append(
"[{}]: 'gameFixes' must be a list of valid gameFixes".format(serial)
)
return
for gamefix in value:
validate_valid_options(serial, key, gamefix, allowed_game_fixes)
def validate_speed_hacks(serial, key, value):
if not isinstance(value, dict):
issue_list.append("[{}]: 'speedHacks' must be a valid object".format(serial))
return
for speedhack, speedhack_value in value.items():
validate_valid_options(serial, key, speedhack, allowed_speed_hacks)
validate_int_option(serial, speedhack, speedhack_value, 0, 1)
def validate_patches(serial, key, value):
if not isinstance(value, dict):
issue_list.append(
"[{}]: 'patches' must be valid mapping of CRC32 -> Patch Objects".format(
serial
)
)
return
for crc, patch in value.items():
if crc != "default" and not is_hex_number(str(crc)):
issue_list.append(
"[{}]: Patches must either be key'd with 'default' or a valid CRC-32 Hex String".format(
serial
)
)
continue
for patch_option, option_value in patch.items():
validate_valid_options(serial, key, patch_option, allowed_patch_options)
if patch_option == "author":
validate_string_option(serial, patch_option, option_value)
if patch_option == "content":
validate_string_option(serial, patch_option, option_value)
# pylint:disable=unnecessary-lambda
option_validation_handlers = {
"name": (lambda serial, key, value: validate_string_option(serial, key, value)),
"region": (lambda serial, key, value: validate_string_option(serial, key, value)),
"compat": (
lambda serial, key, value: validate_int_option(serial, key, value, 0, 6)
),
"roundModes": (
lambda serial, key, value: validate_clamp_round_modes(
serial, key, value, allowed_round_modes
)
),
"clampModes": (
lambda serial, key, value: validate_clamp_round_modes(
serial, key, value, allowed_clamp_modes
)
),
"gameFixes": (lambda serial, key, value: validate_game_fixes(serial, key, value)),
"speedHacks": (lambda serial, key, value: validate_speed_hacks(serial, key, value)),
"memcardFilters": (
lambda serial, key, value: validate_list_of_strings(serial, key, value)
),
"patches": (lambda serial, key, value: validate_patches(serial, key, value)),
}
print("Opening {}...".format(file_path))
with open(file_path) as f:
try:
print("Attempting to parse GameDB file...")
gamedb = yaml.load(f, Loader=yaml.FullLoader)
except Exception as err:
print(err)
print(
"Unable to parse GameDB. Exiting, verify that the file indeed is valid YAML."
)
exit(1)
print("File loaded successfully, validating schema...")
progress_counter = 0
for serial, game_options in gamedb.items():
progress_counter = progress_counter + 1
if progress_counter % 500 == 0 or progress_counter >= len(gamedb.items()):
print(
"[{}/{}] Processing GameDB Entries...".format(
progress_counter, len(gamedb.items())
)
)
# Check for required values
if not "name" in game_options.keys():
issue_list.append("[{}]: 'name' is a required value".format(serial))
if not "region" in game_options.keys():
issue_list.append("[{}]: 'region' is a required value".format(serial))
# Check the options
for key, value in game_options.items():
if key not in allowed_game_options:
issue_list.append("[{}]: Invalid option [{}]".format(serial, key))
continue
if key in option_validation_handlers:
option_validation_handlers[key](serial, key, value)
if len(issue_list) > 0:
print("Issues found during validation:")
print(*issue_list, sep="\n")
exit(1)
else:
print("GameDB Validated Successfully!")
exit(0)

View File

@@ -1 +0,0 @@
PyYAML==5.4.1

View File

@@ -1,29 +0,0 @@
name: 🏭 Update Controller Database
on:
schedule:
- cron: "0 16 * * 1" # every monday @ 12pm EST - https://crontab.guru/#0_16_*_*_1
jobs:
update-controller-db:
if: github.repository == 'PCSX2/pcsx2'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Latest DB and Prepare DB File
run: |
cd .github/workflows/scripts/controller-db/
wget -O game_controller_db.txt https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
python ./update-db.py
mv ./game_controller_db.txt ${{github.workspace}}/bin/resources/game_controller_db.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
title: "pad-linux: Update to latest controller database"
commit-message: "pad-linux: Update to latest controller database."
committer: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
author: "PCSX2 Bot <PCSX2Bot@users.noreply.github.com>"
body: "Weekly automatic update of SDL Controller DB for Linux / Mac OS"
reviewers: lightningterror

View File

@@ -1,209 +0,0 @@
name: 🖥️ Windows Builds
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- master
tags:
- v*
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '.clang-format'
- '.codacy.yaml'
- '.github/*'
- '.github/workflows/lint-gamedb.yml'
- '.github/workflows/linux-workflow.yml'
- '.github/workflows/macos-workflow.yml'
- '.github/workflows/scripts/linux/**'
- '.github/workflows/scripts/validation/**'
- '.gitignore'
- 'bin/PCSX2_keys.ini.default'
- 'build.sh'
- 'buildbot.xml'
- 'linux_various/**'
- 'mscompile.cmd'
- 'pcsx2/CDVD/Linux/**'
- 'pcsx2/DEV9/Linux/**'
- 'pcsx2/Linux/**'
- 'pcsx2/PAD/Linux/**'
- 'pcsx2/SPU2/Linux/**'
- 'pcsx2/USB/linux/**'
jobs:
build:
strategy:
# Prevent one build from failing everything (although maybe those should be included as experimental builds instead)
fail-fast: false
matrix:
os: [windows-2019]
platform: [Win32, x64]
configuration: [Release, Release AVX2, CMake, Qt]
experimental: [false]
exclude:
- platform: win32
configuration: Qt
name: ${{ matrix.platform }} | ${{ matrix.configuration }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
BUILDCACHE_COMPRESS_FORMAT: ZSTD
BUILDCACHE_COMPRESS_LEVEL: 9
BUILDCACHE_MAX_CACHE_SIZE: 536870912 # 512MB
BUILDCACHE_DIRECT_MODE: true
BUILDCACHE_LOG_FILE: ${{ github.workspace }}\buildcache.log
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Checkout Submodules
run: git submodule update --init --recursive -j $env:NUMBER_OF_PROCESSORS
- name: Setup Buildcache
uses: mikehardy/buildcache-action@v1.2.2
with:
cache_key: ${{ matrix.os }} ${{ matrix.platform }} ${{ matrix.configuration }}
if: matrix.configuration == 'CMake' # TODO: buildcache on VS
- name: Verify VS Project Files
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
if: matrix.configuration != 'CMake'
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1
if: matrix.configuration != 'CMake'
- name: Download Qt build files
if: matrix.configuration == 'Qt'
shell: cmd
run: |
cd 3rdparty\qt
aria2c https://github.com/PCSX2/pcsx2-windows-dependencies/releases/download/2022-01-20/qt-6.2.2-x64.7z
7z x qt-6.2.2-x64.7z
del qt-6.2.2-x64.7z
- name: Generate CMake
id: cmake
shell: cmd
run: |
if "${{ github.event.inputs.retainDebugArtifacts }}"=="true" (SET type=RelWithDebInfo) else (SET type=Release)
if "${{ matrix.platform }}"=="Win32" (SET vcvars=vcvarsamd64_x86.bat) else (SET vcvars=vcvars64.bat)
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\%vcvars%"
echo ::set-output name=buildtype::%type%
echo ::set-output name=vcvars::%vcvars%
cmake . -B build -DCMAKE_BUILD_TYPE=%type% -DLTO_PCSX2_CORE=ON -G Ninja -DCMAKE_C_COMPILER_LAUNCHER=..\buildcache\bin\buildcache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=..\buildcache\bin\buildcache.exe -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
if: matrix.configuration == 'CMake'
- name: Build PCSX2
shell: cmd
env:
# Set to 'true' to retain the .pdb / .exp / .lib, etc files which can be useful for repro'ing issues that only occur in the compiled .exe
RetainDebuggingArtifacts: ${{ github.event.inputs.retainDebugArtifacts == 'true' }}
run: |
if "${{ matrix.configuration }}"=="CMake" (
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
cmake --build build --config ${{ steps.cmake.outputs.buildtype }}
) else (
if "${{ matrix.configuration }}"=="Qt" (
rem This is hardcoded to Release AVX2 for now, because of the artifact naming below.
msbuild "PCSX2_qt.sln" /m /v:m /p:Configuration="Release AVX2" /p:Platform="${{ matrix.platform }}"
) else (
msbuild "PCSX2_suite.sln" /m /v:m /p:Configuration="${{ matrix.configuration }}" /p:Platform="${{ matrix.platform }}"
)
)
- name: Run Tests
shell: cmd
run: |
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
cmake --build build --config ${{ steps.cmake.outputs.buildtype }} --target unittests
if: matrix.configuration == 'CMake'
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
run: |
ARCH=$([ "${{ matrix.platform }}" == Win32 ] && echo "32bit" || echo "64bit")
case "${{ matrix.configuration }}" in
Release) SIMD="SSE4";;
*AVX2) SIMD="AVX2";;
Qt) SIMD="QT";;
CMake) SIMD="CMake"
cp build/pcsx2/pcsx2* bin/ ;;
*) SIMD="UNKNOWN";;
esac
if [ ${{ github.event_name }} == "pull_request" ]; then
PR_SHA=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
ARTIFACT_NAME="PCSX2-${ARCH}-${SIMD}"
if [ ! -z "${{ github.event.pull_request.number }}" ]; then
PR_NUM=${{ github.event.pull_request.number }}
ARTIFACT_NAME="${ARTIFACT_NAME}-pr[${PR_NUM}]"
fi
ARTIFACT_NAME="${ARTIFACT_NAME}-sha[${PR_SHA}]"
if [ ! -z "${{ github.event.pull_request.title }}" ]; then
PR_TITLE=$(echo "${{ github.event.pull_request.title }}" | tr -cd '[a-zA-Z0-9[:space:]]_-')
ARTIFACT_NAME="${ARTIFACT_NAME}-title["${PR_TITLE}""
fi
else
SHA=$(git rev-parse --short "$GITHUB_SHA")
ARTIFACT_NAME="PCSX2-${ARCH}-${SIMD}-sha[${SHA}"
fi
TRIMMED_ARTIFACT_NAME=$(printf "%.199s]" "$ARTIFACT_NAME")
echo "name=$TRIMMED_ARTIFACT_NAME"
echo "##[set-output name=name;]${TRIMMED_ARTIFACT_NAME}"
echo "##[set-output name=arch;]${ARCH}"
echo "##[set-output name=simd;]${SIMD}"
- name: Upload artifact
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: ${{ steps.artifact-metadata.outputs.name }}
path: |
./bin
!./bin/**/*.bsc
!./bin/**/*.exp
!./bin/**/*.ilk
!./bin/**/*.iobj
!./bin/**/*.ipdb
!./bin/**/*.pdb
!./bin/**/*.lib
- name: Upload artifact - with symbols
if: matrix.configuration != 'CMake'
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: ${{ steps.artifact-metadata.outputs.name }}-symbols
path: ./bin/**/*.pdb
# ---- Release / Tagging related steps ----
- name: Prepare Build Artifacts
if: github.repository == 'PCSX2/pcsx2' && startsWith(github.ref, 'refs/tags/') && matrix.configuration != 'CMake' && matrix.configuration != 'Qt'
run: |
mkdir -p ./ci-artifacts/
7z a ./ci-artifacts/windows-${{ steps.artifact-metadata.outputs.arch }}-${{ steps.artifact-metadata.outputs.simd }}.7z ./bin/* '-xr!*bsc' '-xr!*.exp' '-xr!*.ilk' '-xr!*.iobj' '-xr!*.ipdb' '-xr!*.pdb' '-xr!*.lib'
7z a ./ci-artifacts/windows-${{ steps.artifact-metadata.outputs.arch }}-${{ steps.artifact-metadata.outputs.simd }}-symbols.7z ./bin/*.pdb
ls ./ci-artifacts/
- name: Upload Assets and Potential Publish Release
if: github.repository == 'PCSX2/pcsx2' && startsWith(github.ref, 'refs/tags/') && matrix.configuration != 'CMake' && matrix.configuration != 'Qt'
env:
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
ASSET_DIR: ${{ github.WORKSPACE }}/ci-artifacts
ASSET_EXTENSION: 7z
TAG_TO_SEARCH_FOR: ${{ github.REF }}
run: |
cd ./.github/workflows/scripts/releases/upload-release-artifacts
npm ci
node index.js

View File

@@ -0,0 +1,67 @@
name: 🖥️ Windows Builds
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
# MSBUILD
lint_vs_proj_files:
name: Lint VS Project Files
runs-on: windows-2019
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Verify VS Project Files
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
build_qt_sse4:
needs: lint_vs_proj_files
name: "SSE4"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release
simd: "SSE4"
secrets: inherit
build_qt_avx2:
needs: lint_vs_proj_files
name: "AVX2"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: Release AVX2
secrets: inherit
build_qt_sse4_cmake:
name: "CMake SSE4"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt
configuration: CMake
buildSystem: cmake
secrets: inherit
build_qt_clang_sse4:
needs: lint_vs_proj_files
name: "SSE4"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt Clang
configuration: Release Clang
simd: "SSE4"
secrets: inherit
build_qt_clang_avx2:
needs: lint_vs_proj_files
name: "AVX2"
uses: ./.github/workflows/windows_build_qt.yml
with:
jobName: Qt Clang
configuration: Release Clang AVX2
secrets: inherit

133
.github/workflows/windows_build_qt.yml vendored Normal file
View File

@@ -0,0 +1,133 @@
name: Windows Build Steps - Qt
on:
workflow_call:
inputs:
jobName:
required: true
type: string
os:
required: false
type: string
default: windows-2022
platform:
required: false
type: string
default: x64
configuration:
required: true
type: string
simd:
required: false
type: string
default: AVX2
buildSystem:
required: false
type: string
default: msbuild
qt_binary_url:
required: false
type: string
default: https://github.com/PCSX2/pcsx2-windows-dependencies/releases/download/2022-11-20/qt-6.4.0-x64.7z
qt_dir:
required: false
type: string
default: 3rdparty\qt\6.4.0\msvc2022_64
cheats_url:
required: false
type: string
default: https://github.com/PCSX2/pcsx2_patches/releases/latest/download
jobs:
build_windows_qt:
name: ${{ inputs.jobName }}
runs-on: ${{ inputs.os }}
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
timeout-minutes: 60
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Prepare Artifact Metadata
id: artifact-metadata
shell: bash
env:
OS: windows
BUILD_SYSTEM: ${{ inputs.buildSystem }}
GUI_FRAMEWORK: Qt
ARCH: ${{ inputs.platform }}
SIMD: ${{ inputs.simd }}
EVENT_NAME: ${{ github.event_name }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_SHA: ${{ github.event.pull_request.head.sha }}
run: ./.github/workflows/scripts/common/name-artifacts.sh
- name: Setup msbuild
if: inputs.configuration != 'CMake'
uses: microsoft/setup-msbuild@v1
- name: Download Qt build files
shell: cmd
run: |
cd 3rdparty\qt
aria2c ${{ inputs.qt_binary_url }}
7z x qt-*-x64.7z
del qt-*-x64.7z
- name: Download cheats
shell: cmd
run: |
cd bin/resources
aria2c -Z "${{ inputs.cheats_url }}/cheats_ni.zip" "${{ inputs.cheats_url }}/cheats_ws.zip"
- name: Generate CMake
if: inputs.configuration == 'CMake'
id: cmake
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake . -B build "-DCMAKE_PREFIX_PATH=%cd%\${{ inputs.qt_dir }}" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DDISABLE_ADVANCE_SIMD=ON -G Ninja
- name: Build PCSX2
shell: cmd
run: |
if "${{ inputs.configuration }}"=="CMake" (
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build build --config Release || exit /b
cmake --install build --config Release || exit /b
) else (
msbuild "PCSX2_qt.sln" /m /v:m /p:Configuration="${{ inputs.configuration }}" /p:Platform="${{ inputs.platform }}"
)
- name: Run Tests
if: inputs.configuration == 'CMake'
shell: cmd
run: |
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build build --config Release --target unittests
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}
path: |
./bin
!./bin/**/*.bsc
!./bin/**/*.exp
!./bin/**/*.ilk
!./bin/**/*.iobj
!./bin/**/*.ipdb
!./bin/**/*.pdb
!./bin/**/*.lib
- name: Upload artifact - with symbols
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact-metadata.outputs.artifact-name }}-symbols
path: ./bin/**/*.pdb

33
.gitignore vendored
View File

@@ -30,15 +30,11 @@
**/x64/Debug*
**/x64/Devel*
**/bin/PCSX2-linux.sh
_ReSharper.*
pcsx2.snapshot_*
svnrev.h
/build
/build_dev
/build_dbg
/build*
/obj-*
*.obj
@@ -47,8 +43,7 @@ Thumbs.db
Debug.txt
install_log.txt
padLog.txt
GS_opengl_debug.txt
bad_shader_*
Debug
Release
@@ -68,14 +63,12 @@ oprofile_data/
/.vscode*
/bin/**/*.dll
/bin/**/*.dmp
/bin/**/*.exp
/bin/**/*.ilk
/bin/**/*.lib
/bin/**/*.pdb
/bin/pcsx2
/bin/PCSX2-linux.sh
/bin/*ReplayLoader
/bin/GS*.txt
/bin/pcsx2*
/bin/qt.conf
/bin/bios
/bin/cache
@@ -90,27 +83,13 @@ oprofile_data/
/bin/plugins
/bin/snaps
/bin/sstates
/bin/textures
/bin/translations
/bin/inputprofiles
/deps
/ipch
!/3rdparty/libjpeg/change.log
/3rdparty/portaudio/portaudio-2.0.pc
/3rdparty/portaudio/bin
/3rdparty/portaudio/bin-*
/3rdparty/portaudio/autom4te.cache
/3rdparty/portaudio/libtool
/3rdparty/portaudio/config.*
/3rdparty/portaudio/lib-stamp
/3rdparty/portaudio/Makefile
/3rdparty/portaudio/bindings
/3rdparty/portaudio/test
/3rdparty/portaudio/testcvs
/3rdparty/portaudio/src/hostapi/asio/ASIOSDK/common
/3rdparty/portaudio/src/hostapi/asio/ASIOSDK/host
/3rdparty/portaudio/src/hostapi/wasapi/mingw-include
/3rdparty/**/include/wx/setup.h
/3rdparty/**/wx/msw/rcdefs.h
/pcsx2/gui/Resources/*.h
!/pcsx2/gui/Resources/EmbeddedImage.h
/tools/bin

15
.gitmodules vendored
View File

@@ -14,16 +14,10 @@
path = 3rdparty/wil
url = https://github.com/microsoft/wil.git
branch = master
[submodule "3rdparty/cubeb/cubeb"]
path = 3rdparty/cubeb/cubeb
url = https://github.com/mozilla/cubeb.git
[submodule "3rdparty/rapidyaml/rapidyaml"]
path = 3rdparty/rapidyaml/rapidyaml
url = https://github.com/biojppm/rapidyaml.git
branch = master
[submodule "3rdparty/imgui/imgui"]
path = 3rdparty/imgui/imgui
url = https://github.com/ocornut/imgui.git
[submodule "3rdparty/glslang/glslang"]
path = 3rdparty/glslang/glslang
url = https://github.com/KhronosGroup/glslang.git
@@ -33,3 +27,12 @@
[submodule "3rdparty/sdl2/SDL"]
path = 3rdparty/sdl2/SDL
url = https://github.com/libsdl-org/SDL.git
[submodule "3rdparty/libzip/libzip"]
path = 3rdparty/libzip/libzip
url = https://github.com/nih-at/libzip.git
[submodule "3rdparty/zstd/zstd"]
path = 3rdparty/zstd/zstd
url = https://github.com/facebook/zstd.git
[submodule "3rdparty/rcheevos/rcheevos"]
path = 3rdparty/rcheevos/rcheevos
url = https://github.com/RetroAchievements/rcheevos.git

8
.prettierrc.yaml Normal file
View File

@@ -0,0 +1,8 @@
overrides:
- files: "**/GameIndex.yaml"
options:
tabWidth: 2
useTabs: false
quoteProps: consistent
endOfLine: auto
proseWrap: preserve

View File

@@ -10,7 +10,6 @@
<ClCompile>
<AdditionalIncludeDirectories>$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StructMemberAlignment>16Bytes</StructMemberAlignment>
<FunctionLevelLinking>true</FunctionLevelLinking>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<WarningLevel>TurnOffAllWarnings</WarningLevel>

View File

@@ -1,55 +0,0 @@
add_library(baseclasses
amextra.cpp
amfilter.cpp
amvideo.cpp
combase.cpp
ctlutil.cpp
ddmm.cpp
mtype.cpp
outputq.cpp
pstream.cpp
pullpin.cpp
refclock.cpp
renbase.cpp
schedule.cpp
seekpt.cpp
source.cpp
strmctl.cpp
sysclock.cpp
transfrm.cpp
transip.cpp
vtrans.cpp
wxdebug.cpp
wxlist.cpp
wxutil.cpp
amextra.h
amfilter.h
cache.h
combase.h
ctlutil.h
ddmm.h
fourcc.h
measure.h
msgthrd.h
mtype.h
outputq.h
pstream.h
pullpin.h
refclock.h
reftime.h
renbase.h
schedule.h
seekpt.h
source.h
streams.h
strmctl.h
sysclock.h
transfrm.h
transip.h
vtrans.h
wxdebug.h
wxlist.h
wxutil.h
)
target_include_directories(baseclasses PUBLIC .)
target_precompile_headers(baseclasses PRIVATE streams.h)

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,111 +0,0 @@
//------------------------------------------------------------------------------
// File: AMExtra.cpp
//
// Desc: DirectShow base classes - implements CRenderedInputPin class.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h> // DirectShow base class definitions
#include <mmsystem.h> // Needed for definition of timeGetTime
#include <limits.h> // Standard data type limit definitions
#include <measure.h> // Used for time critical log functions
#include "amextra.h"
#pragma warning(disable:4355)
// Implements CRenderedInputPin class
CRenderedInputPin::CRenderedInputPin(__in_opt LPCTSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName) :
CBaseInputPin(pObjectName, pFilter, pLock, phr, pName),
m_bAtEndOfStream(FALSE),
m_bCompleteNotified(FALSE)
{
}
#ifdef UNICODE
CRenderedInputPin::CRenderedInputPin(__in_opt LPCSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName) :
CBaseInputPin(pObjectName, pFilter, pLock, phr, pName),
m_bAtEndOfStream(FALSE),
m_bCompleteNotified(FALSE)
{
}
#endif
// Flush end of stream condition - caller should do any
// necessary stream level locking before calling this
STDMETHODIMP CRenderedInputPin::EndOfStream()
{
HRESULT hr = CheckStreaming();
// Do EC_COMPLETE handling for rendered pins
if (S_OK == hr && !m_bAtEndOfStream) {
m_bAtEndOfStream = TRUE;
FILTER_STATE fs;
EXECUTE_ASSERT(SUCCEEDED(m_pFilter->GetState(0, &fs)));
if (fs == State_Running) {
DoCompleteHandling();
}
}
return hr;
}
// Called to complete the flush
STDMETHODIMP CRenderedInputPin::EndFlush()
{
CAutoLock lck(m_pLock);
// Clean up renderer state
m_bAtEndOfStream = FALSE;
m_bCompleteNotified = FALSE;
return CBaseInputPin::EndFlush();
}
// Notify of Run() from filter
HRESULT CRenderedInputPin::Run(REFERENCE_TIME tStart)
{
UNREFERENCED_PARAMETER(tStart);
m_bCompleteNotified = FALSE;
if (m_bAtEndOfStream) {
DoCompleteHandling();
}
return S_OK;
}
// Clear status on going into paused state
HRESULT CRenderedInputPin::Active()
{
m_bAtEndOfStream = FALSE;
m_bCompleteNotified = FALSE;
return CBaseInputPin::Active();
}
// Do stuff to deliver end of stream
void CRenderedInputPin::DoCompleteHandling()
{
ASSERT(m_bAtEndOfStream);
if (!m_bCompleteNotified) {
m_bCompleteNotified = TRUE;
m_pFilter->NotifyEvent(EC_COMPLETE, S_OK, (LONG_PTR)(IBaseFilter *)m_pFilter);
}
}

View File

@@ -1,56 +0,0 @@
//------------------------------------------------------------------------------
// File: AMExtra.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __AMEXTRA__
#define __AMEXTRA__
// Simple rendered input pin
//
// NOTE if your filter queues stuff before rendering then it may not be
// appropriate to use this class
//
// In that case queue the end of stream condition until the last sample
// is actually rendered and flush the condition appropriately
class CRenderedInputPin : public CBaseInputPin
{
public:
CRenderedInputPin(__in_opt LPCTSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName);
#ifdef UNICODE
CRenderedInputPin(__in_opt LPCSTR pObjectName,
__in CBaseFilter *pFilter,
__in CCritSec *pLock,
__inout HRESULT *phr,
__in_opt LPCWSTR pName);
#endif
// Override methods to track end of stream state
STDMETHODIMP EndOfStream();
STDMETHODIMP EndFlush();
HRESULT Active();
HRESULT Run(REFERENCE_TIME tStart);
protected:
// Member variables to track state
BOOL m_bAtEndOfStream; // Set by EndOfStream
BOOL m_bCompleteNotified; // Set when we notify for EC_COMPLETE
private:
void DoCompleteHandling();
};
#endif // __AMEXTRA__

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,275 +0,0 @@
//------------------------------------------------------------------------------
// File: AMVideo.cpp
//
// Desc: DirectShow base classes - implements helper functions for
// bitmap formats.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include <limits.h>
// These are bit field masks for true colour devices
const DWORD bits555[] = {0x007C00,0x0003E0,0x00001F};
const DWORD bits565[] = {0x00F800,0x0007E0,0x00001F};
const DWORD bits888[] = {0xFF0000,0x00FF00,0x0000FF};
// This maps bitmap subtypes into a bits per pixel value and also a
// name. unicode and ansi versions are stored because we have to
// return a pointer to a static string.
const struct {
const GUID *pSubtype;
WORD BitCount;
CHAR *pName;
WCHAR *wszName;
} BitCountMap[] = { &MEDIASUBTYPE_RGB1, 1, "RGB Monochrome", L"RGB Monochrome",
&MEDIASUBTYPE_RGB4, 4, "RGB VGA", L"RGB VGA",
&MEDIASUBTYPE_RGB8, 8, "RGB 8", L"RGB 8",
&MEDIASUBTYPE_RGB565, 16, "RGB 565 (16 bit)", L"RGB 565 (16 bit)",
&MEDIASUBTYPE_RGB555, 16, "RGB 555 (16 bit)", L"RGB 555 (16 bit)",
&MEDIASUBTYPE_RGB24, 24, "RGB 24", L"RGB 24",
&MEDIASUBTYPE_RGB32, 32, "RGB 32", L"RGB 32",
&MEDIASUBTYPE_ARGB32, 32, "ARGB 32", L"ARGB 32",
&MEDIASUBTYPE_Overlay, 0, "Overlay", L"Overlay",
&GUID_NULL, 0, "UNKNOWN", L"UNKNOWN"
};
// Return the size of the bitmap as defined by this header
STDAPI_(DWORD) GetBitmapSize(const BITMAPINFOHEADER *pHeader)
{
return DIBSIZE(*pHeader);
}
// This is called if the header has a 16 bit colour depth and needs to work
// out the detailed type from the bit fields (either RGB 565 or RGB 555)
STDAPI_(const GUID) GetTrueColorType(const BITMAPINFOHEADER *pbmiHeader)
{
BITMAPINFO *pbmInfo = (BITMAPINFO *) pbmiHeader;
ASSERT(pbmiHeader->biBitCount == 16);
// If its BI_RGB then it's RGB 555 by default
if (pbmiHeader->biCompression == BI_RGB) {
return MEDIASUBTYPE_RGB555;
}
// Compare the bit fields with RGB 555
DWORD *pMask = (DWORD *) pbmInfo->bmiColors;
if (pMask[0] == bits555[0]) {
if (pMask[1] == bits555[1]) {
if (pMask[2] == bits555[2]) {
return MEDIASUBTYPE_RGB555;
}
}
}
// Compare the bit fields with RGB 565
pMask = (DWORD *) pbmInfo->bmiColors;
if (pMask[0] == bits565[0]) {
if (pMask[1] == bits565[1]) {
if (pMask[2] == bits565[2]) {
return MEDIASUBTYPE_RGB565;
}
}
}
return GUID_NULL;
}
// Given a BITMAPINFOHEADER structure this returns the GUID sub type that is
// used to describe it in format negotiations. For example a video codec fills
// in the format block with a VIDEOINFO structure, it also fills in the major
// type with MEDIATYPE_VIDEO and the subtype with a GUID that matches the bit
// count, for example if it is an eight bit image then MEDIASUBTYPE_RGB8
STDAPI_(const GUID) GetBitmapSubtype(const BITMAPINFOHEADER *pbmiHeader)
{
ASSERT(pbmiHeader);
// If it's not RGB then create a GUID from the compression type
if (pbmiHeader->biCompression != BI_RGB) {
if (pbmiHeader->biCompression != BI_BITFIELDS) {
FOURCCMap FourCCMap(pbmiHeader->biCompression);
return (const GUID) FourCCMap;
}
}
// Map the RGB DIB bit depth to a image GUID
switch(pbmiHeader->biBitCount) {
case 1 : return MEDIASUBTYPE_RGB1;
case 4 : return MEDIASUBTYPE_RGB4;
case 8 : return MEDIASUBTYPE_RGB8;
case 16 : return GetTrueColorType(pbmiHeader);
case 24 : return MEDIASUBTYPE_RGB24;
case 32 : return MEDIASUBTYPE_RGB32;
}
return GUID_NULL;
}
// Given a video bitmap subtype we return the number of bits per pixel it uses
// We return a WORD bit count as thats what the BITMAPINFOHEADER uses. If the
// GUID subtype is not found in the table we return an invalid USHRT_MAX
STDAPI_(WORD) GetBitCount(const GUID *pSubtype)
{
ASSERT(pSubtype);
const GUID *pMediaSubtype;
INT iPosition = 0;
// Scan the mapping list seeing if the source GUID matches any known
// bitmap subtypes, the list is terminated by a GUID_NULL entry
while (TRUE) {
pMediaSubtype = BitCountMap[iPosition].pSubtype;
if (IsEqualGUID(*pMediaSubtype,GUID_NULL)) {
return USHRT_MAX;
}
if (IsEqualGUID(*pMediaSubtype,*pSubtype)) {
return BitCountMap[iPosition].BitCount;
}
iPosition++;
}
}
// Given a bitmap subtype we return a description name that can be used for
// debug purposes. In a retail build this function still returns the names
// If the subtype isn't found in the lookup table we return string UNKNOWN
int LocateSubtype(const GUID *pSubtype)
{
ASSERT(pSubtype);
const GUID *pMediaSubtype;
INT iPosition = 0;
// Scan the mapping list seeing if the source GUID matches any known
// bitmap subtypes, the list is terminated by a GUID_NULL entry
while (TRUE) {
pMediaSubtype = BitCountMap[iPosition].pSubtype;
if (IsEqualGUID(*pMediaSubtype,*pSubtype) ||
IsEqualGUID(*pMediaSubtype,GUID_NULL)
)
{
break;
}
iPosition++;
}
return iPosition;
}
STDAPI_(WCHAR *) GetSubtypeNameW(const GUID *pSubtype)
{
return BitCountMap[LocateSubtype(pSubtype)].wszName;
}
STDAPI_(CHAR *) GetSubtypeNameA(const GUID *pSubtype)
{
return BitCountMap[LocateSubtype(pSubtype)].pName;
}
#ifndef GetSubtypeName
#error wxutil.h should have defined GetSubtypeName
#endif
#undef GetSubtypeName
// this is here for people that linked to it directly; most people
// would use the header file that picks the A or W version.
STDAPI_(CHAR *) GetSubtypeName(const GUID *pSubtype)
{
return GetSubtypeNameA(pSubtype);
}
// The mechanism for describing a bitmap format is with the BITMAPINFOHEADER
// This is really messy to deal with because it invariably has fields that
// follow it holding bit fields, palettes and the rest. This function gives
// the number of bytes required to hold a VIDEOINFO that represents it. This
// count includes the prefix information (like the rcSource rectangle) the
// BITMAPINFOHEADER field, and any other colour information on the end.
//
// WARNING If you want to copy a BITMAPINFOHEADER into a VIDEOINFO always make
// sure that you use the HEADER macro because the BITMAPINFOHEADER field isn't
// right at the start of the VIDEOINFO (there are a number of other fields),
//
// CopyMemory(HEADER(pVideoInfo),pbmi,sizeof(BITMAPINFOHEADER));
//
STDAPI_(LONG) GetBitmapFormatSize(const BITMAPINFOHEADER *pHeader)
{
// Everyone has this to start with this
LONG Size = SIZE_PREHEADER + pHeader->biSize;
ASSERT(pHeader->biSize >= sizeof(BITMAPINFOHEADER));
// Does this format use a palette, if the number of colours actually used
// is zero then it is set to the maximum that are allowed for that colour
// depth (an example is 256 for eight bits). Truecolour formats may also
// pass a palette with them in which case the used count is non zero
// This would scare me.
ASSERT(pHeader->biBitCount <= iPALETTE || pHeader->biClrUsed == 0);
if (pHeader->biBitCount <= iPALETTE || pHeader->biClrUsed) {
LONG Entries = (DWORD) 1 << pHeader->biBitCount;
if (pHeader->biClrUsed) {
Entries = pHeader->biClrUsed;
}
Size += Entries * sizeof(RGBQUAD);
}
// Truecolour formats may have a BI_BITFIELDS specifier for compression
// type which means that room for three DWORDs should be allocated that
// specify where in each pixel the RGB colour components may be found
if (pHeader->biCompression == BI_BITFIELDS) {
Size += SIZE_MASKS;
}
// A BITMAPINFO for a palettised image may also contain a palette map that
// provides the information to map from a source palette to a destination
// palette during a BitBlt for example, because this information is only
// ever processed during drawing you don't normally store the palette map
// nor have any way of knowing if it is present in the data structure
return Size;
}
// Returns TRUE if the VIDEOINFO contains a palette
STDAPI_(BOOL) ContainsPalette(const VIDEOINFOHEADER *pVideoInfo)
{
if (PALETTISED(pVideoInfo) == FALSE) {
if (pVideoInfo->bmiHeader.biClrUsed == 0) {
return FALSE;
}
}
return TRUE;
}
// Return a pointer to the first entry in a palette
STDAPI_(const RGBQUAD *) GetBitmapPalette(const VIDEOINFOHEADER *pVideoInfo)
{
if (pVideoInfo->bmiHeader.biCompression == BI_BITFIELDS) {
return TRUECOLOR(pVideoInfo)->bmiColors;
}
return COLORS(pVideoInfo);
}

View File

@@ -1,97 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{27F17499-A372-4408-8AFA-4F9F4584FBD3}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="..\..\3rdparty\DefaultProjectRootDir.props" />
<Import Project="..\..\3rdparty\3rdparty.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="..\..\common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Release))" Project="..\..\common\vsprops\CodeGen_Release.props" />
<Import Condition="!$(Configuration.Contains(Release))" Project="..\..\common\vsprops\IncrementalLinking.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>streams.h</PrecompiledHeaderFile>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="amextra.h" />
<ClInclude Include="amfilter.h" />
<ClInclude Include="cache.h" />
<ClInclude Include="combase.h" />
<ClInclude Include="ctlutil.h" />
<ClInclude Include="ddmm.h" />
<ClInclude Include="fourcc.h" />
<ClInclude Include="measure.h" />
<ClInclude Include="msgthrd.h" />
<ClInclude Include="mtype.h" />
<ClInclude Include="outputq.h" />
<ClInclude Include="pstream.h" />
<ClInclude Include="pullpin.h" />
<ClInclude Include="refclock.h" />
<ClInclude Include="reftime.h" />
<ClInclude Include="renbase.h" />
<ClInclude Include="schedule.h" />
<ClInclude Include="seekpt.h" />
<ClInclude Include="source.h" />
<ClInclude Include="streams.h" />
<ClInclude Include="strmctl.h" />
<ClInclude Include="sysclock.h" />
<ClInclude Include="transfrm.h" />
<ClInclude Include="transip.h" />
<ClInclude Include="vtrans.h" />
<ClInclude Include="wxdebug.h" />
<ClInclude Include="wxlist.h" />
<ClInclude Include="wxutil.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="amextra.cpp" />
<ClCompile Include="amfilter.cpp" />
<ClCompile Include="amvideo.cpp" />
<ClCompile Include="combase.cpp" />
<ClCompile Include="ctlutil.cpp" />
<ClCompile Include="ddmm.cpp">
<PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="mtype.cpp" />
<ClCompile Include="outputq.cpp" />
<ClCompile Include="pstream.cpp" />
<ClCompile Include="pullpin.cpp" />
<ClCompile Include="refclock.cpp" />
<ClCompile Include="renbase.cpp" />
<ClCompile Include="schedule.cpp" />
<ClCompile Include="seekpt.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="source.cpp" />
<ClCompile Include="strmctl.cpp" />
<ClCompile Include="sysclock.cpp" />
<ClCompile Include="transfrm.cpp" />
<ClCompile Include="transip.cpp" />
<ClCompile Include="vtrans.cpp" />
<ClCompile Include="wxdebug.cpp" />
<ClCompile Include="wxlist.cpp" />
<ClCompile Include="wxutil.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@@ -1,174 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="amextra.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="amfilter.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="cache.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="combase.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ctlutil.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ddmm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="fourcc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="msgthrd.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="reftime.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="refclock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pullpin.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pstream.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="outputq.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="mtype.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="measure.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="renbase.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="schedule.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="seekpt.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="streams.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="source.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="strmctl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="sysclock.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="transfrm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="transip.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="vtrans.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wxdebug.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wxlist.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="wxutil.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="amextra.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="amfilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="amvideo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="combase.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ctlutil.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ddmm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="mtype.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="outputq.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pstream.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pullpin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="refclock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="renbase.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="schedule.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="seekpt.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="strmctl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="sysclock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="transfrm.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="transip.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="vtrans.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wxdebug.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wxlist.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="wxutil.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -1,74 +0,0 @@
//------------------------------------------------------------------------------
// File: Cache.h
//
// Desc: DirectShow base classes - efines a non-MFC generic cache class.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
/* This class implements a simple cache. A cache object is instantiated
with the number of items it is to hold. An item is a pointer to an
object derived from CBaseObject (helps reduce memory leaks). The cache
can then have objects added to it and removed from it. The cache size
is fixed at construction time and may therefore run out or be flooded.
If it runs out it returns a NULL pointer, if it fills up it also returns
a NULL pointer instead of a pointer to the object just inserted */
/* Making these classes inherit from CBaseObject does nothing for their
functionality but it allows us to check there are no memory leaks */
/* WARNING Be very careful when using this class, what it lets you do is
store and retrieve objects so that you can minimise object creation
which in turns improves efficiency. However the object you store is
exactly the same as the object you get back which means that it short
circuits the constructor initialisation phase. This means any class
variables the object has (eg pointers) are highly likely to be invalid.
Therefore ensure you reinitialise the object before using it again */
#ifndef __CACHE__
#define __CACHE__
class CCache : CBaseObject {
/* Make copy constructor and assignment operator inaccessible */
CCache(const CCache &refCache);
CCache &operator=(const CCache &refCache);
private:
/* These are initialised in the constructor. The first variable points to
an array of pointers, each of which points to a CBaseObject derived
object. The m_iCacheSize is the static fixed size for the cache and the
m_iUsed defines the number of places filled with objects at any time.
We fill the array of pointers from the start (ie m_ppObjects[0] first)
and then only add and remove objects from the end position, so in this
respect the array of object pointers should be treated as a stack */
CBaseObject **m_ppObjects;
const INT m_iCacheSize;
INT m_iUsed;
public:
CCache(__in_opt LPCTSTR pName,INT iItems);
virtual ~CCache();
/* Add an item to the cache */
CBaseObject *AddToCache(__in CBaseObject *pObject);
/* Remove an item from the cache */
CBaseObject *RemoveFromCache();
/* Delete all the objects held in the cache */
void RemoveAll(void);
/* Return the cache size which is set during construction */
INT GetCacheSize(void) const {return m_iCacheSize;};
};
#endif /* __CACHE__ */

View File

@@ -1,265 +0,0 @@
//------------------------------------------------------------------------------
// File: ComBase.cpp
//
// Desc: DirectShow base classes - implements class hierarchy for creating
// COM objects.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#pragma warning( disable : 4514 ) // Disable warnings re unused inline functions
/* Define the static member variable */
LONG CBaseObject::m_cObjects = 0;
/* Constructor */
CBaseObject::CBaseObject(__in_opt LPCTSTR pName)
{
/* Increment the number of active objects */
InterlockedIncrement(&m_cObjects);
#ifdef DEBUG
#ifdef UNICODE
m_dwCookie = DbgRegisterObjectCreation(0, pName);
#else
m_dwCookie = DbgRegisterObjectCreation(pName, 0);
#endif
#endif
}
#ifdef UNICODE
CBaseObject::CBaseObject(const char *pName)
{
/* Increment the number of active objects */
InterlockedIncrement(&m_cObjects);
#ifdef DEBUG
m_dwCookie = DbgRegisterObjectCreation(pName, 0);
#endif
}
#endif
HINSTANCE hlibOLEAut32;
/* Destructor */
CBaseObject::~CBaseObject()
{
/* Decrement the number of objects active */
if (InterlockedDecrement(&m_cObjects) == 0) {
if (hlibOLEAut32) {
FreeLibrary(hlibOLEAut32);
hlibOLEAut32 = 0;
}
};
#ifdef DEBUG
DbgRegisterObjectDestruction(m_dwCookie);
#endif
}
static const TCHAR szOle32Aut[] = TEXT("OleAut32.dll");
HINSTANCE LoadOLEAut32()
{
if (hlibOLEAut32 == 0) {
hlibOLEAut32 = LoadLibrary(szOle32Aut);
}
return hlibOLEAut32;
}
/* Constructor */
// We know we use "this" in the initialization list, we also know we don't modify *phr.
#pragma warning( disable : 4355 4100 )
CUnknown::CUnknown(__in_opt LPCTSTR pName, __in_opt LPUNKNOWN pUnk)
: CBaseObject(pName)
/* Start the object with a reference count of zero - when the */
/* object is queried for it's first interface this may be */
/* incremented depending on whether or not this object is */
/* currently being aggregated upon */
, m_cRef(0)
/* Set our pointer to our IUnknown interface. */
/* If we have an outer, use its, otherwise use ours. */
/* This pointer effectivly points to the owner of */
/* this object and can be accessed by the GetOwner() method. */
, m_pUnknown( pUnk != 0 ? pUnk : reinterpret_cast<LPUNKNOWN>( static_cast<PNDUNKNOWN>(this) ) )
/* Why the double cast? Well, the inner cast is a type-safe cast */
/* to pointer to a type from which we inherit. The second is */
/* type-unsafe but works because INonDelegatingUnknown "behaves */
/* like" IUnknown. (Only the names on the methods change.) */
{
// Everything we need to do has been done in the initializer list
}
// This does the same as above except it has a useless HRESULT argument
// use the previous constructor, this is just left for compatibility...
CUnknown::CUnknown(__in_opt LPCTSTR pName, __in_opt LPUNKNOWN pUnk, __inout_opt HRESULT *phr) :
CBaseObject(pName),
m_cRef(0),
m_pUnknown( pUnk != 0 ? pUnk : reinterpret_cast<LPUNKNOWN>( static_cast<PNDUNKNOWN>(this) ) )
{
}
#ifdef UNICODE
CUnknown::CUnknown(__in_opt LPCSTR pName, __in_opt LPUNKNOWN pUnk)
: CBaseObject(pName), m_cRef(0),
m_pUnknown( pUnk != 0 ? pUnk : reinterpret_cast<LPUNKNOWN>( static_cast<PNDUNKNOWN>(this) ) )
{ }
CUnknown::CUnknown(__in_opt LPCSTR pName, __in_opt LPUNKNOWN pUnk, __inout_opt HRESULT *phr) :
CBaseObject(pName), m_cRef(0),
m_pUnknown( pUnk != 0 ? pUnk : reinterpret_cast<LPUNKNOWN>( static_cast<PNDUNKNOWN>(this) ) )
{ }
#endif
#pragma warning( default : 4355 4100 )
/* QueryInterface */
STDMETHODIMP CUnknown::NonDelegatingQueryInterface(REFIID riid, __deref_out void ** ppv)
{
CheckPointer(ppv,E_POINTER);
ValidateReadWritePtr(ppv,sizeof(PVOID));
/* We know only about IUnknown */
if (riid == IID_IUnknown) {
GetInterface((LPUNKNOWN) (PNDUNKNOWN) this, ppv);
return NOERROR;
} else {
*ppv = NULL;
return E_NOINTERFACE;
}
}
/* We have to ensure that we DON'T use a max macro, since these will typically */
/* lead to one of the parameters being evaluated twice. Since we are worried */
/* about concurrency, we can't afford to access the m_cRef twice since we can't */
/* afford to run the risk that its value having changed between accesses. */
template<class T> inline static T ourmax( const T & a, const T & b )
{
return a > b ? a : b;
}
/* AddRef */
STDMETHODIMP_(ULONG) CUnknown::NonDelegatingAddRef()
{
LONG lRef = InterlockedIncrement( &m_cRef );
ASSERT(lRef > 0);
DbgLog((LOG_MEMORY,3,TEXT(" Obj %d ref++ = %d"),
m_dwCookie, m_cRef));
return ourmax(ULONG(m_cRef), 1ul);
}
/* Release */
STDMETHODIMP_(ULONG) CUnknown::NonDelegatingRelease()
{
/* If the reference count drops to zero delete ourselves */
LONG lRef = InterlockedDecrement( &m_cRef );
ASSERT(lRef >= 0);
DbgLog((LOG_MEMORY,3,TEXT(" Object %d ref-- = %d"),
m_dwCookie, m_cRef));
if (lRef == 0) {
// COM rules say we must protect against re-entrancy.
// If we are an aggregator and we hold our own interfaces
// on the aggregatee, the QI for these interfaces will
// addref ourselves. So after doing the QI we must release
// a ref count on ourselves. Then, before releasing the
// private interface, we must addref ourselves. When we do
// this from the destructor here it will result in the ref
// count going to 1 and then back to 0 causing us to
// re-enter the destructor. Hence we add an extra refcount here
// once we know we will delete the object.
// for an example aggregator see filgraph\distrib.cpp.
m_cRef++;
delete this;
return ULONG(0);
} else {
// Don't touch m_cRef again even in this leg as the object
// may have just been released on another thread too
return ourmax(ULONG(lRef), 1ul);
}
}
/* Return an interface pointer to a requesting client
performing a thread safe AddRef as necessary */
STDAPI GetInterface(LPUNKNOWN pUnk, __out void **ppv)
{
CheckPointer(ppv, E_POINTER);
*ppv = pUnk;
pUnk->AddRef();
return NOERROR;
}
/* Compares two interfaces and returns TRUE if they are on the same object */
BOOL WINAPI IsEqualObject(IUnknown *pFirst, IUnknown *pSecond)
{
/* Different objects can't have the same interface pointer for
any interface
*/
if (pFirst == pSecond) {
return TRUE;
}
/* OK - do it the hard way - check if they have the same
IUnknown pointers - a single object can only have one of these
*/
LPUNKNOWN pUnknown1; // Retrieve the IUnknown interface
LPUNKNOWN pUnknown2; // Retrieve the other IUnknown interface
HRESULT hr; // General OLE return code
ASSERT(pFirst);
ASSERT(pSecond);
/* See if the IUnknown pointers match */
hr = pFirst->QueryInterface(IID_IUnknown,(void **) &pUnknown1);
if (FAILED(hr)) {
return FALSE;
}
ASSERT(pUnknown1);
/* Release the extra interface we hold */
pUnknown1->Release();
hr = pSecond->QueryInterface(IID_IUnknown,(void **) &pUnknown2);
if (FAILED(hr)) {
return FALSE;
}
ASSERT(pUnknown2);
/* Release the extra interface we hold */
pUnknown2->Release();
return (pUnknown1 == pUnknown2);
}

View File

@@ -1,305 +0,0 @@
//------------------------------------------------------------------------------
// File: ComBase.h
//
// Desc: DirectShow base classes - defines a class hierarchy for creating
// COM objects.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
/*
a. Derive your COM object from CUnknown
b. Make a static CreateInstance function that takes an LPUNKNOWN, an HRESULT *
and a TCHAR *. The LPUNKNOWN defines the object to delegate IUnknown calls
to. The HRESULT * allows error codes to be passed around constructors and
the TCHAR * is a descriptive name that can be printed on the debugger.
It is important that constructors only change the HRESULT * if they have
to set an ERROR code, if it was successful then leave it alone or you may
overwrite an error code from an object previously created.
When you call a constructor the descriptive name should be in static store
as we do not copy the string. To stop large amounts of memory being used
in retail builds by all these static strings use the NAME macro,
CMyFilter = new CImplFilter(NAME("My filter"),pUnknown,phr);
if (FAILED(hr)) {
return hr;
}
In retail builds NAME(_x_) compiles to NULL, the base CBaseObject class
knows not to do anything with objects that don't have a name.
c. Have a constructor for your object that passes the LPUNKNOWN, HRESULT * and
TCHAR * to the CUnknown constructor. You can set the HRESULT if you have an
error, or just simply pass it through to the constructor.
The object creation will fail in the class factory if the HRESULT indicates
an error (ie FAILED(HRESULT) == TRUE)
d. Create a FactoryTemplate with your object's class id and CreateInstance
function.
Then (for each interface) either
Multiple inheritance
1. Also derive it from ISomeInterface
2. Include DECLARE_IUNKNOWN in your class definition to declare
implementations of QueryInterface, AddRef and Release that
call the outer unknown
3. Override NonDelegatingQueryInterface to expose ISomeInterface by
code something like
if (riid == IID_ISomeInterface) {
return GetInterface((ISomeInterface *) this, ppv);
} else {
return CUnknown::NonDelegatingQueryInterface(riid, ppv);
}
4. Declare and implement the member functions of ISomeInterface.
or: Nested interfaces
1. Declare a class derived from CUnknown
2. Include DECLARE_IUNKNOWN in your class definition
3. Override NonDelegatingQueryInterface to expose ISomeInterface by
code something like
if (riid == IID_ISomeInterface) {
return GetInterface((ISomeInterface *) this, ppv);
} else {
return CUnknown::NonDelegatingQueryInterface(riid, ppv);
}
4. Implement the member functions of ISomeInterface. Use GetOwner() to
access the COM object class.
And in your COM object class:
5. Make the nested class a friend of the COM object class, and declare
an instance of the nested class as a member of the COM object class.
NOTE that because you must always pass the outer unknown and an hResult
to the CUnknown constructor you cannot use a default constructor, in
other words you will have to make the member variable a pointer to the
class and make a NEW call in your constructor to actually create it.
6. override the NonDelegatingQueryInterface with code like this:
if (riid == IID_ISomeInterface) {
return m_pImplFilter->
NonDelegatingQueryInterface(IID_ISomeInterface, ppv);
} else {
return CUnknown::NonDelegatingQueryInterface(riid, ppv);
}
You can have mixed classes which support some interfaces via multiple
inheritance and some via nested classes
*/
#ifndef __COMBASE__
#define __COMBASE__
// Filter Setup data structures no defined in axextend.idl
typedef REGPINTYPES
AMOVIESETUP_MEDIATYPE, * PAMOVIESETUP_MEDIATYPE, * FAR LPAMOVIESETUP_MEDIATYPE;
typedef REGFILTERPINS
AMOVIESETUP_PIN, * PAMOVIESETUP_PIN, * FAR LPAMOVIESETUP_PIN;
typedef struct _AMOVIESETUP_FILTER
{
const CLSID * clsID;
const WCHAR * strName;
DWORD dwMerit;
UINT nPins;
const AMOVIESETUP_PIN * lpPin;
}
AMOVIESETUP_FILTER, * PAMOVIESETUP_FILTER, * FAR LPAMOVIESETUP_FILTER;
/* The DLLENTRY module initialises the module handle on loading */
extern HINSTANCE g_hInst;
/* On DLL load remember which platform we are running on */
extern DWORD g_amPlatform;
extern OSVERSIONINFO g_osInfo; // Filled in by GetVersionEx
/* Version of IUnknown that is renamed to allow a class to support both
non delegating and delegating IUnknowns in the same COM object */
#ifndef INONDELEGATINGUNKNOWN_DEFINED
DECLARE_INTERFACE(INonDelegatingUnknown)
{
STDMETHOD(NonDelegatingQueryInterface) (THIS_ REFIID, LPVOID *) PURE;
STDMETHOD_(ULONG, NonDelegatingAddRef)(THIS) PURE;
STDMETHOD_(ULONG, NonDelegatingRelease)(THIS) PURE;
};
#define INONDELEGATINGUNKNOWN_DEFINED
#endif
typedef INonDelegatingUnknown *PNDUNKNOWN;
/* This is the base object class that supports active object counting. As
part of the debug facilities we trace every time a C++ object is created
or destroyed. The name of the object has to be passed up through the class
derivation list during construction as you cannot call virtual functions
in the constructor. The downside of all this is that every single object
constructor has to take an object name parameter that describes it */
class CBaseObject
{
private:
// Disable the copy constructor and assignment by default so you will get
// compiler errors instead of unexpected behaviour if you pass objects
// by value or assign objects.
CBaseObject(const CBaseObject& objectSrc); // no implementation
void operator=(const CBaseObject& objectSrc); // no implementation
private:
static LONG m_cObjects; /* Total number of objects active */
protected:
#ifdef DEBUG
DWORD m_dwCookie; /* Cookie identifying this object */
#endif
public:
/* These increment and decrement the number of active objects */
CBaseObject(__in_opt LPCTSTR pName);
#ifdef UNICODE
CBaseObject(__in_opt LPCSTR pName);
#endif
~CBaseObject();
/* Call this to find if there are any CUnknown derived objects active */
static LONG ObjectsActive() {
return m_cObjects;
};
};
/* An object that supports one or more COM interfaces will be based on
this class. It supports counting of total objects for DLLCanUnloadNow
support, and an implementation of the core non delegating IUnknown */
class AM_NOVTABLE CUnknown : public INonDelegatingUnknown,
public CBaseObject
{
private:
const LPUNKNOWN m_pUnknown; /* Owner of this object */
protected: /* So we can override NonDelegatingRelease() */
volatile LONG m_cRef; /* Number of reference counts */
public:
CUnknown(__in_opt LPCTSTR pName, __in_opt LPUNKNOWN pUnk);
virtual ~CUnknown() {};
// This is redundant, just use the other constructor
// as we never touch the HRESULT in this anyway
CUnknown(__in_opt LPCTSTR Name, __in_opt LPUNKNOWN pUnk, __inout_opt HRESULT *phr);
#ifdef UNICODE
CUnknown(__in_opt LPCSTR pName, __in_opt LPUNKNOWN pUnk);
CUnknown(__in_opt LPCSTR pName, __in_opt LPUNKNOWN pUnk,__inout_opt HRESULT *phr);
#endif
/* Return the owner of this object */
LPUNKNOWN GetOwner() const {
return m_pUnknown;
};
/* Called from the class factory to create a new instance, it is
pure virtual so it must be overriden in your derived class */
/* static CUnknown *CreateInstance(LPUNKNOWN, HRESULT *) */
/* Non delegating unknown implementation */
STDMETHODIMP NonDelegatingQueryInterface(REFIID, __deref_out void **);
STDMETHODIMP_(ULONG) NonDelegatingAddRef();
STDMETHODIMP_(ULONG) NonDelegatingRelease();
};
/* Return an interface pointer to a requesting client
performing a thread safe AddRef as necessary */
STDAPI GetInterface(LPUNKNOWN pUnk, __out void **ppv);
/* A function that can create a new COM object */
typedef CUnknown *(CALLBACK *LPFNNewCOMObject)(__in_opt LPUNKNOWN pUnkOuter, __inout_opt HRESULT *phr);
/* A function (can be NULL) which is called from the DLL entrypoint
routine for each factory template:
bLoading - TRUE on DLL load, FALSE on DLL unload
rclsid - the m_ClsID of the entry
*/
typedef void (CALLBACK *LPFNInitRoutine)(BOOL bLoading, const CLSID *rclsid);
/* Create one of these per object class in an array so that
the default class factory code can create new instances */
class CFactoryTemplate {
public:
const WCHAR * m_Name;
const CLSID * m_ClsID;
LPFNNewCOMObject m_lpfnNew;
LPFNInitRoutine m_lpfnInit;
const AMOVIESETUP_FILTER * m_pAMovieSetup_Filter;
BOOL IsClassID(REFCLSID rclsid) const {
return (IsEqualCLSID(*m_ClsID,rclsid));
};
CUnknown *CreateInstance(__inout_opt LPUNKNOWN pUnk, __inout_opt HRESULT *phr) const {
CheckPointer(phr,NULL);
return m_lpfnNew(pUnk, phr);
};
};
/* You must override the (pure virtual) NonDelegatingQueryInterface to return
interface pointers (using GetInterface) to the interfaces your derived
class supports (the default implementation only supports IUnknown) */
#define DECLARE_IUNKNOWN \
STDMETHODIMP QueryInterface(REFIID riid, __deref_out void **ppv) { \
return GetOwner()->QueryInterface(riid,ppv); \
}; \
STDMETHODIMP_(ULONG) AddRef() { \
return GetOwner()->AddRef(); \
}; \
STDMETHODIMP_(ULONG) Release() { \
return GetOwner()->Release(); \
};
HINSTANCE LoadOLEAut32();
#endif /* __COMBASE__ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,923 +0,0 @@
//------------------------------------------------------------------------------
// File: CtlUtil.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// Base classes implementing IDispatch parsing for the basic control dual
// interfaces. Derive from these and implement just the custom method and
// property methods. We also implement CPosPassThru that can be used by
// renderers and transforms to pass by IMediaPosition and IMediaSeeking
#ifndef __CTLUTIL__
#define __CTLUTIL__
// OLE Automation has different ideas of TRUE and FALSE
#define OATRUE (-1)
#define OAFALSE (0)
// It's possible that we could replace this class with CreateStdDispatch
class CBaseDispatch
{
ITypeInfo * m_pti;
public:
CBaseDispatch() : m_pti(NULL) {}
~CBaseDispatch();
/* IDispatch methods */
STDMETHODIMP GetTypeInfoCount(__out UINT * pctinfo);
STDMETHODIMP GetTypeInfo(
REFIID riid,
UINT itinfo,
LCID lcid,
__deref_out ITypeInfo ** pptinfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
__in_ecount(cNames) LPOLESTR * rgszNames,
UINT cNames,
LCID lcid,
__out_ecount(cNames) DISPID * rgdispid);
};
class AM_NOVTABLE CMediaControl :
public IMediaControl,
public CUnknown
{
CBaseDispatch m_basedisp;
public:
CMediaControl(const TCHAR *, LPUNKNOWN);
DECLARE_IUNKNOWN
// override this to publicise our interfaces
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv);
/* IDispatch methods */
STDMETHODIMP GetTypeInfoCount(__out UINT * pctinfo);
STDMETHODIMP GetTypeInfo(
UINT itinfo,
LCID lcid,
__deref_out ITypeInfo ** pptinfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
__in_ecount(cNames) LPOLESTR * rgszNames,
UINT cNames,
LCID lcid,
__out_ecount(cNames) DISPID * rgdispid);
STDMETHODIMP Invoke(
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
__in DISPPARAMS * pdispparams,
__out_opt VARIANT * pvarResult,
__out_opt EXCEPINFO * pexcepinfo,
__out_opt UINT * puArgErr);
};
class AM_NOVTABLE CMediaEvent :
public IMediaEventEx,
public CUnknown
{
CBaseDispatch m_basedisp;
public:
CMediaEvent(__in_opt LPCTSTR, __in_opt LPUNKNOWN);
DECLARE_IUNKNOWN
// override this to publicise our interfaces
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv);
/* IDispatch methods */
STDMETHODIMP GetTypeInfoCount(__out UINT * pctinfo);
STDMETHODIMP GetTypeInfo(
UINT itinfo,
LCID lcid,
__deref_out ITypeInfo ** pptinfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
__in_ecount(cNames) LPOLESTR * rgszNames,
UINT cNames,
LCID lcid,
__out_ecount(cNames) DISPID * rgdispid);
STDMETHODIMP Invoke(
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
__in DISPPARAMS * pdispparams,
__out_opt VARIANT * pvarResult,
__out_opt EXCEPINFO * pexcepinfo,
__out_opt UINT * puArgErr);
};
class AM_NOVTABLE CMediaPosition :
public IMediaPosition,
public CUnknown
{
CBaseDispatch m_basedisp;
public:
CMediaPosition(__in_opt LPCTSTR, __in_opt LPUNKNOWN);
CMediaPosition(__in_opt LPCTSTR, __in_opt LPUNKNOWN, __inout HRESULT *phr);
DECLARE_IUNKNOWN
// override this to publicise our interfaces
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv);
/* IDispatch methods */
STDMETHODIMP GetTypeInfoCount(__out UINT * pctinfo);
STDMETHODIMP GetTypeInfo(
UINT itinfo,
LCID lcid,
__deref_out ITypeInfo ** pptinfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
__in_ecount(cNames) LPOLESTR * rgszNames,
UINT cNames,
LCID lcid,
__out_ecount(cNames) DISPID * rgdispid);
STDMETHODIMP Invoke(
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
__in DISPPARAMS * pdispparams,
__out_opt VARIANT * pvarResult,
__out_opt EXCEPINFO * pexcepinfo,
__out_opt UINT * puArgErr);
};
// OA-compatibility means that we must use double as the RefTime value,
// and REFERENCE_TIME (essentially a LONGLONG) within filters.
// this class converts between the two
class COARefTime : public CRefTime {
public:
COARefTime() {
};
COARefTime(CRefTime t)
: CRefTime(t)
{
};
COARefTime(REFERENCE_TIME t)
: CRefTime(t)
{
};
COARefTime(double d) {
m_time = (LONGLONG) (d * 10000000);
};
operator double() {
return double(m_time) / 10000000;
};
operator REFERENCE_TIME() {
return m_time;
};
COARefTime& operator=(const double& rd) {
m_time = (LONGLONG) (rd * 10000000);
return *this;
}
COARefTime& operator=(const REFERENCE_TIME& rt) {
m_time = rt;
return *this;
}
inline BOOL operator==(const COARefTime& rt)
{
return m_time == rt.m_time;
};
inline BOOL operator!=(const COARefTime& rt)
{
return m_time != rt.m_time;
};
inline BOOL operator < (const COARefTime& rt)
{
return m_time < rt.m_time;
};
inline BOOL operator > (const COARefTime& rt)
{
return m_time > rt.m_time;
};
inline BOOL operator >= (const COARefTime& rt)
{
return m_time >= rt.m_time;
};
inline BOOL operator <= (const COARefTime& rt)
{
return m_time <= rt.m_time;
};
inline COARefTime operator+(const COARefTime& rt)
{
return COARefTime(m_time + rt.m_time);
};
inline COARefTime operator-(const COARefTime& rt)
{
return COARefTime(m_time - rt.m_time);
};
inline COARefTime operator*(LONG l)
{
return COARefTime(m_time * l);
};
inline COARefTime operator/(LONG l)
{
return COARefTime(m_time / l);
};
private:
// Prevent bugs from constructing from LONG (which gets
// converted to double and then multiplied by 10000000
COARefTime(LONG);
LONG operator=(LONG);
};
// A utility class that handles IMediaPosition and IMediaSeeking on behalf
// of single-input pin renderers, or transform filters.
//
// Renderers will expose this from the filter; transform filters will
// expose it from the output pin and not the renderer.
//
// Create one of these, giving it your IPin* for your input pin, and delegate
// all IMediaPosition methods to it. It will query the input pin for
// IMediaPosition and respond appropriately.
//
// Call ForceRefresh if the pin connection changes.
//
// This class no longer caches the upstream IMediaPosition or IMediaSeeking
// it acquires it on each method call. This means ForceRefresh is not needed.
// The method is kept for source compatibility and to minimise the changes
// if we need to put it back later for performance reasons.
class CPosPassThru : public IMediaSeeking, public CMediaPosition
{
IPin *m_pPin;
HRESULT GetPeer(__deref_out IMediaPosition **ppMP);
HRESULT GetPeerSeeking(__deref_out IMediaSeeking **ppMS);
public:
CPosPassThru(__in_opt LPCTSTR, __in_opt LPUNKNOWN, __inout HRESULT*, IPin *);
DECLARE_IUNKNOWN
HRESULT ForceRefresh() {
return S_OK;
};
// override to return an accurate current position
virtual HRESULT GetMediaTime(__out LONGLONG *pStartTime, __out_opt LONGLONG *pEndTime) {
return E_FAIL;
}
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid,__deref_out void **ppv);
// IMediaSeeking methods
STDMETHODIMP GetCapabilities( __out DWORD * pCapabilities );
STDMETHODIMP CheckCapabilities( __inout DWORD * pCapabilities );
STDMETHODIMP SetTimeFormat(const GUID * pFormat);
STDMETHODIMP GetTimeFormat(__out GUID *pFormat);
STDMETHODIMP IsUsingTimeFormat(const GUID * pFormat);
STDMETHODIMP IsFormatSupported( const GUID * pFormat);
STDMETHODIMP QueryPreferredFormat( __out GUID *pFormat);
STDMETHODIMP ConvertTimeFormat(__out LONGLONG * pTarget,
__in_opt const GUID * pTargetFormat,
LONGLONG Source,
__in_opt const GUID * pSourceFormat );
STDMETHODIMP SetPositions( __inout_opt LONGLONG * pCurrent, DWORD CurrentFlags
, __inout_opt LONGLONG * pStop, DWORD StopFlags );
STDMETHODIMP GetPositions( __out_opt LONGLONG * pCurrent, __out_opt LONGLONG * pStop );
STDMETHODIMP GetCurrentPosition( __out LONGLONG * pCurrent );
STDMETHODIMP GetStopPosition( __out LONGLONG * pStop );
STDMETHODIMP SetRate( double dRate);
STDMETHODIMP GetRate( __out double * pdRate);
STDMETHODIMP GetDuration( __out LONGLONG *pDuration);
STDMETHODIMP GetAvailable( __out_opt LONGLONG *pEarliest, __out_opt LONGLONG *pLatest );
STDMETHODIMP GetPreroll( __out LONGLONG *pllPreroll );
// IMediaPosition properties
STDMETHODIMP get_Duration(__out REFTIME * plength);
STDMETHODIMP put_CurrentPosition(REFTIME llTime);
STDMETHODIMP get_StopTime(__out REFTIME * pllTime);
STDMETHODIMP put_StopTime(REFTIME llTime);
STDMETHODIMP get_PrerollTime(__out REFTIME * pllTime);
STDMETHODIMP put_PrerollTime(REFTIME llTime);
STDMETHODIMP get_Rate(__out double * pdRate);
STDMETHODIMP put_Rate(double dRate);
STDMETHODIMP get_CurrentPosition(__out REFTIME * pllTime);
STDMETHODIMP CanSeekForward(__out LONG *pCanSeekForward);
STDMETHODIMP CanSeekBackward(__out LONG *pCanSeekBackward);
private:
HRESULT GetSeekingLongLong( HRESULT (__stdcall IMediaSeeking::*pMethod)( LONGLONG * ),
__out LONGLONG * pll );
};
// Adds the ability to return a current position
class CRendererPosPassThru : public CPosPassThru
{
CCritSec m_PositionLock; // Locks access to our position
LONGLONG m_StartMedia; // Start media time last seen
LONGLONG m_EndMedia; // And likewise the end media
BOOL m_bReset; // Have media times been set
public:
// Used to help with passing media times through graph
CRendererPosPassThru(__in_opt LPCTSTR, __in_opt LPUNKNOWN, __inout HRESULT*, IPin *);
HRESULT RegisterMediaTime(IMediaSample *pMediaSample);
HRESULT RegisterMediaTime(LONGLONG StartTime,LONGLONG EndTime);
HRESULT GetMediaTime(__out LONGLONG *pStartTime,__out_opt LONGLONG *pEndTime);
HRESULT ResetMediaTime();
HRESULT EOS();
};
STDAPI CreatePosPassThru(
__in_opt LPUNKNOWN pAgg,
BOOL bRenderer,
IPin *pPin,
__deref_out IUnknown **ppPassThru
);
// A class that handles the IDispatch part of IBasicAudio and leaves the
// properties and methods themselves pure virtual.
class AM_NOVTABLE CBasicAudio : public IBasicAudio, public CUnknown
{
CBaseDispatch m_basedisp;
public:
CBasicAudio(__in_opt LPCTSTR, __in_opt LPUNKNOWN);
DECLARE_IUNKNOWN
// override this to publicise our interfaces
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv);
/* IDispatch methods */
STDMETHODIMP GetTypeInfoCount(__out UINT * pctinfo);
STDMETHODIMP GetTypeInfo(
UINT itinfo,
LCID lcid,
__deref_out ITypeInfo ** pptinfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
__in_ecount(cNames) LPOLESTR * rgszNames,
UINT cNames,
LCID lcid,
__out_ecount(cNames) DISPID * rgdispid);
STDMETHODIMP Invoke(
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
__in DISPPARAMS * pdispparams,
__out_opt VARIANT * pvarResult,
__out_opt EXCEPINFO * pexcepinfo,
__out_opt UINT * puArgErr);
};
// A class that handles the IDispatch part of IBasicVideo and leaves the
// properties and methods themselves pure virtual.
class AM_NOVTABLE CBaseBasicVideo : public IBasicVideo2, public CUnknown
{
CBaseDispatch m_basedisp;
public:
CBaseBasicVideo(__in_opt LPCTSTR, __in_opt LPUNKNOWN);
DECLARE_IUNKNOWN
// override this to publicise our interfaces
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv);
/* IDispatch methods */
STDMETHODIMP GetTypeInfoCount(__out UINT * pctinfo);
STDMETHODIMP GetTypeInfo(
UINT itinfo,
LCID lcid,
__deref_out ITypeInfo ** pptinfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
__in_ecount(cNames) LPOLESTR * rgszNames,
UINT cNames,
LCID lcid,
__out_ecount(cNames) DISPID * rgdispid);
STDMETHODIMP Invoke(
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
__in DISPPARAMS * pdispparams,
__out_opt VARIANT * pvarResult,
__out_opt EXCEPINFO * pexcepinfo,
__out_opt UINT * puArgErr);
STDMETHODIMP GetPreferredAspectRatio(
__out long *plAspectX,
__out long *plAspectY)
{
return E_NOTIMPL;
}
};
// A class that handles the IDispatch part of IVideoWindow and leaves the
// properties and methods themselves pure virtual.
class AM_NOVTABLE CBaseVideoWindow : public IVideoWindow, public CUnknown
{
CBaseDispatch m_basedisp;
public:
CBaseVideoWindow(__in_opt LPCTSTR, __in_opt LPUNKNOWN);
DECLARE_IUNKNOWN
// override this to publicise our interfaces
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv);
/* IDispatch methods */
STDMETHODIMP GetTypeInfoCount(__out UINT * pctinfo);
STDMETHODIMP GetTypeInfo(
UINT itinfo,
LCID lcid,
__deref_out ITypeInfo ** pptinfo);
STDMETHODIMP GetIDsOfNames(
REFIID riid,
__in_ecount(cNames) LPOLESTR * rgszNames,
UINT cNames,
LCID lcid,
__out_ecount(cNames) DISPID * rgdispid);
STDMETHODIMP Invoke(
DISPID dispidMember,
REFIID riid,
LCID lcid,
WORD wFlags,
__in DISPPARAMS * pdispparams,
__out_opt VARIANT * pvarResult,
__out_opt EXCEPINFO * pexcepinfo,
__out_opt UINT * puArgErr);
};
// abstract class to help source filters with their implementation
// of IMediaPosition. Derive from this and set the duration (and stop
// position). Also override NotifyChange to do something when the properties
// change.
class AM_NOVTABLE CSourcePosition : public CMediaPosition
{
public:
CSourcePosition(__in_opt LPCTSTR, __in_opt LPUNKNOWN, __inout HRESULT*, __in CCritSec *);
// IMediaPosition methods
STDMETHODIMP get_Duration(__out REFTIME * plength);
STDMETHODIMP put_CurrentPosition(REFTIME llTime);
STDMETHODIMP get_StopTime(__out REFTIME * pllTime);
STDMETHODIMP put_StopTime(REFTIME llTime);
STDMETHODIMP get_PrerollTime(__out REFTIME * pllTime);
STDMETHODIMP put_PrerollTime(REFTIME llTime);
STDMETHODIMP get_Rate(__out double * pdRate);
STDMETHODIMP put_Rate(double dRate);
STDMETHODIMP CanSeekForward(__out LONG *pCanSeekForward);
STDMETHODIMP CanSeekBackward(__out LONG *pCanSeekBackward);
// override if you can return the data you are actually working on
STDMETHODIMP get_CurrentPosition(__out REFTIME * pllTime) {
return E_NOTIMPL;
};
protected:
// we call this to notify changes. Override to handle them
virtual HRESULT ChangeStart() PURE;
virtual HRESULT ChangeStop() PURE;
virtual HRESULT ChangeRate() PURE;
COARefTime m_Duration;
COARefTime m_Start;
COARefTime m_Stop;
double m_Rate;
CCritSec * m_pLock;
};
class AM_NOVTABLE CSourceSeeking :
public IMediaSeeking,
public CUnknown
{
public:
DECLARE_IUNKNOWN;
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv);
// IMediaSeeking methods
STDMETHODIMP IsFormatSupported(const GUID * pFormat);
STDMETHODIMP QueryPreferredFormat(__out GUID *pFormat);
STDMETHODIMP SetTimeFormat(const GUID * pFormat);
STDMETHODIMP IsUsingTimeFormat(const GUID * pFormat);
STDMETHODIMP GetTimeFormat(__out GUID *pFormat);
STDMETHODIMP GetDuration(__out LONGLONG *pDuration);
STDMETHODIMP GetStopPosition(__out LONGLONG *pStop);
STDMETHODIMP GetCurrentPosition(__out LONGLONG *pCurrent);
STDMETHODIMP GetCapabilities( __out DWORD * pCapabilities );
STDMETHODIMP CheckCapabilities( __inout DWORD * pCapabilities );
STDMETHODIMP ConvertTimeFormat( __out LONGLONG * pTarget,
__in_opt const GUID * pTargetFormat,
LONGLONG Source,
__in_opt const GUID * pSourceFormat );
STDMETHODIMP SetPositions( __inout_opt LONGLONG * pCurrent, DWORD CurrentFlags
, __inout_opt LONGLONG * pStop, DWORD StopFlags );
STDMETHODIMP GetPositions( __out_opt LONGLONG * pCurrent, __out_opt LONGLONG * pStop );
STDMETHODIMP GetAvailable( __out_opt LONGLONG * pEarliest, __out_opt LONGLONG * pLatest );
STDMETHODIMP SetRate( double dRate);
STDMETHODIMP GetRate( __out double * pdRate);
STDMETHODIMP GetPreroll(__out LONGLONG *pPreroll);
protected:
// ctor
CSourceSeeking(__in_opt LPCTSTR, __in_opt LPUNKNOWN, __inout HRESULT*, __in CCritSec *);
// we call this to notify changes. Override to handle them
virtual HRESULT ChangeStart() PURE;
virtual HRESULT ChangeStop() PURE;
virtual HRESULT ChangeRate() PURE;
CRefTime m_rtDuration; // length of stream
CRefTime m_rtStart; // source will start here
CRefTime m_rtStop; // source will stop here
double m_dRateSeeking;
// seeking capabilities
DWORD m_dwSeekingCaps;
CCritSec * m_pLock;
};
// Base classes supporting Deferred commands.
// Deferred commands are queued by calls to methods on the IQueueCommand
// interface, exposed by the filtergraph and by some filters. A successful
// call to one of these methods will return an IDeferredCommand interface
// representing the queued command.
//
// A CDeferredCommand object represents a single deferred command, and exposes
// the IDeferredCommand interface as well as other methods permitting time
// checks and actual execution. It contains a reference to the CCommandQueue
// object on which it is queued.
//
// CCommandQueue is a base class providing a queue of CDeferredCommand
// objects, and methods to add, remove, check status and invoke the queued
// commands. A CCommandQueue object would be part of an object that
// implemented IQueueCommand.
class CCmdQueue;
// take a copy of the params and store them. Release any allocated
// memory in destructor
class CDispParams : public DISPPARAMS
{
public:
CDispParams(UINT nArgs, __in_ecount(nArgs) VARIANT* pArgs, __inout_opt HRESULT *phr = NULL);
~CDispParams();
};
// CDeferredCommand lifetime is controlled by refcounts. Caller of
// InvokeAt.. gets a refcounted interface pointer, and the CCmdQueue
// object also holds a refcount on us. Calling Cancel or Invoke takes
// us off the CCmdQueue and thus reduces the refcount by 1. Once taken
// off the queue we cannot be put back on the queue.
class CDeferredCommand
: public CUnknown,
public IDeferredCommand
{
public:
CDeferredCommand(
__inout CCmdQueue * pQ,
__in_opt LPUNKNOWN pUnk, // aggregation outer unk
__inout HRESULT * phr,
__in LPUNKNOWN pUnkExecutor, // object that will execute this cmd
REFTIME time,
__in GUID* iid,
long dispidMethod,
short wFlags,
long cArgs,
__in_ecount(cArgs) VARIANT* pDispParams,
__out VARIANT* pvarResult,
__out short* puArgErr,
BOOL bStream
);
DECLARE_IUNKNOWN
// override this to publicise our interfaces
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __out void **ppv);
// IDeferredCommand methods
STDMETHODIMP Cancel();
STDMETHODIMP Confidence(
__out LONG* pConfidence);
STDMETHODIMP Postpone(
REFTIME newtime);
STDMETHODIMP GetHResult(
__out HRESULT* phrResult);
// other public methods
HRESULT Invoke();
// access methods
// returns TRUE if streamtime, FALSE if presentation time
BOOL IsStreamTime() {
return m_bStream;
};
CRefTime GetTime() {
return m_time;
};
REFIID GetIID() {
return *m_iid;
};
long GetMethod() {
return m_dispidMethod;
};
short GetFlags() {
return m_wFlags;
};
DISPPARAMS* GetParams() {
return &m_DispParams;
};
VARIANT* GetResult() {
return m_pvarResult;
};
protected:
CCmdQueue* m_pQueue;
// pUnk for the interface that we will execute the command on
LPUNKNOWN m_pUnk;
// stored command data
REFERENCE_TIME m_time;
GUID* m_iid;
long m_dispidMethod;
short m_wFlags;
VARIANT* m_pvarResult;
BOOL m_bStream;
CDispParams m_DispParams;
DISPID m_DispId; // For get and put
// we use this for ITypeInfo access
CBaseDispatch m_Dispatch;
// save retval here
HRESULT m_hrResult;
};
// a list of CDeferredCommand objects. this is a base class providing
// the basics of access to the list. If you want to use CDeferredCommand
// objects then your queue needs to be derived from this class.
class AM_NOVTABLE CCmdQueue
{
public:
CCmdQueue(__inout_opt HRESULT *phr = NULL);
virtual ~CCmdQueue();
// returns a new CDeferredCommand object that will be initialised with
// the parameters and will be added to the queue during construction.
// returns S_OK if successfully created otherwise an error and
// no object has been queued.
virtual HRESULT New(
__out CDeferredCommand **ppCmd,
__in LPUNKNOWN pUnk,
REFTIME time,
__in GUID* iid,
long dispidMethod,
short wFlags,
long cArgs,
__in_ecount(cArgs) VARIANT* pDispParams,
__out VARIANT* pvarResult,
__out short* puArgErr,
BOOL bStream
);
// called by the CDeferredCommand object to add and remove itself
// from the queue
virtual HRESULT Insert(__in CDeferredCommand* pCmd);
virtual HRESULT Remove(__in CDeferredCommand* pCmd);
// Command-Due Checking
//
// There are two schemes of synchronisation: coarse and accurate. In
// coarse mode, you wait till the time arrives and then execute the cmd.
// In accurate mode, you wait until you are processing the sample that
// will appear at the time, and then execute the command. It's up to the
// filter which one it will implement. The filtergraph will always
// implement coarse mode for commands queued at the filtergraph.
//
// If you want coarse sync, you probably want to wait until there is a
// command due, and then execute it. You can do this by calling
// GetDueCommand. If you have several things to wait for, get the
// event handle from GetDueHandle() and when this is signalled then call
// GetDueCommand. Stream time will only advance between calls to Run and
// EndRun. Note that to avoid an extra thread there is no guarantee that
// if the handle is set there will be a command ready. Each time the
// event is signalled, call GetDueCommand (probably with a 0 timeout);
// This may return E_ABORT.
//
// If you want accurate sync, you must call GetCommandDueFor, passing
// as a parameter the stream time of the samples you are about to process.
// This will return:
// -- a stream-time command due at or before that stream time
// -- a presentation-time command due at or before the
// time that stream time will be presented (only between Run
// and EndRun calls, since outside of this, the mapping from
// stream time to presentation time is not known.
// -- any presentation-time command due now.
// This means that if you want accurate synchronisation on samples that
// might be processed during Paused mode, you need to use
// stream-time commands.
//
// In all cases, commands remain queued until Invoked or Cancelled. The
// setting and resetting of the event handle is managed entirely by this
// queue object.
// set the clock used for timing
virtual HRESULT SetSyncSource(__in_opt IReferenceClock*);
// switch to run mode. Streamtime to Presentation time mapping known.
virtual HRESULT Run(REFERENCE_TIME tStreamTimeOffset);
// switch to Stopped or Paused mode. Time mapping not known.
virtual HRESULT EndRun();
// return a pointer to the next due command. Blocks for msTimeout
// milliseconds until there is a due command.
// Stream-time commands will only become due between Run and Endrun calls.
// The command remains queued until invoked or cancelled.
// Returns E_ABORT if timeout occurs, otherwise S_OK (or other error).
// Returns an AddRef-ed object
virtual HRESULT GetDueCommand(__out CDeferredCommand ** ppCmd, long msTimeout);
// return the event handle that will be signalled whenever
// there are deferred commands due for execution (when GetDueCommand
// will not block).
HANDLE GetDueHandle() {
return HANDLE(m_evDue);
};
// return a pointer to a command that will be due for a given time.
// Pass in a stream time here. The stream time offset will be passed
// in via the Run method.
// Commands remain queued until invoked or cancelled.
// This method will not block. It will report VFW_E_NOT_FOUND if there
// are no commands due yet.
// Returns an AddRef-ed object
virtual HRESULT GetCommandDueFor(REFERENCE_TIME tStream, __out CDeferredCommand**ppCmd);
// check if a given time is due (TRUE if it is due yet)
BOOL CheckTime(CRefTime time, BOOL bStream) {
// if no clock, nothing is due!
if (!m_pClock) {
return FALSE;
}
// stream time
if (bStream) {
// not valid if not running
if (!m_bRunning) {
return FALSE;
}
// add on known stream time offset to get presentation time
time += m_StreamTimeOffset;
}
CRefTime Now;
m_pClock->GetTime((REFERENCE_TIME*)&Now);
return (time <= Now);
};
protected:
// protect access to lists etc
CCritSec m_Lock;
// commands queued in presentation time are stored here
CGenericList<CDeferredCommand> m_listPresentation;
// commands queued in stream time are stored here
CGenericList<CDeferredCommand> m_listStream;
// set when any commands are due
CAMEvent m_evDue;
// creates an advise for the earliest time required, if any
void SetTimeAdvise(void);
// advise id from reference clock (0 if no outstanding advise)
DWORD_PTR m_dwAdvise;
// advise time is for this presentation time
CRefTime m_tCurrentAdvise;
// the reference clock we are using (addrefed)
IReferenceClock* m_pClock;
// true when running
BOOL m_bRunning;
// contains stream time offset when m_bRunning is true
CRefTime m_StreamTimeOffset;
};
#endif // __CTLUTIL__

View File

@@ -1,129 +0,0 @@
//------------------------------------------------------------------------------
// File: DDMM.cpp
//
// Desc: DirectShow base classes - implements routines for using DirectDraw
// on a multimonitor system.
//
// Copyright (c) 1995-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include <ddraw.h>
#include "ddmm.h"
/*
* FindDeviceCallback
*/
typedef struct {
LPSTR szDevice;
GUID* lpGUID;
GUID GUID;
BOOL fFound;
} FindDeviceData;
BOOL CALLBACK FindDeviceCallback(__in_opt GUID* lpGUID, __in LPSTR szName, __in LPSTR szDevice, __in LPVOID lParam)
{
FindDeviceData *p = (FindDeviceData*)lParam;
if (lstrcmpiA(p->szDevice, szDevice) == 0) {
if (lpGUID) {
p->GUID = *lpGUID;
p->lpGUID = &p->GUID;
} else {
p->lpGUID = NULL;
}
p->fFound = TRUE;
return FALSE;
}
return TRUE;
}
BOOL CALLBACK FindDeviceCallbackEx(__in_opt GUID* lpGUID, __in LPSTR szName, __in LPSTR szDevice, __in LPVOID lParam, HMONITOR hMonitor)
{
FindDeviceData *p = (FindDeviceData*)lParam;
if (lstrcmpiA(p->szDevice, szDevice) == 0) {
if (lpGUID) {
p->GUID = *lpGUID;
p->lpGUID = &p->GUID;
} else {
p->lpGUID = NULL;
}
p->fFound = TRUE;
return FALSE;
}
return TRUE;
}
/*
* DirectDrawCreateFromDevice
*
* create a DirectDraw object for a particular device
*/
IDirectDraw * DirectDrawCreateFromDevice(__in_opt LPSTR szDevice, PDRAWCREATE DirectDrawCreateP, PDRAWENUM DirectDrawEnumerateP)
{
IDirectDraw* pdd = NULL;
FindDeviceData find;
if (szDevice == NULL) {
DirectDrawCreateP(NULL, &pdd, NULL);
return pdd;
}
find.szDevice = szDevice;
find.fFound = FALSE;
DirectDrawEnumerateP(FindDeviceCallback, (LPVOID)&find);
if (find.fFound)
{
//
// In 4bpp mode the following DDraw call causes a message box to be popped
// up by DDraw (!?!). It's DDraw's fault, but we don't like it. So we
// make sure it doesn't happen.
//
UINT ErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
DirectDrawCreateP(find.lpGUID, &pdd, NULL);
SetErrorMode(ErrorMode);
}
return pdd;
}
/*
* DirectDrawCreateFromDeviceEx
*
* create a DirectDraw object for a particular device
*/
IDirectDraw * DirectDrawCreateFromDeviceEx(__in_opt LPSTR szDevice, PDRAWCREATE DirectDrawCreateP, LPDIRECTDRAWENUMERATEEXA DirectDrawEnumerateExP)
{
IDirectDraw* pdd = NULL;
FindDeviceData find;
if (szDevice == NULL) {
DirectDrawCreateP(NULL, &pdd, NULL);
return pdd;
}
find.szDevice = szDevice;
find.fFound = FALSE;
DirectDrawEnumerateExP(FindDeviceCallbackEx, (LPVOID)&find,
DDENUM_ATTACHEDSECONDARYDEVICES);
if (find.fFound)
{
//
// In 4bpp mode the following DDraw call causes a message box to be popped
// up by DDraw (!?!). It's DDraw's fault, but we don't like it. So we
// make sure it doesn't happen.
//
UINT ErrorMode = SetErrorMode(SEM_FAILCRITICALERRORS);
DirectDrawCreateP(find.lpGUID, &pdd, NULL);
SetErrorMode(ErrorMode);
}
return pdd;
}

View File

@@ -1,28 +0,0 @@
//------------------------------------------------------------------------------
// File: DDMM.h
//
// Desc: DirectShow base classes - efines routines for using DirectDraw
// on a multimonitor system.
//
// Copyright (c) 1995-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" { /* Assume C declarations for C++ */
#endif /* __cplusplus */
// DDRAW.H might not include these
#ifndef DDENUM_ATTACHEDSECONDARYDEVICES
#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001L
#endif
typedef HRESULT (*PDRAWCREATE)(IID *,LPDIRECTDRAW *,LPUNKNOWN);
typedef HRESULT (*PDRAWENUM)(LPDDENUMCALLBACKA, LPVOID);
IDirectDraw * DirectDrawCreateFromDevice(__in_opt LPSTR, PDRAWCREATE, PDRAWENUM);
IDirectDraw * DirectDrawCreateFromDeviceEx(__in_opt LPSTR, PDRAWCREATE, LPDIRECTDRAWENUMERATEEXA);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@@ -1,101 +0,0 @@
//------------------------------------------------------------------------------
// File: FourCC.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// FOURCCMap
//
// provides a mapping between old-style multimedia format DWORDs
// and new-style GUIDs.
//
// A range of 4 billion GUIDs has been allocated to ensure that this
// mapping can be done straightforwardly one-to-one in both directions.
//
// January 95
#ifndef __FOURCC__
#define __FOURCC__
// Multimedia format types are marked with DWORDs built from four 8-bit
// chars and known as FOURCCs. New multimedia AM_MEDIA_TYPE definitions include
// a subtype GUID. In order to simplify the mapping, GUIDs in the range:
// XXXXXXXX-0000-0010-8000-00AA00389B71
// are reserved for FOURCCs.
class FOURCCMap : public GUID
{
public:
FOURCCMap();
FOURCCMap(DWORD Fourcc);
FOURCCMap(const GUID *);
DWORD GetFOURCC(void);
void SetFOURCC(DWORD fourcc);
void SetFOURCC(const GUID *);
private:
void InitGUID();
};
#define GUID_Data2 0
#define GUID_Data3 0x10
#define GUID_Data4_1 0xaa000080
#define GUID_Data4_2 0x719b3800
inline void
FOURCCMap::InitGUID() {
Data2 = GUID_Data2;
Data3 = GUID_Data3;
((DWORD *)Data4)[0] = GUID_Data4_1;
((DWORD *)Data4)[1] = GUID_Data4_2;
}
inline
FOURCCMap::FOURCCMap() {
InitGUID();
SetFOURCC( DWORD(0));
}
inline
FOURCCMap::FOURCCMap(DWORD fourcc)
{
InitGUID();
SetFOURCC(fourcc);
}
inline
FOURCCMap::FOURCCMap(const GUID * pGuid)
{
InitGUID();
SetFOURCC(pGuid);
}
inline void
FOURCCMap::SetFOURCC(const GUID * pGuid)
{
FOURCCMap * p = (FOURCCMap*) pGuid;
SetFOURCC(p->GetFOURCC());
}
inline void
FOURCCMap::SetFOURCC(DWORD fourcc)
{
Data1 = fourcc;
}
inline DWORD
FOURCCMap::GetFOURCC(void)
{
return Data1;
}
#endif /* __FOURCC__ */

View File

@@ -1,222 +0,0 @@
//------------------------------------------------------------------------------
// File: Measure.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
/*
The idea is to pepper the source code with interesting measurements and
have the last few thousand of these recorded in a circular buffer that
can be post-processed to give interesting numbers.
WHAT THE LOG LOOKS LIKE:
Time (sec) Type Delta Incident_Name
0.055,41 NOTE -. Incident Nine - Another note
0.055,42 NOTE 0.000,01 Incident Nine - Another note
0.055,44 NOTE 0.000,02 Incident Nine - Another note
0.055,45 STOP -. Incident Eight - Also random
0.055,47 START -. Incident Seven - Random
0.055,49 NOTE 0.000,05 Incident Nine - Another note
------- <etc. there is a lot of this> ----------------
0.125,60 STOP 0.000,03 Msr_Stop
0.125,62 START -. Msr_Start
0.125,63 START -. Incident Two - Start/Stop
0.125,65 STOP 0.000,03 Msr_Start
0.125,66 START -. Msr_Stop
0.125,68 STOP 0.000,05 Incident Two - Start/Stop
0.125,70 STOP 0.000,04 Msr_Stop
0.125,72 START -. Msr_Start
0.125,73 START -. Incident Two - Start/Stop
0.125,75 STOP 0.000,03 Msr_Start
0.125,77 START -. Msr_Stop
0.125,78 STOP 0.000,05 Incident Two - Start/Stop
0.125,80 STOP 0.000,03 Msr_Stop
0.125,81 NOTE -. Incident Three - single Note
0.125,83 START -. Incident Four - Start, no stop
0.125,85 START -. Incident Five - Single Start/Stop
0.125,87 STOP 0.000,02 Incident Five - Single Start/Stop
Number Average StdDev Smallest Largest Incident_Name
10 0.000,58 0.000,10 0.000,55 0.000,85 Incident One - Note
50 0.000,05 0.000,00 0.000,05 0.000,05 Incident Two - Start/Stop
1 -. -. -. -. Incident Three - single Note
0 -. -. -. -. Incident Four - Start, no stop
1 0.000,02 -. 0.000,02 0.000,02 Incident Five - Single Start/Stop
0 -. -. -. -. Incident Six - zero occurrences
100 0.000,25 0.000,12 0.000,02 0.000,62 Incident Seven - Random
100 0.000,79 0.000,48 0.000,02 0.001,92 Incident Eight - Also random
5895 0.000,01 0.000,01 0.000,01 0.000,56 Incident Nine - Another note
10 0.000,03 0.000,00 0.000,03 0.000,04 Msr_Note
50 0.000,03 0.000,00 0.000,03 0.000,04 Msr_Start
50 0.000,04 0.000,03 0.000,03 0.000,31 Msr_Stop
WHAT IT MEANS:
The log shows what happened and when. Each line shows the time at which
something happened (see WHAT YOU CODE below) what it was that happened
and (if approporate) the time since the corresponding previous event
(that's the delta column).
The statistics show how many times each event occurred, what the average
delta time was, also the standard deviation, largest and smalles delta.
WHAT YOU CODE:
Before anything else executes: - register your ids
int id1 = Msr_Register("Incident One - Note");
int id2 = Msr_Register("Incident Two - Start/Stop");
int id3 = Msr_Register("Incident Three - single Note");
etc.
At interesting moments:
// To measure a repetitive event - e.g. end of bitblt to screen
Msr_Note(Id9); // e.g. "video frame hiting the screen NOW!"
or
// To measure an elapsed time e.g. time taken to decode an MPEG B-frame
Msr_Start(Id2); // e.g. "Starting to decode MPEG B-frame"
. . .
MsrStop(Id2); // "Finished MPEG decode"
At the end:
HANDLE hFile;
hFile = CreateFile("Perf.log", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
Msr_Dump(hFile); // This writes the log out to the file
CloseHandle(hFile);
or
Msr_Dump(NULL); // This writes it to DbgLog((LOG_TRACE,0, ... ));
// but if you are writing it out to the debugger
// then the times are probably all garbage because
// the debugger can make things run awfully slow.
A given id should be used either for start / stop or Note calls. If Notes
are mixed in with Starts and Stops their statistics will be gibberish.
If you code the calls in upper case i.e. MSR_START(idMunge); then you get
macros which will turn into nothing unless PERF is defined.
You can reset the statistical counts for a given id by calling Reset(Id).
They are reset by default at the start.
It logs Reset as a special incident, so you can see it in the log.
The log is a circular buffer in storage (to try to minimise disk I/O).
It overwrites the oldest entries once full. The statistics include ALL
incidents since the last Reset, whether still visible in the log or not.
*/
#ifndef __MEASURE__
#define __MEASURE__
#ifdef PERF
#define MSR_INIT() Msr_Init()
#define MSR_TERMINATE() Msr_Terminate()
#define MSR_REGISTER(a) Msr_Register(a)
#define MSR_RESET(a) Msr_Reset(a)
#define MSR_CONTROL(a) Msr_Control(a)
#define MSR_START(a) Msr_Start(a)
#define MSR_STOP(a) Msr_Stop(a)
#define MSR_NOTE(a) Msr_Note(a)
#define MSR_INTEGER(a,b) Msr_Integer(a,b)
#define MSR_DUMP(a) Msr_Dump(a)
#define MSR_DUMPSTATS(a) Msr_DumpStats(a)
#else
#define MSR_INIT() ((void)0)
#define MSR_TERMINATE() ((void)0)
#define MSR_REGISTER(a) 0
#define MSR_RESET(a) ((void)0)
#define MSR_CONTROL(a) ((void)0)
#define MSR_START(a) ((void)0)
#define MSR_STOP(a) ((void)0)
#define MSR_NOTE(a) ((void)0)
#define MSR_INTEGER(a,b) ((void)0)
#define MSR_DUMP(a) ((void)0)
#define MSR_DUMPSTATS(a) ((void)0)
#endif
#ifdef __cplusplus
extern "C" {
#endif
// This must be called first - (called by the DllEntry)
void WINAPI Msr_Init(void);
// Call this last to clean up (or just let it fall off the end - who cares?)
void WINAPI Msr_Terminate(void);
// Call this to get an Id for an "incident" that you can pass to Start, Stop or Note
// everything that's logged is called an "incident".
int WINAPI Msr_Register(__in LPTSTR Incident);
// Reset the statistical counts for an incident
void WINAPI Msr_Reset(int Id);
// Reset all the counts for all incidents
#define MSR_RESET_ALL 0
#define MSR_PAUSE 1
#define MSR_RUN 2
void WINAPI Msr_Control(int iAction);
// log the start of an operation
void WINAPI Msr_Start(int Id);
// log the end of an operation
void WINAPI Msr_Stop(int Id);
// log a one-off or repetitive operation
void WINAPI Msr_Note(int Id);
// log an integer (on which we can see statistics later)
void WINAPI Msr_Integer(int Id, int n);
// print out all the vaialable log (it may have wrapped) and then the statistics.
// When the log wraps you lose log but the statistics are still complete.
// hFIle==NULL => use DbgLog
// otherwise hFile must have come from CreateFile or OpenFile.
void WINAPI Msr_Dump(HANDLE hFile);
// just dump the statistics - never mind the log
void WINAPI Msr_DumpStats(HANDLE hFile);
// Type definitions in case you want to declare a pointer to the dump functions
// (makes it a trifle easier to do dynamic linking
// i.e. LoadModule, GetProcAddress and call that)
// Typedefs so can declare MSR_DUMPPROC *MsrDumpStats; or whatever
typedef void WINAPI MSR_DUMPPROC(HANDLE hFile);
typedef void WINAPI MSR_CONTROLPROC(int iAction);
#ifdef __cplusplus
}
#endif
#endif // __MEASURE__

View File

@@ -1,120 +0,0 @@
//------------------------------------------------------------------------------
// File: MsgThrd.h
//
// Desc: DirectShow base classes - provides support for a worker thread
// class to which one can asynchronously post messages.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// Message class - really just a structure.
//
class CMsg {
public:
UINT uMsg;
DWORD dwFlags;
LPVOID lpParam;
CAMEvent *pEvent;
CMsg(UINT u, DWORD dw, __inout_opt LPVOID lp, __in_opt CAMEvent *pEvnt)
: uMsg(u), dwFlags(dw), lpParam(lp), pEvent(pEvnt) {}
CMsg()
: uMsg(0), dwFlags(0L), lpParam(NULL), pEvent(NULL) {}
};
// This is the actual thread class. It exports all the usual thread control
// functions. The created thread is different from a normal WIN32 thread in
// that it is prompted to perform particaular tasks by responding to messages
// posted to its message queue.
//
class AM_NOVTABLE CMsgThread {
private:
static DWORD WINAPI DefaultThreadProc(__inout LPVOID lpParam);
DWORD m_ThreadId;
HANDLE m_hThread;
protected:
// if you want to override GetThreadMsg to block on other things
// as well as this queue, you need access to this
CGenericList<CMsg> m_ThreadQueue;
CCritSec m_Lock;
HANDLE m_hSem;
LONG m_lWaiting;
public:
CMsgThread()
: m_ThreadId(0),
m_hThread(NULL),
m_lWaiting(0),
m_hSem(NULL),
// make a list with a cache of 5 items
m_ThreadQueue(NAME("MsgThread list"), 5)
{
}
~CMsgThread();
// override this if you want to block on other things as well
// as the message loop
void virtual GetThreadMsg(__out CMsg *msg);
// override this if you want to do something on thread startup
virtual void OnThreadInit() {
};
BOOL CreateThread();
BOOL WaitForThreadExit(__out LPDWORD lpdwExitCode) {
if (m_hThread != NULL) {
WaitForSingleObject(m_hThread, INFINITE);
return GetExitCodeThread(m_hThread, lpdwExitCode);
}
return FALSE;
}
DWORD ResumeThread() {
return ::ResumeThread(m_hThread);
}
DWORD SuspendThread() {
return ::SuspendThread(m_hThread);
}
int GetThreadPriority() {
return ::GetThreadPriority(m_hThread);
}
BOOL SetThreadPriority(int nPriority) {
return ::SetThreadPriority(m_hThread, nPriority);
}
HANDLE GetThreadHandle() {
return m_hThread;
}
DWORD GetThreadId() {
return m_ThreadId;
}
void PutThreadMsg(UINT uMsg, DWORD dwMsgFlags,
__in_opt LPVOID lpMsgParam, __in_opt CAMEvent *pEvent = NULL) {
CAutoLock lck(&m_Lock);
CMsg* pMsg = new CMsg(uMsg, dwMsgFlags, lpMsgParam, pEvent);
m_ThreadQueue.AddTail(pMsg);
if (m_lWaiting != 0) {
ReleaseSemaphore(m_hSem, m_lWaiting, 0);
m_lWaiting = 0;
}
}
// This is the function prototype of the function that the client
// supplies. It is always called on the created thread, never on
// the creator thread.
//
virtual LRESULT ThreadMessageProc(
UINT uMsg, DWORD dwFlags, __inout_opt LPVOID lpParam, __in_opt CAMEvent *pEvent) = 0;
};

View File

@@ -1,478 +0,0 @@
//------------------------------------------------------------------------------
// File: MType.cpp
//
// Desc: DirectShow base classes - implements a class that holds and
// manages media type information.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// helper class that derived pin objects can use to compare media
// types etc. Has same data members as the struct AM_MEDIA_TYPE defined
// in the streams IDL file, but also has (non-virtual) functions
#include <streams.h>
#include <mmreg.h>
CMediaType::~CMediaType(){
FreeMediaType(*this);
}
CMediaType::CMediaType()
{
InitMediaType();
}
CMediaType::CMediaType(const GUID * type)
{
InitMediaType();
majortype = *type;
}
// copy constructor does a deep copy of the format block
CMediaType::CMediaType(const AM_MEDIA_TYPE& rt, __out_opt HRESULT* phr)
{
HRESULT hr = CopyMediaType(this, &rt);
if (FAILED(hr) && (NULL != phr)) {
*phr = hr;
}
}
CMediaType::CMediaType(const CMediaType& rt, __out_opt HRESULT* phr)
{
HRESULT hr = CopyMediaType(this, &rt);
if (FAILED(hr) && (NULL != phr)) {
*phr = hr;
}
}
// this class inherits publicly from AM_MEDIA_TYPE so the compiler could generate
// the following assignment operator itself, however it could introduce some
// memory conflicts and leaks in the process because the structure contains
// a dynamically allocated block (pbFormat) which it will not copy correctly
CMediaType&
CMediaType::operator=(const AM_MEDIA_TYPE& rt)
{
Set(rt);
return *this;
}
CMediaType&
CMediaType::operator=(const CMediaType& rt)
{
*this = (AM_MEDIA_TYPE &) rt;
return *this;
}
BOOL
CMediaType::operator == (const CMediaType& rt) const
{
// I don't believe we need to check sample size or
// temporal compression flags, since I think these must
// be represented in the type, subtype and format somehow. They
// are pulled out as separate flags so that people who don't understand
// the particular format representation can still see them, but
// they should duplicate information in the format block.
return ((IsEqualGUID(majortype,rt.majortype) == TRUE) &&
(IsEqualGUID(subtype,rt.subtype) == TRUE) &&
(IsEqualGUID(formattype,rt.formattype) == TRUE) &&
(cbFormat == rt.cbFormat) &&
( (cbFormat == 0) ||
pbFormat != NULL && rt.pbFormat != NULL &&
(memcmp(pbFormat, rt.pbFormat, cbFormat) == 0)));
}
BOOL
CMediaType::operator != (const CMediaType& rt) const
{
/* Check to see if they are equal */
if (*this == rt) {
return FALSE;
}
return TRUE;
}
HRESULT
CMediaType::Set(const CMediaType& rt)
{
return Set((AM_MEDIA_TYPE &) rt);
}
HRESULT
CMediaType::Set(const AM_MEDIA_TYPE& rt)
{
if (&rt != this) {
FreeMediaType(*this);
HRESULT hr = CopyMediaType(this, &rt);
if (FAILED(hr)) {
return E_OUTOFMEMORY;
}
}
return S_OK;
}
BOOL
CMediaType::IsValid() const
{
return (!IsEqualGUID(majortype,GUID_NULL));
}
void
CMediaType::SetType(const GUID* ptype)
{
majortype = *ptype;
}
void
CMediaType::SetSubtype(const GUID* ptype)
{
subtype = *ptype;
}
ULONG
CMediaType::GetSampleSize() const {
if (IsFixedSize()) {
return lSampleSize;
} else {
return 0;
}
}
void
CMediaType::SetSampleSize(ULONG sz) {
if (sz == 0) {
SetVariableSize();
} else {
bFixedSizeSamples = TRUE;
lSampleSize = sz;
}
}
void
CMediaType::SetVariableSize() {
bFixedSizeSamples = FALSE;
}
void
CMediaType::SetTemporalCompression(BOOL bCompressed) {
bTemporalCompression = bCompressed;
}
BOOL
CMediaType::SetFormat(__in_bcount(cb) BYTE * pformat, ULONG cb)
{
if (NULL == AllocFormatBuffer(cb))
return(FALSE);
ASSERT(pbFormat);
memcpy(pbFormat, pformat, cb);
return(TRUE);
}
// set the type of the media type format block, this type defines what you
// will actually find in the format pointer. For example FORMAT_VideoInfo or
// FORMAT_WaveFormatEx. In the future this may be an interface pointer to a
// property set. Before sending out media types this should be filled in.
void
CMediaType::SetFormatType(const GUID *pformattype)
{
formattype = *pformattype;
}
// reset the format buffer
void CMediaType::ResetFormatBuffer()
{
if (cbFormat) {
CoTaskMemFree((PVOID)pbFormat);
}
cbFormat = 0;
pbFormat = NULL;
}
// allocate length bytes for the format and return a read/write pointer
// If we cannot allocate the new block of memory we return NULL leaving
// the original block of memory untouched (as does ReallocFormatBuffer)
BYTE*
CMediaType::AllocFormatBuffer(ULONG length)
{
ASSERT(length);
// do the types have the same buffer size
if (cbFormat == length) {
return pbFormat;
}
// allocate the new format buffer
BYTE *pNewFormat = (PBYTE)CoTaskMemAlloc(length);
if (pNewFormat == NULL) {
if (length <= cbFormat) return pbFormat; //reuse the old block anyway.
return NULL;
}
// delete the old format
if (cbFormat != 0) {
ASSERT(pbFormat);
CoTaskMemFree((PVOID)pbFormat);
}
cbFormat = length;
pbFormat = pNewFormat;
return pbFormat;
}
// reallocate length bytes for the format and return a read/write pointer
// to it. We keep as much information as we can given the new buffer size
// if this fails the original format buffer is left untouched. The caller
// is responsible for ensuring the size of memory required is non zero
BYTE*
CMediaType::ReallocFormatBuffer(ULONG length)
{
ASSERT(length);
// do the types have the same buffer size
if (cbFormat == length) {
return pbFormat;
}
// allocate the new format buffer
BYTE *pNewFormat = (PBYTE)CoTaskMemAlloc(length);
if (pNewFormat == NULL) {
if (length <= cbFormat) return pbFormat; //reuse the old block anyway.
return NULL;
}
// copy any previous format (or part of if new is smaller)
// delete the old format and replace with the new one
if (cbFormat != 0) {
ASSERT(pbFormat);
memcpy(pNewFormat,pbFormat,min(length,cbFormat));
CoTaskMemFree((PVOID)pbFormat);
}
cbFormat = length;
pbFormat = pNewFormat;
return pNewFormat;
}
// initialise a media type structure
void CMediaType::InitMediaType()
{
ZeroMemory((PVOID)this, sizeof(*this));
lSampleSize = 1;
bFixedSizeSamples = TRUE;
}
// a partially specified media type can be passed to IPin::Connect
// as a constraint on the media type used in the connection.
// the type, subtype or format type can be null.
BOOL
CMediaType::IsPartiallySpecified(void) const
{
if ((majortype == GUID_NULL) ||
(formattype == GUID_NULL)) {
return TRUE;
} else {
return FALSE;
}
}
BOOL
CMediaType::MatchesPartial(const CMediaType* ppartial) const
{
if ((ppartial->majortype != GUID_NULL) &&
(majortype != ppartial->majortype)) {
return FALSE;
}
if ((ppartial->subtype != GUID_NULL) &&
(subtype != ppartial->subtype)) {
return FALSE;
}
if (ppartial->formattype != GUID_NULL) {
// if the format block is specified then it must match exactly
if (formattype != ppartial->formattype) {
return FALSE;
}
if (cbFormat != ppartial->cbFormat) {
return FALSE;
}
if ((cbFormat != 0) &&
(memcmp(pbFormat, ppartial->pbFormat, cbFormat) != 0)) {
return FALSE;
}
}
return TRUE;
}
// general purpose function to delete a heap allocated AM_MEDIA_TYPE structure
// which is useful when calling IEnumMediaTypes::Next as the interface
// implementation allocates the structures which you must later delete
// the format block may also be a pointer to an interface to release
void WINAPI DeleteMediaType(__inout_opt AM_MEDIA_TYPE *pmt)
{
// allow NULL pointers for coding simplicity
if (pmt == NULL) {
return;
}
FreeMediaType(*pmt);
CoTaskMemFree((PVOID)pmt);
}
// this also comes in useful when using the IEnumMediaTypes interface so
// that you can copy a media type, you can do nearly the same by creating
// a CMediaType object but as soon as it goes out of scope the destructor
// will delete the memory it allocated (this takes a copy of the memory)
AM_MEDIA_TYPE * WINAPI CreateMediaType(AM_MEDIA_TYPE const *pSrc)
{
ASSERT(pSrc);
// Allocate a block of memory for the media type
AM_MEDIA_TYPE *pMediaType =
(AM_MEDIA_TYPE *)CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
if (pMediaType == NULL) {
return NULL;
}
// Copy the variable length format block
HRESULT hr = CopyMediaType(pMediaType,pSrc);
if (FAILED(hr)) {
CoTaskMemFree((PVOID)pMediaType);
return NULL;
}
return pMediaType;
}
// Copy 1 media type to another
HRESULT WINAPI CopyMediaType(__out AM_MEDIA_TYPE *pmtTarget, const AM_MEDIA_TYPE *pmtSource)
{
// We'll leak if we copy onto one that already exists - there's one
// case we can check like that - copying to itself.
ASSERT(pmtSource != pmtTarget);
*pmtTarget = *pmtSource;
if (pmtSource->cbFormat != 0) {
ASSERT(pmtSource->pbFormat != NULL);
pmtTarget->pbFormat = (PBYTE)CoTaskMemAlloc(pmtSource->cbFormat);
if (pmtTarget->pbFormat == NULL) {
pmtTarget->cbFormat = 0;
return E_OUTOFMEMORY;
} else {
CopyMemory((PVOID)pmtTarget->pbFormat, (PVOID)pmtSource->pbFormat,
pmtTarget->cbFormat);
}
}
if (pmtTarget->pUnk != NULL) {
pmtTarget->pUnk->AddRef();
}
return S_OK;
}
// Free an existing media type (ie free resources it holds)
void WINAPI FreeMediaType(__inout AM_MEDIA_TYPE& mt)
{
if (mt.cbFormat != 0) {
CoTaskMemFree((PVOID)mt.pbFormat);
// Strictly unnecessary but tidier
mt.cbFormat = 0;
mt.pbFormat = NULL;
}
if (mt.pUnk != NULL) {
mt.pUnk->Release();
mt.pUnk = NULL;
}
}
// Initialize a media type from a WAVEFORMATEX
STDAPI CreateAudioMediaType(
const WAVEFORMATEX *pwfx,
__out AM_MEDIA_TYPE *pmt,
BOOL bSetFormat
)
{
pmt->majortype = MEDIATYPE_Audio;
if (pwfx->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {
pmt->subtype = ((PWAVEFORMATEXTENSIBLE)pwfx)->SubFormat;
} else {
pmt->subtype = FOURCCMap(pwfx->wFormatTag);
}
pmt->formattype = FORMAT_WaveFormatEx;
pmt->bFixedSizeSamples = TRUE;
pmt->bTemporalCompression = FALSE;
pmt->lSampleSize = pwfx->nBlockAlign;
pmt->pUnk = NULL;
if (bSetFormat) {
if (pwfx->wFormatTag == WAVE_FORMAT_PCM) {
pmt->cbFormat = sizeof(WAVEFORMATEX);
} else {
pmt->cbFormat = sizeof(WAVEFORMATEX) + pwfx->cbSize;
}
pmt->pbFormat = (PBYTE)CoTaskMemAlloc(pmt->cbFormat);
if (pmt->pbFormat == NULL) {
return E_OUTOFMEMORY;
}
if (pwfx->wFormatTag == WAVE_FORMAT_PCM) {
CopyMemory(pmt->pbFormat, pwfx, sizeof(PCMWAVEFORMAT));
((WAVEFORMATEX *)pmt->pbFormat)->cbSize = 0;
} else {
CopyMemory(pmt->pbFormat, pwfx, pmt->cbFormat);
}
}
return S_OK;
}
// eliminate very many spurious warnings from MS compiler
#pragma warning(disable:4514)

View File

@@ -1,89 +0,0 @@
//------------------------------------------------------------------------------
// File: MtType.h
//
// Desc: DirectShow base classes - defines a class that holds and manages
// media type information.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __MTYPE__
#define __MTYPE__
/* Helper class that derived pin objects can use to compare media
types etc. Has same data members as the struct AM_MEDIA_TYPE defined
in the streams IDL file, but also has (non-virtual) functions */
class CMediaType : public _AMMediaType {
public:
~CMediaType();
CMediaType();
CMediaType(const GUID * majortype);
CMediaType(const AM_MEDIA_TYPE&, __out_opt HRESULT* phr = NULL);
CMediaType(const CMediaType&, __out_opt HRESULT* phr = NULL);
CMediaType& operator=(const CMediaType&);
CMediaType& operator=(const AM_MEDIA_TYPE&);
BOOL operator == (const CMediaType&) const;
BOOL operator != (const CMediaType&) const;
HRESULT Set(const CMediaType& rt);
HRESULT Set(const AM_MEDIA_TYPE& rt);
BOOL IsValid() const;
const GUID *Type() const { return &majortype;} ;
void SetType(const GUID *);
const GUID *Subtype() const { return &subtype;} ;
void SetSubtype(const GUID *);
BOOL IsFixedSize() const {return bFixedSizeSamples; };
BOOL IsTemporalCompressed() const {return bTemporalCompression; };
ULONG GetSampleSize() const;
void SetSampleSize(ULONG sz);
void SetVariableSize();
void SetTemporalCompression(BOOL bCompressed);
// read/write pointer to format - can't change length without
// calling SetFormat, AllocFormatBuffer or ReallocFormatBuffer
BYTE* Format() const {return pbFormat; };
ULONG FormatLength() const { return cbFormat; };
void SetFormatType(const GUID *);
const GUID *FormatType() const {return &formattype; };
BOOL SetFormat(__in_bcount(length) BYTE *pFormat, ULONG length);
void ResetFormatBuffer();
BYTE* AllocFormatBuffer(ULONG length);
BYTE* ReallocFormatBuffer(ULONG length);
void InitMediaType();
BOOL MatchesPartial(const CMediaType* ppartial) const;
BOOL IsPartiallySpecified(void) const;
};
/* General purpose functions to copy and delete a task allocated AM_MEDIA_TYPE
structure which is useful when using the IEnumMediaFormats interface as
the implementation allocates the structures which you must later delete */
void WINAPI DeleteMediaType(__inout_opt AM_MEDIA_TYPE *pmt);
AM_MEDIA_TYPE * WINAPI CreateMediaType(AM_MEDIA_TYPE const *pSrc);
HRESULT WINAPI CopyMediaType(__out AM_MEDIA_TYPE *pmtTarget, const AM_MEDIA_TYPE *pmtSource);
void WINAPI FreeMediaType(__inout AM_MEDIA_TYPE& mt);
// Initialize a media type from a WAVEFORMATEX
STDAPI CreateAudioMediaType(
const WAVEFORMATEX *pwfx,
__out AM_MEDIA_TYPE *pmt,
BOOL bSetFormat);
#endif /* __MTYPE__ */

View File

@@ -1,801 +0,0 @@
//------------------------------------------------------------------------------
// File: OutputQ.cpp
//
// Desc: DirectShow base classes - implements COutputQueue class used by an
// output pin which may sometimes want to queue output samples on a
// separate thread and sometimes call Receive() directly on the input
// pin.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
//
// COutputQueue Constructor :
//
// Determines if a thread is to be created and creates resources
//
// pInputPin - the downstream input pin we're queueing samples to
//
// phr - changed to a failure code if this function fails
// (otherwise unchanges)
//
// bAuto - Ask pInputPin if it can block in Receive by calling
// its ReceiveCanBlock method and create a thread if
// it can block, otherwise not.
//
// bQueue - if bAuto == FALSE then we create a thread if and only
// if bQueue == TRUE
//
// lBatchSize - work in batches of lBatchSize
//
// bBatchEact - Use exact batch sizes so don't send until the
// batch is full or SendAnyway() is called
//
// lListSize - If we create a thread make the list of samples queued
// to the thread have this size cache
//
// dwPriority - If we create a thread set its priority to this
//
COutputQueue::COutputQueue(
IPin *pInputPin, // Pin to send stuff to
__inout HRESULT *phr, // 'Return code'
BOOL bAuto, // Ask pin if queue or not
BOOL bQueue, // Send through queue
LONG lBatchSize, // Batch
BOOL bBatchExact, // Batch exactly to BatchSize
LONG lListSize,
DWORD dwPriority,
bool bFlushingOpt // flushing optimization
) : m_lBatchSize(lBatchSize),
m_bBatchExact(bBatchExact && (lBatchSize > 1)),
m_hThread(NULL),
m_hSem(NULL),
m_List(NULL),
m_pPin(pInputPin),
m_ppSamples(NULL),
m_lWaiting(0),
m_evFlushComplete(FALSE, phr),
m_pInputPin(NULL),
m_bSendAnyway(FALSE),
m_nBatched(0),
m_bFlushing(FALSE),
m_bFlushed(TRUE),
m_bFlushingOpt(bFlushingOpt),
m_bTerminate(FALSE),
m_hEventPop(NULL),
m_hr(S_OK)
{
ASSERT(m_lBatchSize > 0);
if (FAILED(*phr)) {
return;
}
// Check the input pin is OK and cache its IMemInputPin interface
*phr = pInputPin->QueryInterface(IID_IMemInputPin, (void **)&m_pInputPin);
if (FAILED(*phr)) {
return;
}
// See if we should ask the downstream pin
if (bAuto) {
HRESULT hr = m_pInputPin->ReceiveCanBlock();
if (SUCCEEDED(hr)) {
bQueue = hr == S_OK;
}
}
// Create our sample batch
m_ppSamples = new PMEDIASAMPLE[m_lBatchSize];
if (m_ppSamples == NULL) {
*phr = E_OUTOFMEMORY;
return;
}
// If we're queueing allocate resources
if (bQueue) {
DbgLog((LOG_TRACE, 2, TEXT("Creating thread for output pin")));
m_hSem = CreateSemaphore(NULL, 0, 0x7FFFFFFF, NULL);
if (m_hSem == NULL) {
DWORD dwError = GetLastError();
*phr = AmHresultFromWin32(dwError);
return;
}
m_List = new CSampleList(NAME("Sample Queue List"),
lListSize,
FALSE // No lock
);
if (m_List == NULL) {
*phr = E_OUTOFMEMORY;
return;
}
DWORD dwThreadId;
m_hThread = CreateThread(NULL,
0,
InitialThreadProc,
(LPVOID)this,
0,
&dwThreadId);
if (m_hThread == NULL) {
DWORD dwError = GetLastError();
*phr = AmHresultFromWin32(dwError);
return;
}
SetThreadPriority(m_hThread, dwPriority);
} else {
DbgLog((LOG_TRACE, 2, TEXT("Calling input pin directly - no thread")));
}
}
//
// COutputQueuee Destructor :
//
// Free all resources -
//
// Thread,
// Batched samples
//
COutputQueue::~COutputQueue()
{
DbgLog((LOG_TRACE, 3, TEXT("COutputQueue::~COutputQueue")));
/* Free our pointer */
if (m_pInputPin != NULL) {
m_pInputPin->Release();
}
if (m_hThread != NULL) {
{
CAutoLock lck(this);
m_bTerminate = TRUE;
m_hr = S_FALSE;
NotifyThread();
}
DbgWaitForSingleObject(m_hThread);
EXECUTE_ASSERT(CloseHandle(m_hThread));
// The thread frees the samples when asked to terminate
ASSERT(m_List->GetCount() == 0);
delete m_List;
} else {
FreeSamples();
}
if (m_hSem != NULL) {
EXECUTE_ASSERT(CloseHandle(m_hSem));
}
delete [] m_ppSamples;
}
//
// Call the real thread proc as a member function
//
DWORD WINAPI COutputQueue::InitialThreadProc(__in LPVOID pv)
{
HRESULT hrCoInit = CAMThread::CoInitializeHelper();
COutputQueue *pSampleQueue = (COutputQueue *)pv;
DWORD dwReturn = pSampleQueue->ThreadProc();
if(hrCoInit == S_OK) {
CoUninitialize();
}
return dwReturn;
}
//
// Thread sending the samples downstream :
//
// When there is nothing to do the thread sets m_lWaiting (while
// holding the critical section) and then waits for m_hSem to be
// set (not holding the critical section)
//
DWORD COutputQueue::ThreadProc()
{
while (TRUE) {
BOOL bWait = FALSE;
IMediaSample *pSample;
LONG lNumberToSend; // Local copy
NewSegmentPacket* ppacket;
//
// Get a batch of samples and send it if possible
// In any case exit the loop if there is a control action
// requested
//
{
CAutoLock lck(this);
while (TRUE) {
if (m_bTerminate) {
FreeSamples();
return 0;
}
if (m_bFlushing) {
FreeSamples();
SetEvent(m_evFlushComplete);
}
// Get a sample off the list
pSample = m_List->RemoveHead();
// inform derived class we took something off the queue
if (m_hEventPop) {
//DbgLog((LOG_TRACE,3,TEXT("Queue: Delivered SET EVENT")));
SetEvent(m_hEventPop);
}
if (pSample != NULL &&
!IsSpecialSample(pSample)) {
// If its just a regular sample just add it to the batch
// and exit the loop if the batch is full
m_ppSamples[m_nBatched++] = pSample;
if (m_nBatched == m_lBatchSize) {
break;
}
} else {
// If there was nothing in the queue and there's nothing
// to send (either because there's nothing or the batch
// isn't full) then prepare to wait
if (pSample == NULL &&
(m_bBatchExact || m_nBatched == 0)) {
// Tell other thread to set the event when there's
// something do to
ASSERT(m_lWaiting == 0);
m_lWaiting++;
bWait = TRUE;
} else {
// We break out of the loop on SEND_PACKET unless
// there's nothing to send
if (pSample == SEND_PACKET && m_nBatched == 0) {
continue;
}
if (pSample == NEW_SEGMENT) {
// now we need the parameters - we are
// guaranteed that the next packet contains them
ppacket = (NewSegmentPacket *) m_List->RemoveHead();
// we took something off the queue
if (m_hEventPop) {
//DbgLog((LOG_TRACE,3,TEXT("Queue: Delivered SET EVENT")));
SetEvent(m_hEventPop);
}
ASSERT(ppacket);
}
// EOS_PACKET falls through here and we exit the loop
// In this way it acts like SEND_PACKET
}
break;
}
}
if (!bWait) {
// We look at m_nBatched from the client side so keep
// it up to date inside the critical section
lNumberToSend = m_nBatched; // Local copy
m_nBatched = 0;
}
}
// Wait for some more data
if (bWait) {
DbgWaitForSingleObject(m_hSem);
continue;
}
// OK - send it if there's anything to send
// We DON'T check m_bBatchExact here because either we've got
// a full batch or we dropped through because we got
// SEND_PACKET or EOS_PACKET - both of which imply we should
// flush our batch
if (lNumberToSend != 0) {
long nProcessed;
if (m_hr == S_OK) {
ASSERT(!m_bFlushed);
HRESULT hr = m_pInputPin->ReceiveMultiple(m_ppSamples,
lNumberToSend,
&nProcessed);
/* Don't overwrite a flushing state HRESULT */
CAutoLock lck(this);
if (m_hr == S_OK) {
m_hr = hr;
}
ASSERT(!m_bFlushed);
}
while (lNumberToSend != 0) {
m_ppSamples[--lNumberToSend]->Release();
}
if (m_hr != S_OK) {
// In any case wait for more data - S_OK just
// means there wasn't an error
DbgLog((LOG_ERROR, 2, TEXT("ReceiveMultiple returned %8.8X"),
m_hr));
}
}
// Check for end of stream
if (pSample == EOS_PACKET) {
// We don't send even end of stream on if we've previously
// returned something other than S_OK
// This is because in that case the pin which returned
// something other than S_OK should have either sent
// EndOfStream() or notified the filter graph
if (m_hr == S_OK) {
DbgLog((LOG_TRACE, 2, TEXT("COutputQueue sending EndOfStream()")));
HRESULT hr = m_pPin->EndOfStream();
if (FAILED(hr)) {
DbgLog((LOG_ERROR, 2, TEXT("COutputQueue got code 0x%8.8X from EndOfStream()")));
}
}
}
// Data from a new source
if (pSample == RESET_PACKET) {
m_hr = S_OK;
SetEvent(m_evFlushComplete);
}
if (pSample == NEW_SEGMENT) {
m_pPin->NewSegment(ppacket->tStart, ppacket->tStop, ppacket->dRate);
delete ppacket;
}
}
}
// Send batched stuff anyway
void COutputQueue::SendAnyway()
{
if (!IsQueued()) {
// m_bSendAnyway is a private parameter checked in ReceiveMultiple
m_bSendAnyway = TRUE;
LONG nProcessed;
ReceiveMultiple(NULL, 0, &nProcessed);
m_bSendAnyway = FALSE;
} else {
CAutoLock lck(this);
QueueSample(SEND_PACKET);
NotifyThread();
}
}
void
COutputQueue::NewSegment(
REFERENCE_TIME tStart,
REFERENCE_TIME tStop,
double dRate)
{
if (!IsQueued()) {
if (S_OK == m_hr) {
if (m_bBatchExact) {
SendAnyway();
}
m_pPin->NewSegment(tStart, tStop, dRate);
}
} else {
if (m_hr == S_OK) {
//
// we need to queue the new segment to appear in order in the
// data, but we need to pass parameters to it. Rather than
// take the hit of wrapping every single sample so we can tell
// special ones apart, we queue special pointers to indicate
// special packets, and we guarantee (by holding the
// critical section) that the packet immediately following a
// NEW_SEGMENT value is a NewSegmentPacket containing the
// parameters.
NewSegmentPacket * ppack = new NewSegmentPacket;
if (ppack == NULL) {
return;
}
ppack->tStart = tStart;
ppack->tStop = tStop;
ppack->dRate = dRate;
CAutoLock lck(this);
QueueSample(NEW_SEGMENT);
QueueSample( (IMediaSample*) ppack);
NotifyThread();
}
}
}
//
// End of Stream is queued to output device
//
void COutputQueue::EOS()
{
CAutoLock lck(this);
if (!IsQueued()) {
if (m_bBatchExact) {
SendAnyway();
}
if (m_hr == S_OK) {
DbgLog((LOG_TRACE, 2, TEXT("COutputQueue sending EndOfStream()")));
m_bFlushed = FALSE;
HRESULT hr = m_pPin->EndOfStream();
if (FAILED(hr)) {
DbgLog((LOG_ERROR, 2, TEXT("COutputQueue got code 0x%8.8X from EndOfStream()")));
}
}
} else {
if (m_hr == S_OK) {
m_bFlushed = FALSE;
QueueSample(EOS_PACKET);
NotifyThread();
}
}
}
//
// Flush all the samples in the queue
//
void COutputQueue::BeginFlush()
{
if (IsQueued()) {
{
CAutoLock lck(this);
// block receives -- we assume this is done by the
// filter in which we are a component
// discard all queued data
m_bFlushing = TRUE;
// Make sure we discard all samples from now on
if (m_hr == S_OK) {
m_hr = S_FALSE;
}
// Optimize so we don't keep calling downstream all the time
if (m_bFlushed && m_bFlushingOpt) {
return;
}
// Make sure we really wait for the flush to complete
m_evFlushComplete.Reset();
NotifyThread();
}
// pass this downstream
m_pPin->BeginFlush();
} else {
// pass downstream first to avoid deadlocks
m_pPin->BeginFlush();
CAutoLock lck(this);
// discard all queued data
m_bFlushing = TRUE;
// Make sure we discard all samples from now on
if (m_hr == S_OK) {
m_hr = S_FALSE;
}
}
}
//
// leave flush mode - pass this downstream
void COutputQueue::EndFlush()
{
{
CAutoLock lck(this);
ASSERT(m_bFlushing);
if (m_bFlushingOpt && m_bFlushed && IsQueued()) {
m_bFlushing = FALSE;
m_hr = S_OK;
return;
}
}
// sync with pushing thread -- done in BeginFlush
// ensure no more data to go downstream -- done in BeginFlush
//
// Because we are synching here there is no need to hold the critical
// section (in fact we'd deadlock if we did!)
if (IsQueued()) {
m_evFlushComplete.Wait();
} else {
FreeSamples();
}
// Be daring - the caller has guaranteed no samples will arrive
// before EndFlush() returns
m_bFlushing = FALSE;
m_bFlushed = TRUE;
// call EndFlush on downstream pins
m_pPin->EndFlush();
m_hr = S_OK;
}
// COutputQueue::QueueSample
//
// private method to Send a sample to the output queue
// The critical section MUST be held when this is called
void COutputQueue::QueueSample(IMediaSample *pSample)
{
if (NULL == m_List->AddTail(pSample)) {
if (!IsSpecialSample(pSample)) {
pSample->Release();
}
}
}
//
// COutputQueue::Receive()
//
// Send a single sample by the multiple sample route
// (NOTE - this could be optimized if necessary)
//
// On return the sample will have been Release()'d
//
HRESULT COutputQueue::Receive(IMediaSample *pSample)
{
LONG nProcessed;
return ReceiveMultiple(&pSample, 1, &nProcessed);
}
//
// COutputQueue::ReceiveMultiple()
//
// Send a set of samples to the downstream pin
//
// ppSamples - array of samples
// nSamples - how many
// nSamplesProcessed - How many were processed
//
// On return all samples will have been Release()'d
//
HRESULT COutputQueue::ReceiveMultiple (
__in_ecount(nSamples) IMediaSample **ppSamples,
long nSamples,
__out long *nSamplesProcessed)
{
if (nSamples < 0) {
return E_INVALIDARG;
}
CAutoLock lck(this);
// Either call directly or queue up the samples
if (!IsQueued()) {
// If we already had a bad return code then just return
if (S_OK != m_hr) {
// If we've never received anything since the last Flush()
// and the sticky return code is not S_OK we must be
// flushing
// ((!A || B) is equivalent to A implies B)
ASSERT(!m_bFlushed || m_bFlushing);
// We're supposed to Release() them anyway!
*nSamplesProcessed = 0;
for (int i = 0; i < nSamples; i++) {
DbgLog((LOG_TRACE, 3, TEXT("COutputQueue (direct) : Discarding %d samples code 0x%8.8X"),
nSamples, m_hr));
ppSamples[i]->Release();
}
return m_hr;
}
//
// If we're flushing the sticky return code should be S_FALSE
//
ASSERT(!m_bFlushing);
m_bFlushed = FALSE;
ASSERT(m_nBatched < m_lBatchSize);
ASSERT(m_nBatched == 0 || m_bBatchExact);
// Loop processing the samples in batches
LONG iLost = 0;
long iDone = 0;
for (iDone = 0;
iDone < nSamples || (m_nBatched != 0 && m_bSendAnyway);
) {
//pragma message (REMIND("Implement threshold scheme"))
ASSERT(m_nBatched < m_lBatchSize);
if (iDone < nSamples) {
m_ppSamples[m_nBatched++] = ppSamples[iDone++];
}
if (m_nBatched == m_lBatchSize ||
nSamples == 0 && (m_bSendAnyway || !m_bBatchExact)) {
LONG nDone;
DbgLog((LOG_TRACE, 4, TEXT("Batching %d samples"),
m_nBatched));
if (m_hr == S_OK) {
m_hr = m_pInputPin->ReceiveMultiple(m_ppSamples,
m_nBatched,
&nDone);
} else {
nDone = 0;
}
iLost += m_nBatched - nDone;
for (LONG i = 0; i < m_nBatched; i++) {
m_ppSamples[i]->Release();
}
m_nBatched = 0;
}
}
*nSamplesProcessed = iDone - iLost;
if (*nSamplesProcessed < 0) {
*nSamplesProcessed = 0;
}
return m_hr;
} else {
/* We're sending to our thread */
if (m_hr != S_OK) {
*nSamplesProcessed = 0;
DbgLog((LOG_TRACE, 3, TEXT("COutputQueue (queued) : Discarding %d samples code 0x%8.8X"),
nSamples, m_hr));
for (int i = 0; i < nSamples; i++) {
ppSamples[i]->Release();
}
return m_hr;
}
m_bFlushed = FALSE;
for (long i = 0; i < nSamples; i++) {
QueueSample(ppSamples[i]);
}
*nSamplesProcessed = nSamples;
if (!m_bBatchExact ||
m_nBatched + m_List->GetCount() >= m_lBatchSize) {
NotifyThread();
}
return S_OK;
}
}
// Get ready for new data - cancels sticky m_hr
void COutputQueue::Reset()
{
if (!IsQueued()) {
m_hr = S_OK;
} else {
{
CAutoLock lck(this);
QueueSample(RESET_PACKET);
NotifyThread();
}
m_evFlushComplete.Wait();
}
}
// Remove and Release() all queued and Batched samples
void COutputQueue::FreeSamples()
{
CAutoLock lck(this);
if (IsQueued()) {
while (TRUE) {
IMediaSample *pSample = m_List->RemoveHead();
// inform derived class we took something off the queue
if (m_hEventPop) {
//DbgLog((LOG_TRACE,3,TEXT("Queue: Delivered SET EVENT")));
SetEvent(m_hEventPop);
}
if (pSample == NULL) {
break;
}
if (!IsSpecialSample(pSample)) {
pSample->Release();
} else {
if (pSample == NEW_SEGMENT) {
// Free NEW_SEGMENT packet
NewSegmentPacket *ppacket =
(NewSegmentPacket *) m_List->RemoveHead();
// inform derived class we took something off the queue
if (m_hEventPop) {
//DbgLog((LOG_TRACE,3,TEXT("Queue: Delivered SET EVENT")));
SetEvent(m_hEventPop);
}
ASSERT(ppacket != NULL);
delete ppacket;
}
}
}
}
for (int i = 0; i < m_nBatched; i++) {
m_ppSamples[i]->Release();
}
m_nBatched = 0;
}
// Notify the thread if there is something to do
//
// The critical section MUST be held when this is called
void COutputQueue::NotifyThread()
{
// Optimize - no need to signal if it's not waiting
ASSERT(IsQueued());
if (m_lWaiting) {
ReleaseSemaphore(m_hSem, m_lWaiting, NULL);
m_lWaiting = 0;
}
}
// See if there's any work to do
// Returns
// TRUE if there is nothing on the queue and nothing in the batch
// and all data has been sent
// FALSE otherwise
//
BOOL COutputQueue::IsIdle()
{
CAutoLock lck(this);
// We're idle if
// there is no thread (!IsQueued()) OR
// the thread is waiting for more work (m_lWaiting != 0)
// AND
// there's nothing in the current batch (m_nBatched == 0)
if (IsQueued() && m_lWaiting == 0 || m_nBatched != 0) {
return FALSE;
} else {
// If we're idle it shouldn't be possible for there
// to be anything on the work queue
ASSERT(!IsQueued() || m_List->GetCount() == 0);
return TRUE;
}
}
void COutputQueue::SetPopEvent(HANDLE hEvent)
{
m_hEventPop = hEvent;
}

View File

@@ -1,137 +0,0 @@
//------------------------------------------------------------------------------
// File: OutputQ.h
//
// Desc: DirectShow base classes - defines the COutputQueue class, which
// makes a queue of samples and sends them to an output pin. The
// class will optionally send the samples to the pin directly.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
typedef CGenericList<IMediaSample> CSampleList;
class COutputQueue : public CCritSec
{
public:
// Constructor
COutputQueue(IPin *pInputPin, // Pin to send stuff to
__inout HRESULT *phr, // 'Return code'
BOOL bAuto = TRUE, // Ask pin if blocks
BOOL bQueue = TRUE, // Send through queue (ignored if
// bAuto set)
LONG lBatchSize = 1, // Batch
BOOL bBatchExact = FALSE,// Batch exactly to BatchSize
LONG lListSize = // Likely number in the list
DEFAULTCACHE,
DWORD dwPriority = // Priority of thread to create
THREAD_PRIORITY_NORMAL,
bool bFlushingOpt = false // flushing optimization
);
~COutputQueue();
// enter flush state - discard all data
void BeginFlush(); // Begin flushing samples
// re-enable receives (pass this downstream)
void EndFlush(); // Complete flush of samples - downstream
// pin guaranteed not to block at this stage
void EOS(); // Call this on End of stream
void SendAnyway(); // Send batched samples anyway (if bBatchExact set)
void NewSegment(
REFERENCE_TIME tStart,
REFERENCE_TIME tStop,
double dRate);
HRESULT Receive(IMediaSample *pSample);
// do something with these media samples
HRESULT ReceiveMultiple (
__in_ecount(nSamples) IMediaSample **pSamples,
long nSamples,
__out long *nSamplesProcessed);
void Reset(); // Reset m_hr ready for more data
// See if its idle or not
BOOL IsIdle();
// give the class an event to fire after everything removed from the queue
void SetPopEvent(HANDLE hEvent);
protected:
static DWORD WINAPI InitialThreadProc(__in LPVOID pv);
DWORD ThreadProc();
BOOL IsQueued()
{
return m_List != NULL;
};
// The critical section MUST be held when this is called
void QueueSample(IMediaSample *pSample);
BOOL IsSpecialSample(IMediaSample *pSample)
{
return (DWORD_PTR)pSample > (DWORD_PTR)(LONG_PTR)(-16);
};
// Remove and Release() batched and queued samples
void FreeSamples();
// Notify the thread there is something to do
void NotifyThread();
protected:
// Queue 'messages'
#define SEND_PACKET ((IMediaSample *)(LONG_PTR)(-2)) // Send batch
#define EOS_PACKET ((IMediaSample *)(LONG_PTR)(-3)) // End of stream
#define RESET_PACKET ((IMediaSample *)(LONG_PTR)(-4)) // Reset m_hr
#define NEW_SEGMENT ((IMediaSample *)(LONG_PTR)(-5)) // send NewSegment
// new segment packet is always followed by one of these
struct NewSegmentPacket {
REFERENCE_TIME tStart;
REFERENCE_TIME tStop;
double dRate;
};
// Remember input stuff
IPin * const m_pPin;
IMemInputPin * m_pInputPin;
BOOL const m_bBatchExact;
LONG const m_lBatchSize;
CSampleList * m_List;
HANDLE m_hSem;
CAMEvent m_evFlushComplete;
HANDLE m_hThread;
__field_ecount_opt(m_lBatchSize) IMediaSample ** m_ppSamples;
__range(0, m_lBatchSize) LONG m_nBatched;
// Wait optimization
LONG m_lWaiting;
// Flush synchronization
BOOL m_bFlushing;
// flushing optimization. some downstream filters have trouble
// with the queue's flushing optimization. other rely on it
BOOL m_bFlushed;
bool m_bFlushingOpt;
// Terminate now
BOOL m_bTerminate;
// Send anyway flag for batching
BOOL m_bSendAnyway;
// Deferred 'return code'
HRESULT volatile m_hr;
// an event that can be fired after every deliver
HANDLE m_hEventPop;
};

View File

@@ -1,197 +0,0 @@
//------------------------------------------------------------------------------
// File: PStream.cpp
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include <strsafe.h>
#ifdef PERF
#include <measure.h>
#endif
// #include "pstream.h" in streams.h
//
// Constructor
//
CPersistStream::CPersistStream(IUnknown *punk, __inout HRESULT *phr)
: mPS_fDirty(FALSE)
{
mPS_dwFileVersion = GetSoftwareVersion();
}
//
// Destructor
//
CPersistStream::~CPersistStream() {
// Nothing to do
}
#if 0
SAMPLE CODE TO COPY - not active at the moment
//
// NonDelegatingQueryInterface
//
// This object supports IPersist & IPersistStream
STDMETHODIMP CPersistStream::NonDelegatingQueryInterface(REFIID riid, __deref_out void **ppv)
{
if (riid == IID_IPersist) {
return GetInterface((IPersist *) this, ppv); // ???
}
else if (riid == IID_IPersistStream) {
return GetInterface((IPersistStream *) this, ppv);
}
else {
return CUnknown::NonDelegatingQueryInterface(riid, ppv);
}
}
#endif
//
// WriteToStream
//
// Writes to the stream (default action is to write nothing)
HRESULT CPersistStream::WriteToStream(IStream *pStream)
{
// You can override this to do things like
// hr = pStream->Write(MyStructure, sizeof(MyStructure), NULL);
return NOERROR;
}
HRESULT CPersistStream::ReadFromStream(IStream * pStream)
{
// You can override this to do things like
// hr = pStream->Read(MyStructure, sizeof(MyStructure), NULL);
return NOERROR;
}
//
// Load
//
// Load all the data from the given stream
STDMETHODIMP CPersistStream::Load(LPSTREAM pStm)
{
HRESULT hr;
// Load the version number then the data
mPS_dwFileVersion = ReadInt(pStm, hr);
if (FAILED(hr)) {
return hr;
}
return ReadFromStream(pStm);
} // Load
//
// Save
//
// Save the contents of this Stream.
STDMETHODIMP CPersistStream::Save(LPSTREAM pStm, BOOL fClearDirty)
{
HRESULT hr = WriteInt(pStm, GetSoftwareVersion());
if (FAILED(hr)) {
return hr;
}
hr = WriteToStream(pStm);
if (FAILED(hr)) {
return hr;
}
mPS_fDirty = !fClearDirty;
return hr;
} // Save
// WriteInt
//
// Writes an integer to an IStream as 11 UNICODE characters followed by one space.
// You could use this for shorts or unsigneds or anything (up to 32 bits)
// where the value isn't actually truncated by squeezing it into 32 bits.
// Values such as (unsigned) 0x80000000 would come out as -2147483648
// but would then load as 0x80000000 through ReadInt. Cast as you please.
STDAPI WriteInt(IStream *pIStream, int n)
{
WCHAR Buff[13]; // Allows for trailing null that we don't write
(void)StringCchPrintfW(Buff, NUMELMS(Buff),L"%011d ",n);
return pIStream->Write(&(Buff[0]), 12*sizeof(WCHAR), NULL);
} // WriteInt
// ReadInt
//
// Reads an integer from an IStream.
// Read as 4 bytes. You could use this for shorts or unsigneds or anything
// where the value isn't actually truncated by squeezing it into 32 bits
// Striped down subset of what sscanf can do (without dragging in the C runtime)
STDAPI_(int) ReadInt(IStream *pIStream, __out HRESULT &hr)
{
int Sign = 1;
unsigned int n = 0; // result wil be n*Sign
WCHAR wch;
hr = pIStream->Read( &wch, sizeof(wch), NULL);
if (FAILED(hr)) {
return 0;
}
if (wch==L'-'){
Sign = -1;
hr = pIStream->Read( &wch, sizeof(wch), NULL);
if (FAILED(hr)) {
return 0;
}
}
for( ; ; ) {
if (wch>=L'0' && wch<=L'9') {
n = 10*n+(int)(wch-L'0');
} else if ( wch == L' '
|| wch == L'\t'
|| wch == L'\r'
|| wch == L'\n'
|| wch == L'\0'
) {
break;
} else {
hr = VFW_E_INVALID_FILE_FORMAT;
return 0;
}
hr = pIStream->Read( &wch, sizeof(wch), NULL);
if (FAILED(hr)) {
return 0;
}
}
if (n==0x80000000 && Sign==-1) {
// This is the negative number that has no positive version!
return (int)n;
}
else return (int)n * Sign;
} // ReadInt
// The microsoft C/C++ compile generates level 4 warnings to the effect that
// a particular inline function (from some base class) was not needed.
// This line gets rid of hundreds of such unwanted messages and makes
// -W4 compilation feasible:
#pragma warning(disable: 4514)

View File

@@ -1,114 +0,0 @@
//------------------------------------------------------------------------------
// File: PStream.h
//
// Desc: DirectShow base classes - defines a class for persistent properties
// of filters.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __PSTREAM__
#define __PSTREAM__
// Base class for persistent properties of filters
// (i.e. filter properties in saved graphs)
// The simplest way to use this is:
// 1. Arrange for your filter to inherit this class
// 2. Implement in your class WriteToStream and ReadFromStream
// These will override the "do nothing" functions here.
// 3. Change your NonDelegatingQueryInterface to handle IPersistStream
// 4. Implement SizeMax to return the number of bytes of data you save.
// If you save UNICODE data, don't forget a char is 2 bytes.
// 5. Whenever your data changes, call SetDirty()
//
// At some point you may decide to alter, or extend the format of your data.
// At that point you will wish that you had a version number in all the old
// saved graphs, so that you can tell, when you read them, whether they
// represent the old or new form. To assist you in this, this class
// writes and reads a version number.
// When it writes, it calls GetSoftwareVersion() to enquire what version
// of the software we have at the moment. (In effect this is a version number
// of the data layout in the file). It writes this as the first thing in the data.
// If you want to change the version, implement (override) GetSoftwareVersion().
// It reads this from the file into mPS_dwFileVersion before calling ReadFromStream,
// so in ReadFromStream you can check mPS_dwFileVersion to see if you are reading
// an old version file.
// Normally you should accept files whose version is no newer than the software
// version that's reading them.
// CPersistStream
//
// Implements IPersistStream.
// See 'OLE Programmers Reference (Vol 1):Structured Storage Overview' for
// more implementation information.
class CPersistStream : public IPersistStream {
private:
// Internal state:
protected:
DWORD mPS_dwFileVersion; // version number of file (being read)
BOOL mPS_fDirty;
public:
// IPersistStream methods
STDMETHODIMP IsDirty()
{return (mPS_fDirty ? S_OK : S_FALSE);} // note FALSE means clean
STDMETHODIMP Load(LPSTREAM pStm);
STDMETHODIMP Save(LPSTREAM pStm, BOOL fClearDirty);
STDMETHODIMP GetSizeMax(__out ULARGE_INTEGER * pcbSize)
// Allow 24 bytes for version.
{ pcbSize->QuadPart = 12*sizeof(WCHAR)+SizeMax(); return NOERROR; }
// implementation
CPersistStream(IUnknown *punk, __inout HRESULT *phr);
~CPersistStream();
HRESULT SetDirty(BOOL fDirty)
{ mPS_fDirty = fDirty; return NOERROR;}
// override to reveal IPersist & IPersistStream
// STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void **ppv);
// --- IPersist ---
// You must override this to provide your own class id
STDMETHODIMP GetClassID(__out CLSID *pClsid) PURE;
// overrideable if you want
// file version number. Override it if you ever change format
virtual DWORD GetSoftwareVersion(void) { return 0; }
//=========================================================================
// OVERRIDE THESE to read and write your data
// OVERRIDE THESE to read and write your data
// OVERRIDE THESE to read and write your data
virtual int SizeMax() {return 0;}
virtual HRESULT WriteToStream(IStream *pStream);
virtual HRESULT ReadFromStream(IStream *pStream);
//=========================================================================
private:
};
// --- Useful helpers ---
// Writes an int to an IStream as UNICODE.
STDAPI WriteInt(IStream *pIStream, int n);
// inverse of WriteInt
STDAPI_(int) ReadInt(IStream *pIStream, __out HRESULT &hr);
#endif // __PSTREAM__

View File

@@ -1,588 +0,0 @@
//------------------------------------------------------------------------------
// File: PullPin.cpp
//
// Desc: DirectShow base classes - implements CPullPin class that pulls data
// from IAsyncReader.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include "pullpin.h"
#ifdef DXMPERF
#include "dxmperf.h"
#endif // DXMPERF
CPullPin::CPullPin()
: m_pReader(NULL),
m_pAlloc(NULL),
m_State(TM_Exit)
{
#ifdef DXMPERF
PERFLOG_CTOR( L"CPullPin", this );
#endif // DXMPERF
}
CPullPin::~CPullPin()
{
Disconnect();
#ifdef DXMPERF
PERFLOG_DTOR( L"CPullPin", this );
#endif // DXMPERF
}
// returns S_OK if successfully connected to an IAsyncReader interface
// from this object
// Optional allocator should be proposed as a preferred allocator if
// necessary
HRESULT
CPullPin::Connect(IUnknown* pUnk, IMemAllocator* pAlloc, BOOL bSync)
{
CAutoLock lock(&m_AccessLock);
if (m_pReader) {
return VFW_E_ALREADY_CONNECTED;
}
HRESULT hr = pUnk->QueryInterface(IID_IAsyncReader, (void**)&m_pReader);
if (FAILED(hr)) {
#ifdef DXMPERF
{
AM_MEDIA_TYPE * pmt = NULL;
PERFLOG_CONNECT( this, pUnk, hr, pmt );
}
#endif // DXMPERF
return(hr);
}
hr = DecideAllocator(pAlloc, NULL);
if (FAILED(hr)) {
Disconnect();
#ifdef DXMPERF
{
AM_MEDIA_TYPE * pmt = NULL;
PERFLOG_CONNECT( this, pUnk, hr, pmt );
}
#endif // DXMPERF
return hr;
}
LONGLONG llTotal, llAvail;
hr = m_pReader->Length(&llTotal, &llAvail);
if (FAILED(hr)) {
Disconnect();
#ifdef DXMPERF
{
AM_MEDIA_TYPE * pmt = NULL;
PERFLOG_CONNECT( this, pUnk, hr, pmt );
}
#endif
return hr;
}
// convert from file position to reference time
m_tDuration = llTotal * UNITS;
m_tStop = m_tDuration;
m_tStart = 0;
m_bSync = bSync;
#ifdef DXMPERF
{
AM_MEDIA_TYPE * pmt = NULL;
PERFLOG_CONNECT( this, pUnk, S_OK, pmt );
}
#endif // DXMPERF
return S_OK;
}
// disconnect any connection made in Connect
HRESULT
CPullPin::Disconnect()
{
CAutoLock lock(&m_AccessLock);
StopThread();
#ifdef DXMPERF
PERFLOG_DISCONNECT( this, m_pReader, S_OK );
#endif // DXMPERF
if (m_pReader) {
m_pReader->Release();
m_pReader = NULL;
}
if (m_pAlloc) {
m_pAlloc->Release();
m_pAlloc = NULL;
}
return S_OK;
}
// agree an allocator using RequestAllocator - optional
// props param specifies your requirements (non-zero fields).
// returns an error code if fail to match requirements.
// optional IMemAllocator interface is offered as a preferred allocator
// but no error occurs if it can't be met.
HRESULT
CPullPin::DecideAllocator(
IMemAllocator * pAlloc,
__inout_opt ALLOCATOR_PROPERTIES * pProps)
{
ALLOCATOR_PROPERTIES *pRequest;
ALLOCATOR_PROPERTIES Request;
if (pProps == NULL) {
Request.cBuffers = 3;
Request.cbBuffer = 64*1024;
Request.cbAlign = 0;
Request.cbPrefix = 0;
pRequest = &Request;
} else {
pRequest = pProps;
}
HRESULT hr = m_pReader->RequestAllocator(
pAlloc,
pRequest,
&m_pAlloc);
return hr;
}
// start pulling data
HRESULT
CPullPin::Active(void)
{
ASSERT(!ThreadExists());
return StartThread();
}
// stop pulling data
HRESULT
CPullPin::Inactive(void)
{
StopThread();
return S_OK;
}
HRESULT
CPullPin::Seek(REFERENCE_TIME tStart, REFERENCE_TIME tStop)
{
CAutoLock lock(&m_AccessLock);
ThreadMsg AtStart = m_State;
if (AtStart == TM_Start) {
BeginFlush();
PauseThread();
EndFlush();
}
m_tStart = tStart;
m_tStop = tStop;
HRESULT hr = S_OK;
if (AtStart == TM_Start) {
hr = StartThread();
}
return hr;
}
HRESULT
CPullPin::Duration(__out REFERENCE_TIME* ptDuration)
{
*ptDuration = m_tDuration;
return S_OK;
}
HRESULT
CPullPin::StartThread()
{
CAutoLock lock(&m_AccessLock);
if (!m_pAlloc || !m_pReader) {
return E_UNEXPECTED;
}
HRESULT hr;
if (!ThreadExists()) {
// commit allocator
hr = m_pAlloc->Commit();
if (FAILED(hr)) {
return hr;
}
// start thread
if (!Create()) {
return E_FAIL;
}
}
m_State = TM_Start;
hr = (HRESULT) CallWorker(m_State);
return hr;
}
HRESULT
CPullPin::PauseThread()
{
CAutoLock lock(&m_AccessLock);
if (!ThreadExists()) {
return E_UNEXPECTED;
}
// need to flush to ensure the thread is not blocked
// in WaitForNext
HRESULT hr = m_pReader->BeginFlush();
if (FAILED(hr)) {
return hr;
}
m_State = TM_Pause;
hr = CallWorker(TM_Pause);
m_pReader->EndFlush();
return hr;
}
HRESULT
CPullPin::StopThread()
{
CAutoLock lock(&m_AccessLock);
if (!ThreadExists()) {
return S_FALSE;
}
// need to flush to ensure the thread is not blocked
// in WaitForNext
HRESULT hr = m_pReader->BeginFlush();
if (FAILED(hr)) {
return hr;
}
m_State = TM_Exit;
hr = CallWorker(TM_Exit);
m_pReader->EndFlush();
// wait for thread to completely exit
Close();
// decommit allocator
if (m_pAlloc) {
m_pAlloc->Decommit();
}
return S_OK;
}
DWORD
CPullPin::ThreadProc(void)
{
while(1) {
DWORD cmd = GetRequest();
switch(cmd) {
case TM_Exit:
Reply(S_OK);
return 0;
case TM_Pause:
// we are paused already
Reply(S_OK);
break;
case TM_Start:
Reply(S_OK);
Process();
break;
}
// at this point, there should be no outstanding requests on the
// upstream filter.
// We should force begin/endflush to ensure that this is true.
// !!!Note that we may currently be inside a BeginFlush/EndFlush pair
// on another thread, but the premature EndFlush will do no harm now
// that we are idle.
m_pReader->BeginFlush();
CleanupCancelled();
m_pReader->EndFlush();
}
}
HRESULT
CPullPin::QueueSample(
__inout REFERENCE_TIME& tCurrent,
REFERENCE_TIME tAlignStop,
BOOL bDiscontinuity
)
{
IMediaSample* pSample;
HRESULT hr = m_pAlloc->GetBuffer(&pSample, NULL, NULL, 0);
if (FAILED(hr)) {
return hr;
}
LONGLONG tStopThis = tCurrent + (pSample->GetSize() * UNITS);
if (tStopThis > tAlignStop) {
tStopThis = tAlignStop;
}
pSample->SetTime(&tCurrent, &tStopThis);
tCurrent = tStopThis;
pSample->SetDiscontinuity(bDiscontinuity);
hr = m_pReader->Request(
pSample,
0);
if (FAILED(hr)) {
pSample->Release();
CleanupCancelled();
OnError(hr);
}
return hr;
}
HRESULT
CPullPin::CollectAndDeliver(
REFERENCE_TIME tStart,
REFERENCE_TIME tStop)
{
IMediaSample* pSample = NULL; // better be sure pSample is set
DWORD_PTR dwUnused;
HRESULT hr = m_pReader->WaitForNext(
INFINITE,
&pSample,
&dwUnused);
if (FAILED(hr)) {
if (pSample) {
pSample->Release();
}
} else {
hr = DeliverSample(pSample, tStart, tStop);
}
if (FAILED(hr)) {
CleanupCancelled();
OnError(hr);
}
return hr;
}
HRESULT
CPullPin::DeliverSample(
IMediaSample* pSample,
REFERENCE_TIME tStart,
REFERENCE_TIME tStop
)
{
// fix up sample if past actual stop (for sector alignment)
REFERENCE_TIME t1, t2;
if (S_OK == pSample->GetTime(&t1, &t2)) {
if (t2 > tStop) {
t2 = tStop;
}
// adjust times to be relative to (aligned) start time
t1 -= tStart;
t2 -= tStart;
HRESULT hr = pSample->SetTime(&t1, &t2);
if (FAILED(hr)) {
return hr;
}
}
#ifdef DXMPERF
{
AM_MEDIA_TYPE * pmt = NULL;
pSample->GetMediaType( &pmt );
PERFLOG_RECEIVE( L"CPullPin", m_pReader, this, pSample, pmt );
}
#endif
HRESULT hr = Receive(pSample);
pSample->Release();
return hr;
}
void
CPullPin::Process(void)
{
// is there anything to do?
if (m_tStop <= m_tStart) {
EndOfStream();
return;
}
BOOL bDiscontinuity = TRUE;
// if there is more than one sample at the allocator,
// then try to queue 2 at once in order to overlap.
// -- get buffer count and required alignment
ALLOCATOR_PROPERTIES Actual;
HRESULT hr = m_pAlloc->GetProperties(&Actual);
// align the start position downwards
REFERENCE_TIME tStart = AlignDown(m_tStart / UNITS, Actual.cbAlign) * UNITS;
REFERENCE_TIME tCurrent = tStart;
REFERENCE_TIME tStop = m_tStop;
if (tStop > m_tDuration) {
tStop = m_tDuration;
}
// align the stop position - may be past stop, but that
// doesn't matter
REFERENCE_TIME tAlignStop = AlignUp(tStop / UNITS, Actual.cbAlign) * UNITS;
DWORD dwRequest;
if (!m_bSync) {
// Break out of the loop either if we get to the end or we're asked
// to do something else
while (tCurrent < tAlignStop) {
// Break out without calling EndOfStream if we're asked to
// do something different
if (CheckRequest(&dwRequest)) {
return;
}
// queue a first sample
if (Actual.cBuffers > 1) {
hr = QueueSample(tCurrent, tAlignStop, TRUE);
bDiscontinuity = FALSE;
if (FAILED(hr)) {
return;
}
}
// loop queueing second and waiting for first..
while (tCurrent < tAlignStop) {
hr = QueueSample(tCurrent, tAlignStop, bDiscontinuity);
bDiscontinuity = FALSE;
if (FAILED(hr)) {
return;
}
hr = CollectAndDeliver(tStart, tStop);
if (S_OK != hr) {
// stop if error, or if downstream filter said
// to stop.
return;
}
}
if (Actual.cBuffers > 1) {
hr = CollectAndDeliver(tStart, tStop);
if (FAILED(hr)) {
return;
}
}
}
} else {
// sync version of above loop
while (tCurrent < tAlignStop) {
// Break out without calling EndOfStream if we're asked to
// do something different
if (CheckRequest(&dwRequest)) {
return;
}
IMediaSample* pSample;
hr = m_pAlloc->GetBuffer(&pSample, NULL, NULL, 0);
if (FAILED(hr)) {
OnError(hr);
return;
}
LONGLONG tStopThis = tCurrent + (pSample->GetSize() * UNITS);
if (tStopThis > tAlignStop) {
tStopThis = tAlignStop;
}
pSample->SetTime(&tCurrent, &tStopThis);
tCurrent = tStopThis;
if (bDiscontinuity) {
pSample->SetDiscontinuity(TRUE);
bDiscontinuity = FALSE;
}
hr = m_pReader->SyncReadAligned(pSample);
if (FAILED(hr)) {
pSample->Release();
OnError(hr);
return;
}
hr = DeliverSample(pSample, tStart, tStop);
if (hr != S_OK) {
if (FAILED(hr)) {
OnError(hr);
}
return;
}
}
}
EndOfStream();
}
// after a flush, cancelled i/o will be waiting for collection
// and release
void
CPullPin::CleanupCancelled(void)
{
while (1) {
IMediaSample * pSample;
DWORD_PTR dwUnused;
HRESULT hr = m_pReader->WaitForNext(
0, // no wait
&pSample,
&dwUnused);
if(pSample) {
pSample->Release();
} else {
// no more samples
return;
}
}
}

View File

@@ -1,152 +0,0 @@
//------------------------------------------------------------------------------
// File: PullPin.h
//
// Desc: DirectShow base classes - defines CPullPin class.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __PULLPIN_H__
#define __PULLPIN_H__
//
// CPullPin
//
// object supporting pulling data from an IAsyncReader interface.
// Given a start/stop position, calls a pure Receive method with each
// IMediaSample received.
//
// This is essentially for use in a MemInputPin when it finds itself
// connected to an IAsyncReader pin instead of a pushing pin.
//
class CPullPin : public CAMThread
{
IAsyncReader* m_pReader;
REFERENCE_TIME m_tStart;
REFERENCE_TIME m_tStop;
REFERENCE_TIME m_tDuration;
BOOL m_bSync;
enum ThreadMsg {
TM_Pause, // stop pulling and wait for next message
TM_Start, // start pulling
TM_Exit, // stop and exit
};
ThreadMsg m_State;
// override pure thread proc from CAMThread
DWORD ThreadProc(void);
// running pull method (check m_bSync)
void Process(void);
// clean up any cancelled i/o after a flush
void CleanupCancelled(void);
// suspend thread from pulling, eg during seek
HRESULT PauseThread();
// start thread pulling - create thread if necy
HRESULT StartThread();
// stop and close thread
HRESULT StopThread();
// called from ProcessAsync to queue and collect requests
HRESULT QueueSample(
__inout REFERENCE_TIME& tCurrent,
REFERENCE_TIME tAlignStop,
BOOL bDiscontinuity);
HRESULT CollectAndDeliver(
REFERENCE_TIME tStart,
REFERENCE_TIME tStop);
HRESULT DeliverSample(
IMediaSample* pSample,
REFERENCE_TIME tStart,
REFERENCE_TIME tStop);
protected:
IMemAllocator * m_pAlloc;
public:
CPullPin();
virtual ~CPullPin();
// returns S_OK if successfully connected to an IAsyncReader interface
// from this object
// Optional allocator should be proposed as a preferred allocator if
// necessary
// bSync is TRUE if we are to use sync reads instead of the
// async methods.
HRESULT Connect(IUnknown* pUnk, IMemAllocator* pAlloc, BOOL bSync);
// disconnect any connection made in Connect
HRESULT Disconnect();
// agree an allocator using RequestAllocator - optional
// props param specifies your requirements (non-zero fields).
// returns an error code if fail to match requirements.
// optional IMemAllocator interface is offered as a preferred allocator
// but no error occurs if it can't be met.
virtual HRESULT DecideAllocator(
IMemAllocator* pAlloc,
__inout_opt ALLOCATOR_PROPERTIES * pProps);
// set start and stop position. if active, will start immediately at
// the new position. Default is 0 to duration
HRESULT Seek(REFERENCE_TIME tStart, REFERENCE_TIME tStop);
// return the total duration
HRESULT Duration(__out REFERENCE_TIME* ptDuration);
// start pulling data
HRESULT Active(void);
// stop pulling data
HRESULT Inactive(void);
// helper functions
LONGLONG AlignDown(LONGLONG ll, LONG lAlign) {
// aligning downwards is just truncation
return ll & ~(lAlign-1);
};
LONGLONG AlignUp(LONGLONG ll, LONG lAlign) {
// align up: round up to next boundary
return (ll + (lAlign -1)) & ~(lAlign -1);
};
// GetReader returns the (addrefed) IAsyncReader interface
// for SyncRead etc
IAsyncReader* GetReader() {
m_pReader->AddRef();
return m_pReader;
};
// -- pure --
// override this to handle data arrival
// return value other than S_OK will stop data
virtual HRESULT Receive(IMediaSample*) PURE;
// override this to handle end-of-stream
virtual HRESULT EndOfStream(void) PURE;
// called on runtime errors that will have caused pulling
// to stop
// these errors are all returned from the upstream filter, who
// will have already reported any errors to the filtergraph.
virtual void OnError(HRESULT hr) PURE;
// flush this pin and all downstream
virtual HRESULT BeginFlush() PURE;
virtual HRESULT EndFlush() PURE;
};
#endif //__PULLPIN_H__

View File

@@ -1,402 +0,0 @@
//------------------------------------------------------------------------------
// File: RefClock.cpp
//
// Desc: DirectShow base classes - implements the IReferenceClock interface.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include <limits.h>
#ifdef DXMPERF
#include "dxmperf.h"
#endif // DXMPERF
// 'this' used in constructor list
#pragma warning(disable:4355)
STDMETHODIMP CBaseReferenceClock::NonDelegatingQueryInterface(
REFIID riid,
__deref_out void ** ppv)
{
HRESULT hr;
if (riid == IID_IReferenceClock)
{
hr = GetInterface((IReferenceClock *) this, ppv);
}
else if (riid == IID_IReferenceClockTimerControl)
{
hr = GetInterface((IReferenceClockTimerControl *) this, ppv);
}
else
{
hr = CUnknown::NonDelegatingQueryInterface(riid, ppv);
}
return hr;
}
CBaseReferenceClock::~CBaseReferenceClock()
{
#ifdef DXMPERF
PERFLOG_DTOR( L"CBaseReferenceClock", (IReferenceClock *) this );
#endif // DXMPERF
if (m_TimerResolution) timeEndPeriod(m_TimerResolution);
if (m_pSchedule)
{
m_pSchedule->DumpLinkedList();
}
if (m_hThread)
{
m_bAbort = TRUE;
TriggerThread();
WaitForSingleObject( m_hThread, INFINITE );
EXECUTE_ASSERT( CloseHandle(m_hThread) );
m_hThread = 0;
EXECUTE_ASSERT( CloseHandle(m_pSchedule->GetEvent()) );
delete m_pSchedule;
}
}
// A derived class may supply a hThreadEvent if it has its own thread that will take care
// of calling the schedulers Advise method. (Refere to CBaseReferenceClock::AdviseThread()
// to see what such a thread has to do.)
CBaseReferenceClock::CBaseReferenceClock( __in_opt LPCTSTR pName,
__inout_opt LPUNKNOWN pUnk,
__inout HRESULT *phr,
__inout_opt CAMSchedule * pShed )
: CUnknown( pName, pUnk )
, m_rtLastGotTime(0)
, m_TimerResolution(0)
, m_bAbort( FALSE )
, m_pSchedule( pShed ? pShed : new CAMSchedule(CreateEvent(NULL, FALSE, FALSE, NULL)) )
, m_hThread(0)
{
#ifdef DXMPERF
PERFLOG_CTOR( pName ? pName : L"CBaseReferenceClock", (IReferenceClock *) this );
#endif // DXMPERF
ASSERT(m_pSchedule);
if (!m_pSchedule)
{
*phr = E_OUTOFMEMORY;
}
else
{
// Set up the highest resolution timer we can manage
TIMECAPS tc;
m_TimerResolution = (TIMERR_NOERROR == timeGetDevCaps(&tc, sizeof(tc)))
? tc.wPeriodMin
: 1;
timeBeginPeriod(m_TimerResolution);
/* Initialise our system times - the derived clock should set the right values */
m_dwPrevSystemTime = timeGetTime();
m_rtPrivateTime = (UNITS / MILLISECONDS) * m_dwPrevSystemTime;
#ifdef PERF
m_idGetSystemTime = MSR_REGISTER(TEXT("CBaseReferenceClock::GetTime"));
#endif
if ( !pShed )
{
DWORD ThreadID;
m_hThread = ::CreateThread(NULL, // Security attributes
(DWORD) 0, // Initial stack size
AdviseThreadFunction, // Thread start address
(LPVOID) this, // Thread parameter
(DWORD) 0, // Creation flags
&ThreadID); // Thread identifier
if (m_hThread)
{
SetThreadPriority( m_hThread, THREAD_PRIORITY_TIME_CRITICAL );
}
else
{
*phr = E_FAIL;
EXECUTE_ASSERT( CloseHandle(m_pSchedule->GetEvent()) );
delete m_pSchedule;
m_pSchedule = NULL;
}
}
}
}
void CBaseReferenceClock::Restart (IN REFERENCE_TIME rtMinTime)
{
Lock();
m_rtLastGotTime = rtMinTime ;
Unlock();
}
STDMETHODIMP CBaseReferenceClock::GetTime(__out REFERENCE_TIME *pTime)
{
HRESULT hr;
if (pTime)
{
REFERENCE_TIME rtNow;
Lock();
rtNow = GetPrivateTime();
if (rtNow > m_rtLastGotTime)
{
m_rtLastGotTime = rtNow;
hr = S_OK;
}
else
{
hr = S_FALSE;
}
*pTime = m_rtLastGotTime;
Unlock();
MSR_INTEGER(m_idGetSystemTime, LONG((*pTime) / (UNITS/MILLISECONDS)) );
#ifdef DXMPERF
PERFLOG_GETTIME( (IReferenceClock *) this, *pTime );
#endif // DXMPERF
}
else hr = E_POINTER;
return hr;
}
/* Ask for an async notification that a time has elapsed */
STDMETHODIMP CBaseReferenceClock::AdviseTime(
REFERENCE_TIME baseTime, // base reference time
REFERENCE_TIME streamTime, // stream offset time
HEVENT hEvent, // advise via this event
__out DWORD_PTR *pdwAdviseCookie)// where your cookie goes
{
CheckPointer(pdwAdviseCookie, E_POINTER);
*pdwAdviseCookie = 0;
// Check that the event is not already set
ASSERT(WAIT_TIMEOUT == WaitForSingleObject(HANDLE(hEvent),0));
HRESULT hr;
const REFERENCE_TIME lRefTime = baseTime + streamTime;
if ( lRefTime <= 0 || lRefTime == MAX_TIME )
{
hr = E_INVALIDARG;
}
else
{
*pdwAdviseCookie = m_pSchedule->AddAdvisePacket( lRefTime, 0, HANDLE(hEvent), FALSE );
hr = *pdwAdviseCookie ? NOERROR : E_OUTOFMEMORY;
}
return hr;
}
/* Ask for an asynchronous periodic notification that a time has elapsed */
STDMETHODIMP CBaseReferenceClock::AdvisePeriodic(
REFERENCE_TIME StartTime, // starting at this time
REFERENCE_TIME PeriodTime, // time between notifications
HSEMAPHORE hSemaphore, // advise via a semaphore
__out DWORD_PTR *pdwAdviseCookie) // where your cookie goes
{
CheckPointer(pdwAdviseCookie, E_POINTER);
*pdwAdviseCookie = 0;
HRESULT hr;
if (StartTime > 0 && PeriodTime > 0 && StartTime != MAX_TIME )
{
*pdwAdviseCookie = m_pSchedule->AddAdvisePacket( StartTime, PeriodTime, HANDLE(hSemaphore), TRUE );
hr = *pdwAdviseCookie ? NOERROR : E_OUTOFMEMORY;
}
else hr = E_INVALIDARG;
return hr;
}
STDMETHODIMP CBaseReferenceClock::Unadvise(DWORD_PTR dwAdviseCookie)
{
return m_pSchedule->Unadvise(dwAdviseCookie);
}
REFERENCE_TIME CBaseReferenceClock::GetPrivateTime()
{
CAutoLock cObjectLock(this);
/* If the clock has wrapped then the current time will be less than
* the last time we were notified so add on the extra milliseconds
*
* The time period is long enough so that the likelihood of
* successive calls spanning the clock cycle is not considered.
*/
DWORD dwTime = timeGetTime();
{
m_rtPrivateTime += Int32x32To64(UNITS / MILLISECONDS, (DWORD)(dwTime - m_dwPrevSystemTime));
m_dwPrevSystemTime = dwTime;
}
return m_rtPrivateTime;
}
/* Adjust the current time by the input value. This allows an
external time source to work out some of the latency of the clock
system and adjust the "current" time accordingly. The intent is
that the time returned to the user is synchronised to a clock
source and allows drift to be catered for.
For example: if the clock source detects a drift it can pass a delta
to the current time rather than having to set an explicit time.
*/
STDMETHODIMP CBaseReferenceClock::SetTimeDelta(const REFERENCE_TIME & TimeDelta)
{
#ifdef DEBUG
// Just break if passed an improper time delta value
LONGLONG llDelta = TimeDelta > 0 ? TimeDelta : -TimeDelta;
if (llDelta > UNITS * 1000) {
DbgLog((LOG_TRACE, 0, TEXT("Bad Time Delta")));
//DebugBreak();
}
// We're going to calculate a "severity" for the time change. Max -1
// min 8. We'll then use this as the debug logging level for a
// debug log message.
const LONG usDelta = LONG(TimeDelta/10); // Delta in micro-secs
DWORD delta = abs(usDelta); // varying delta
// Severity == 8 - ceil(log<base 8>(abs( micro-secs delta)))
int Severity = 8;
while ( delta > 0 )
{
delta >>= 3; // div 8
Severity--;
}
// Sev == 0 => > 2 second delta!
DbgLog((LOG_TIMING, Severity < 0 ? 0 : Severity,
TEXT("Sev %2i: CSystemClock::SetTimeDelta(%8ld us) %lu -> %lu ms."),
Severity, usDelta, DWORD(ConvertToMilliseconds(m_rtPrivateTime)),
DWORD(ConvertToMilliseconds(TimeDelta+m_rtPrivateTime)) ));
// Don't want the DbgBreak to fire when running stress on debug-builds.
#ifdef BREAK_ON_SEVERE_TIME_DELTA
if (Severity < 0)
DbgBreakPoint(TEXT("SetTimeDelta > 16 seconds!"),
TEXT(__FILE__),__LINE__);
#endif
#endif
CAutoLock cObjectLock(this);
m_rtPrivateTime += TimeDelta;
// If time goes forwards, and we have advises, then we need to
// trigger the thread so that it can re-evaluate its wait time.
// Since we don't want the cost of the thread switches if the change
// is really small, only do it if clock goes forward by more than
// 0.5 millisecond. If the time goes backwards, the thread will
// wake up "early" (relativly speaking) and will re-evaluate at
// that time.
if ( TimeDelta > 5000 && m_pSchedule->GetAdviseCount() > 0 ) TriggerThread();
return NOERROR;
}
// Thread stuff
DWORD __stdcall CBaseReferenceClock::AdviseThreadFunction(__in LPVOID p)
{
return DWORD(reinterpret_cast<CBaseReferenceClock*>(p)->AdviseThread());
}
HRESULT CBaseReferenceClock::AdviseThread()
{
DWORD dwWait = INFINITE;
// The first thing we do is wait until something interesting happens
// (meaning a first advise or shutdown). This prevents us calling
// GetPrivateTime immediately which is goodness as that is a virtual
// routine and the derived class may not yet be constructed. (This
// thread is created in the base class constructor.)
while ( !m_bAbort )
{
// Wait for an interesting event to happen
DbgLog((LOG_TIMING, 3, TEXT("CBaseRefClock::AdviseThread() Delay: %lu ms"), dwWait ));
WaitForSingleObject(m_pSchedule->GetEvent(), dwWait);
if (m_bAbort) break;
// There are several reasons why we need to work from the internal
// time, mainly to do with what happens when time goes backwards.
// Mainly, it stop us looping madly if an event is just about to
// expire when the clock goes backward (i.e. GetTime stop for a
// while).
const REFERENCE_TIME rtNow = GetPrivateTime();
DbgLog((LOG_TIMING, 3,
TEXT("CBaseRefClock::AdviseThread() Woke at = %lu ms"),
ConvertToMilliseconds(rtNow) ));
// We must add in a millisecond, since this is the resolution of our
// WaitForSingleObject timer. Failure to do so will cause us to loop
// franticly for (approx) 1 a millisecond.
m_rtNextAdvise = m_pSchedule->Advise( 10000 + rtNow );
LONGLONG llWait = m_rtNextAdvise - rtNow;
ASSERT( llWait > 0 );
llWait = ConvertToMilliseconds(llWait);
// DON'T replace this with a max!! (The type's of these things is VERY important)
dwWait = (llWait > REFERENCE_TIME(UINT_MAX)) ? UINT_MAX : DWORD(llWait);
};
return NOERROR;
}
HRESULT CBaseReferenceClock::SetDefaultTimerResolution(
REFERENCE_TIME timerResolution // in 100ns
)
{
CAutoLock cObjectLock(this);
if( 0 == timerResolution ) {
if( m_TimerResolution ) {
timeEndPeriod( m_TimerResolution );
m_TimerResolution = 0;
}
} else {
TIMECAPS tc;
DWORD dwMinResolution = (TIMERR_NOERROR == timeGetDevCaps(&tc, sizeof(tc)))
? tc.wPeriodMin
: 1;
DWORD dwResolution = max( dwMinResolution, DWORD(timerResolution / 10000) );
if( dwResolution != m_TimerResolution ) {
timeEndPeriod(m_TimerResolution);
m_TimerResolution = dwResolution;
timeBeginPeriod( m_TimerResolution );
}
}
return S_OK;
}
HRESULT CBaseReferenceClock::GetDefaultTimerResolution(
__out REFERENCE_TIME* pTimerResolution // in 100ns
)
{
if( !pTimerResolution ) {
return E_POINTER;
}
CAutoLock cObjectLock(this);
*pTimerResolution = m_TimerResolution * 10000;
return S_OK;
}

View File

@@ -1,184 +0,0 @@
//------------------------------------------------------------------------------
// File: RefClock.h
//
// Desc: DirectShow base classes - defines the IReferenceClock interface.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __BASEREFCLOCK__
#define __BASEREFCLOCK__
#include <Schedule.h>
const UINT RESOLUTION = 1; /* High resolution timer */
const INT ADVISE_CACHE = 4; /* Default cache size */
const LONGLONG MAX_TIME = 0x7FFFFFFFFFFFFFFF; /* Maximum LONGLONG value */
inline LONGLONG WINAPI ConvertToMilliseconds(const REFERENCE_TIME& RT)
{
/* This converts an arbitrary value representing a reference time
into a MILLISECONDS value for use in subsequent system calls */
return (RT / (UNITS / MILLISECONDS));
}
/* This class hierarchy will support an IReferenceClock interface so
that an audio card (or other externally driven clock) can update the
system wide clock that everyone uses.
The interface will be pretty thin with probably just one update method
This interface has not yet been defined.
*/
/* This abstract base class implements the IReferenceClock
* interface. Classes that actually provide clock signals (from
* whatever source) have to be derived from this class.
*
* The abstract class provides implementations for:
* CUnknown support
* locking support (CCritSec)
* client advise code (creates a thread)
*
* Question: what can we do about quality? Change the timer
* resolution to lower the system load? Up the priority of the
* timer thread to force more responsive signals?
*
* During class construction we create a worker thread that is destroyed during
* destuction. This thread executes a series of WaitForSingleObject calls,
* waking up when a command is given to the thread or the next wake up point
* is reached. The wakeup points are determined by clients making Advise
* calls.
*
* Each advise call defines a point in time when they wish to be notified. A
* periodic advise is a series of these such events. We maintain a list of
* advise links and calculate when the nearest event notification is due for.
* We then call WaitForSingleObject with a timeout equal to this time. The
* handle we wait on is used by the class to signal that something has changed
* and that we must reschedule the next event. This typically happens when
* someone comes in and asks for an advise link while we are waiting for an
* event to timeout.
*
* While we are modifying the list of advise requests we
* are protected from interference through a critical section. Clients are NOT
* advised through callbacks. One shot clients have an event set, while
* periodic clients have a semaphore released for each event notification. A
* semaphore allows a client to be kept up to date with the number of events
* actually triggered and be assured that they can't miss multiple events being
* set.
*
* Keeping track of advises is taken care of by the CAMSchedule class.
*/
class CBaseReferenceClock
: public CUnknown, public IReferenceClock, public CCritSec, public IReferenceClockTimerControl
{
protected:
virtual ~CBaseReferenceClock(); // Don't let me be created on the stack!
public:
CBaseReferenceClock(__in_opt LPCTSTR pName,
__inout_opt LPUNKNOWN pUnk,
__inout HRESULT *phr,
__inout_opt CAMSchedule * pSched = 0 );
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void ** ppv);
DECLARE_IUNKNOWN
/* IReferenceClock methods */
// Derived classes must implement GetPrivateTime(). All our GetTime
// does is call GetPrivateTime and then check so that time does not
// go backwards. A return code of S_FALSE implies that the internal
// clock has gone backwards and GetTime time has halted until internal
// time has caught up. (Don't know if this will be much use to folk,
// but it seems odd not to use the return code for something useful.)
STDMETHODIMP GetTime(__out REFERENCE_TIME *pTime);
// When this is called, it sets m_rtLastGotTime to the time it returns.
/* Provide standard mechanisms for scheduling events */
/* Ask for an async notification that a time has elapsed */
STDMETHODIMP AdviseTime(
REFERENCE_TIME baseTime, // base reference time
REFERENCE_TIME streamTime, // stream offset time
HEVENT hEvent, // advise via this event
__out DWORD_PTR *pdwAdviseCookie// where your cookie goes
);
/* Ask for an asynchronous periodic notification that a time has elapsed */
STDMETHODIMP AdvisePeriodic(
REFERENCE_TIME StartTime, // starting at this time
REFERENCE_TIME PeriodTime, // time between notifications
HSEMAPHORE hSemaphore, // advise via a semaphore
__out DWORD_PTR *pdwAdviseCookie// where your cookie goes
);
/* Cancel a request for notification(s) - if the notification was
* a one shot timer then this function doesn't need to be called
* as the advise is automatically cancelled, however it does no
* harm to explicitly cancel a one-shot advise. It is REQUIRED that
* clients call Unadvise to clear a Periodic advise setting.
*/
STDMETHODIMP Unadvise(DWORD_PTR dwAdviseCookie);
/* Methods for the benefit of derived classes or outer objects */
// GetPrivateTime() is the REAL clock. GetTime is just a cover for
// it. Derived classes will probably override this method but not
// GetTime() itself.
// The important point about GetPrivateTime() is it's allowed to go
// backwards. Our GetTime() will keep returning the LastGotTime
// until GetPrivateTime() catches up.
virtual REFERENCE_TIME GetPrivateTime();
/* Provide a method for correcting drift */
STDMETHODIMP SetTimeDelta( const REFERENCE_TIME& TimeDelta );
CAMSchedule * GetSchedule() const { return m_pSchedule; }
// IReferenceClockTimerControl methods
//
// Setting a default of 0 disables the default of 1ms
STDMETHODIMP SetDefaultTimerResolution(
REFERENCE_TIME timerResolution // in 100ns
);
STDMETHODIMP GetDefaultTimerResolution(
__out REFERENCE_TIME* pTimerResolution // in 100ns
);
private:
REFERENCE_TIME m_rtPrivateTime; // Current best estimate of time
DWORD m_dwPrevSystemTime; // Last vaule we got from timeGetTime
REFERENCE_TIME m_rtLastGotTime; // Last time returned by GetTime
REFERENCE_TIME m_rtNextAdvise; // Time of next advise
UINT m_TimerResolution;
#ifdef PERF
int m_idGetSystemTime;
#endif
// Thread stuff
public:
void TriggerThread() // Wakes thread up. Need to do this if
{ // time to next advise needs reevaluating.
EXECUTE_ASSERT(SetEvent(m_pSchedule->GetEvent()));
}
private:
BOOL m_bAbort; // Flag used for thread shutdown
HANDLE m_hThread; // Thread handle
HRESULT AdviseThread(); // Method in which the advise thread runs
static DWORD __stdcall AdviseThreadFunction(__in LPVOID); // Function used to get there
protected:
CAMSchedule * m_pSchedule;
void Restart (IN REFERENCE_TIME rtMinTime = 0I64) ;
};
#endif

View File

@@ -1,116 +0,0 @@
//------------------------------------------------------------------------------
// File: RefTime.h
//
// Desc: DirectShow base classes - defines CRefTime, a class that manages
// reference times.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// CRefTime
//
// Manage reference times.
// Shares same data layout as REFERENCE_TIME, but adds some (nonvirtual)
// functions providing simple comparison, conversion and arithmetic.
//
// A reference time (at the moment) is a unit of seconds represented in
// 100ns units as is used in the Win32 FILETIME structure. BUT the time
// a REFERENCE_TIME represents is NOT the time elapsed since 1/1/1601 it
// will either be stream time or reference time depending upon context
//
// This class provides simple arithmetic operations on reference times
//
// keep non-virtual otherwise the data layout will not be the same as
// REFERENCE_TIME
// -----
// note that you are safe to cast a CRefTime* to a REFERENCE_TIME*, but
// you will need to do so explicitly
// -----
#ifndef __REFTIME__
#define __REFTIME__
const LONGLONG MILLISECONDS = (1000); // 10 ^ 3
const LONGLONG NANOSECONDS = (1000000000); // 10 ^ 9
const LONGLONG UNITS = (NANOSECONDS / 100); // 10 ^ 7
/* Unfortunately an inline function here generates a call to __allmul
- even for constants!
*/
#define MILLISECONDS_TO_100NS_UNITS(lMs) \
Int32x32To64((lMs), (UNITS / MILLISECONDS))
class CRefTime
{
public:
// *MUST* be the only data member so that this class is exactly
// equivalent to a REFERENCE_TIME.
// Also, must be *no virtual functions*
REFERENCE_TIME m_time;
inline CRefTime()
{
// default to 0 time
m_time = 0;
};
inline CRefTime(LONG msecs)
{
m_time = MILLISECONDS_TO_100NS_UNITS(msecs);
};
inline CRefTime(REFERENCE_TIME rt)
{
m_time = rt;
};
inline operator REFERENCE_TIME() const
{
return m_time;
};
inline CRefTime& operator=(const CRefTime& rt)
{
m_time = rt.m_time;
return *this;
};
inline CRefTime& operator=(const LONGLONG ll)
{
m_time = ll;
return *this;
};
inline CRefTime& operator+=(const CRefTime& rt)
{
return (*this = *this + rt);
};
inline CRefTime& operator-=(const CRefTime& rt)
{
return (*this = *this - rt);
};
inline LONG Millisecs(void)
{
return (LONG)(m_time / (UNITS / MILLISECONDS));
};
inline LONGLONG GetUnits(void)
{
return m_time;
};
};
const LONGLONG TimeZero = 0;
#endif /* __REFTIME__ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,478 +0,0 @@
//------------------------------------------------------------------------------
// File: RenBase.h
//
// Desc: DirectShow base classes - defines a generic ActiveX base renderer
// class.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __RENBASE__
#define __RENBASE__
// Forward class declarations
class CBaseRenderer;
class CBaseVideoRenderer;
class CRendererInputPin;
// This is our input pin class that channels calls to the renderer
class CRendererInputPin : public CBaseInputPin
{
protected:
CBaseRenderer *m_pRenderer;
public:
CRendererInputPin(__inout CBaseRenderer *pRenderer,
__inout HRESULT *phr,
__in_opt LPCWSTR Name);
// Overriden from the base pin classes
HRESULT BreakConnect();
HRESULT CompleteConnect(IPin *pReceivePin);
HRESULT SetMediaType(const CMediaType *pmt);
HRESULT CheckMediaType(const CMediaType *pmt);
HRESULT Active();
HRESULT Inactive();
// Add rendering behaviour to interface functions
STDMETHODIMP QueryId(__deref_out LPWSTR *Id);
STDMETHODIMP EndOfStream();
STDMETHODIMP BeginFlush();
STDMETHODIMP EndFlush();
STDMETHODIMP Receive(IMediaSample *pMediaSample);
// Helper
IMemAllocator inline *Allocator() const
{
return m_pAllocator;
}
};
// Main renderer class that handles synchronisation and state changes
class CBaseRenderer : public CBaseFilter
{
protected:
friend class CRendererInputPin;
friend void CALLBACK EndOfStreamTimer(UINT uID, // Timer identifier
UINT uMsg, // Not currently used
DWORD_PTR dwUser, // User information
DWORD_PTR dw1, // Windows reserved
DWORD_PTR dw2); // Is also reserved
CRendererPosPassThru *m_pPosition; // Media seeking pass by object
CAMEvent m_RenderEvent; // Used to signal timer events
CAMEvent m_ThreadSignal; // Signalled to release worker thread
CAMEvent m_evComplete; // Signalled when state complete
BOOL m_bAbort; // Stop us from rendering more data
BOOL m_bStreaming; // Are we currently streaming
DWORD_PTR m_dwAdvise; // Timer advise cookie
IMediaSample *m_pMediaSample; // Current image media sample
BOOL m_bEOS; // Any more samples in the stream
BOOL m_bEOSDelivered; // Have we delivered an EC_COMPLETE
CRendererInputPin *m_pInputPin; // Our renderer input pin object
CCritSec m_InterfaceLock; // Critical section for interfaces
CCritSec m_RendererLock; // Controls access to internals
IQualityControl * m_pQSink; // QualityControl sink
BOOL m_bRepaintStatus; // Can we signal an EC_REPAINT
// Avoid some deadlocks by tracking filter during stop
volatile BOOL m_bInReceive; // Inside Receive between PrepareReceive
// And actually processing the sample
REFERENCE_TIME m_SignalTime; // Time when we signal EC_COMPLETE
UINT m_EndOfStreamTimer; // Used to signal end of stream
CCritSec m_ObjectCreationLock; // This lock protects the creation and
// of m_pPosition and m_pInputPin. It
// ensures that two threads cannot create
// either object simultaneously.
public:
CBaseRenderer(REFCLSID RenderClass, // CLSID for this renderer
__in_opt LPCTSTR pName, // Debug ONLY description
__inout_opt LPUNKNOWN pUnk, // Aggregated owner object
__inout HRESULT *phr); // General OLE return code
~CBaseRenderer();
// Overriden to say what interfaces we support and where
virtual HRESULT GetMediaPositionInterface(REFIID riid, __deref_out void **ppv);
STDMETHODIMP NonDelegatingQueryInterface(REFIID, __deref_out void **);
virtual HRESULT SourceThreadCanWait(BOOL bCanWait);
#ifdef DEBUG
// Debug only dump of the renderer state
void DisplayRendererState();
#endif
virtual HRESULT WaitForRenderTime();
virtual HRESULT CompleteStateChange(FILTER_STATE OldState);
// Return internal information about this filter
BOOL IsEndOfStream() { return m_bEOS; };
BOOL IsEndOfStreamDelivered() { return m_bEOSDelivered; };
BOOL IsStreaming() { return m_bStreaming; };
void SetAbortSignal(BOOL bAbort) { m_bAbort = bAbort; };
virtual void OnReceiveFirstSample(IMediaSample *pMediaSample) { };
CAMEvent *GetRenderEvent() { return &m_RenderEvent; };
// Permit access to the transition state
void Ready() { m_evComplete.Set(); };
void NotReady() { m_evComplete.Reset(); };
BOOL CheckReady() { return m_evComplete.Check(); };
virtual int GetPinCount();
virtual CBasePin *GetPin(int n);
FILTER_STATE GetRealState();
void SendRepaint();
void SendNotifyWindow(IPin *pPin,HWND hwnd);
BOOL OnDisplayChange();
void SetRepaintStatus(BOOL bRepaint);
// Override the filter and pin interface functions
STDMETHODIMP Stop();
STDMETHODIMP Pause();
STDMETHODIMP Run(REFERENCE_TIME StartTime);
STDMETHODIMP GetState(DWORD dwMSecs, __out FILTER_STATE *State);
STDMETHODIMP FindPin(LPCWSTR Id, __deref_out IPin **ppPin);
// These are available for a quality management implementation
virtual void OnRenderStart(IMediaSample *pMediaSample);
virtual void OnRenderEnd(IMediaSample *pMediaSample);
virtual HRESULT OnStartStreaming() { return NOERROR; };
virtual HRESULT OnStopStreaming() { return NOERROR; };
virtual void OnWaitStart() { };
virtual void OnWaitEnd() { };
virtual void PrepareRender() { };
#ifdef PERF
REFERENCE_TIME m_trRenderStart; // Just before we started drawing
// Set in OnRenderStart, Used in OnRenderEnd
int m_idBaseStamp; // MSR_id for frame time stamp
int m_idBaseRenderTime; // MSR_id for true wait time
int m_idBaseAccuracy; // MSR_id for time frame is late (int)
#endif
// Quality management implementation for scheduling rendering
virtual BOOL ScheduleSample(IMediaSample *pMediaSample);
virtual HRESULT GetSampleTimes(IMediaSample *pMediaSample,
__out REFERENCE_TIME *pStartTime,
__out REFERENCE_TIME *pEndTime);
virtual HRESULT ShouldDrawSampleNow(IMediaSample *pMediaSample,
__out REFERENCE_TIME *ptrStart,
__out REFERENCE_TIME *ptrEnd);
// Lots of end of stream complexities
void TimerCallback();
void ResetEndOfStreamTimer();
HRESULT NotifyEndOfStream();
virtual HRESULT SendEndOfStream();
virtual HRESULT ResetEndOfStream();
virtual HRESULT EndOfStream();
// Rendering is based around the clock
void SignalTimerFired();
virtual HRESULT CancelNotification();
virtual HRESULT ClearPendingSample();
// Called when the filter changes state
virtual HRESULT Active();
virtual HRESULT Inactive();
virtual HRESULT StartStreaming();
virtual HRESULT StopStreaming();
virtual HRESULT BeginFlush();
virtual HRESULT EndFlush();
// Deal with connections and type changes
virtual HRESULT BreakConnect();
virtual HRESULT SetMediaType(const CMediaType *pmt);
virtual HRESULT CompleteConnect(IPin *pReceivePin);
// These look after the handling of data samples
virtual HRESULT PrepareReceive(IMediaSample *pMediaSample);
virtual HRESULT Receive(IMediaSample *pMediaSample);
virtual BOOL HaveCurrentSample();
virtual IMediaSample *GetCurrentSample();
virtual HRESULT Render(IMediaSample *pMediaSample);
// Derived classes MUST override these
virtual HRESULT DoRenderSample(IMediaSample *pMediaSample) PURE;
virtual HRESULT CheckMediaType(const CMediaType *) PURE;
// Helper
void WaitForReceiveToComplete();
};
// CBaseVideoRenderer is a renderer class (see its ancestor class) and
// it handles scheduling of media samples so that they are drawn at the
// correct time by the reference clock. It implements a degradation
// strategy. Possible degradation modes are:
// Drop frames here (only useful if the drawing takes significant time)
// Signal supplier (upstream) to drop some frame(s) - i.e. one-off skip.
// Signal supplier to change the frame rate - i.e. ongoing skipping.
// Or any combination of the above.
// In order to determine what's useful to try we need to know what's going
// on. This is done by timing various operations (including the supplier).
// This timing is done by using timeGetTime as it is accurate enough and
// usually cheaper than calling the reference clock. It also tells the
// truth if there is an audio break and the reference clock stops.
// We provide a number of public entry points (named OnXxxStart, OnXxxEnd)
// which the rest of the renderer calls at significant moments. These do
// the timing.
// the number of frames that the sliding averages are averaged over.
// the rule is (1024*NewObservation + (AVGPERIOD-1) * PreviousAverage)/AVGPERIOD
#define AVGPERIOD 4
#define DO_MOVING_AVG(avg,obs) (avg = (1024*obs + (AVGPERIOD-1)*avg)/AVGPERIOD)
// Spot the bug in this macro - I can't. but it doesn't work!
class CBaseVideoRenderer : public CBaseRenderer, // Base renderer class
public IQualProp, // Property page guff
public IQualityControl // Allow throttling
{
protected:
// Hungarian:
// tFoo is the time Foo in mSec (beware m_tStart from filter.h)
// trBar is the time Bar by the reference clock
//******************************************************************
// State variables to control synchronisation
//******************************************************************
// Control of sending Quality messages. We need to know whether
// we are in trouble (e.g. frames being dropped) and where the time
// is being spent.
// When we drop a frame we play the next one early.
// The frame after that is likely to wait before drawing and counting this
// wait as spare time is unfair, so we count it as a zero wait.
// We therefore need to know whether we are playing frames early or not.
int m_nNormal; // The number of consecutive frames
// drawn at their normal time (not early)
// -1 means we just dropped a frame.
#ifdef PERF
BOOL m_bDrawLateFrames; // Don't drop any frames (debug and I'm
// not keen on people using it!)
#endif
BOOL m_bSupplierHandlingQuality;// The response to Quality messages says
// our supplier is handling things.
// We will allow things to go extra late
// before dropping frames. We will play
// very early after he has dropped one.
// Control of scheduling, frame dropping etc.
// We need to know where the time is being spent so as to tell whether
// we should be taking action here, signalling supplier or what.
// The variables are initialised to a mode of NOT dropping frames.
// They will tell the truth after a few frames.
// We typically record a start time for an event, later we get the time
// again and subtract to get the elapsed time, and we average this over
// a few frames. The average is used to tell what mode we are in.
// Although these are reference times (64 bit) they are all DIFFERENCES
// between times which are small. An int will go up to 214 secs before
// overflow. Avoiding 64 bit multiplications and divisions seems
// worth while.
// Audio-video throttling. If the user has turned up audio quality
// very high (in principle it could be any other stream, not just audio)
// then we can receive cries for help via the graph manager. In this case
// we put in a wait for some time after rendering each frame.
int m_trThrottle;
// The time taken to render (i.e. BitBlt) frames controls which component
// needs to degrade. If the blt is expensive, the renderer degrades.
// If the blt is cheap it's done anyway and the supplier degrades.
int m_trRenderAvg; // Time frames are taking to blt
int m_trRenderLast; // Time for last frame blt
int m_tRenderStart; // Just before we started drawing (mSec)
// derived from timeGetTime.
// When frames are dropped we will play the next frame as early as we can.
// If it was a false alarm and the machine is fast we slide gently back to
// normal timing. To do this, we record the offset showing just how early
// we really are. This will normally be negative meaning early or zero.
int m_trEarliness;
// Target provides slow long-term feedback to try to reduce the
// average sync offset to zero. Whenever a frame is actually rendered
// early we add a msec or two, whenever late we take off a few.
// We add or take off 1/32 of the error time.
// Eventually we should be hovering around zero. For a really bad case
// where we were (say) 300mSec off, it might take 100 odd frames to
// settle down. The rate of change of this is intended to be slower
// than any other mechanism in Quartz, thereby avoiding hunting.
int m_trTarget;
// The proportion of time spent waiting for the right moment to blt
// controls whether we bother to drop a frame or whether we reckon that
// we're doing well enough that we can stand a one-frame glitch.
int m_trWaitAvg; // Average of last few wait times
// (actually we just average how early
// we were). Negative here means LATE.
// The average inter-frame time.
// This is used to calculate the proportion of the time used by the
// three operations (supplying us, waiting, rendering)
int m_trFrameAvg; // Average inter-frame time
int m_trDuration; // duration of last frame.
#ifdef PERF
// Performance logging identifiers
int m_idTimeStamp; // MSR_id for frame time stamp
int m_idEarliness; // MSR_id for earliness fudge
int m_idTarget; // MSR_id for Target fudge
int m_idWaitReal; // MSR_id for true wait time
int m_idWait; // MSR_id for wait time recorded
int m_idFrameAccuracy; // MSR_id for time frame is late (int)
int m_idRenderAvg; // MSR_id for Render time recorded (int)
int m_idSchLateTime; // MSR_id for lateness at scheduler
int m_idQualityRate; // MSR_id for Quality rate requested
int m_idQualityTime; // MSR_id for Quality time requested
int m_idDecision; // MSR_id for decision code
int m_idDuration; // MSR_id for duration of a frame
int m_idThrottle; // MSR_id for audio-video throttling
//int m_idDebug; // MSR_id for trace style debugging
//int m_idSendQuality; // MSR_id for timing the notifications per se
#endif // PERF
REFERENCE_TIME m_trRememberStampForPerf; // original time stamp of frame
// with no earliness fudges etc.
#ifdef PERF
REFERENCE_TIME m_trRememberFrameForPerf; // time when previous frame rendered
// debug...
int m_idFrameAvg;
int m_idWaitAvg;
#endif
// PROPERTY PAGE
// This has edit fields that show the user what's happening
// These member variables hold these counts.
int m_cFramesDropped; // cumulative frames dropped IN THE RENDERER
int m_cFramesDrawn; // Frames since streaming started seen BY THE
// RENDERER (some may be dropped upstream)
// Next two support average sync offset and standard deviation of sync offset.
LONGLONG m_iTotAcc; // Sum of accuracies in mSec
LONGLONG m_iSumSqAcc; // Sum of squares of (accuracies in mSec)
// Next two allow jitter calculation. Jitter is std deviation of frame time.
REFERENCE_TIME m_trLastDraw; // Time of prev frame (for inter-frame times)
LONGLONG m_iSumSqFrameTime; // Sum of squares of (inter-frame time in mSec)
LONGLONG m_iSumFrameTime; // Sum of inter-frame times in mSec
// To get performance statistics on frame rate, jitter etc, we need
// to record the lateness and inter-frame time. What we actually need are the
// data above (sum, sum of squares and number of entries for each) but the data
// is generated just ahead of time and only later do we discover whether the
// frame was actually drawn or not. So we have to hang on to the data
int m_trLate; // hold onto frame lateness
int m_trFrame; // hold onto inter-frame time
int m_tStreamingStart; // if streaming then time streaming started
// else time of last streaming session
// used for property page statistics
#ifdef PERF
LONGLONG m_llTimeOffset; // timeGetTime()*10000+m_llTimeOffset==ref time
#endif
public:
CBaseVideoRenderer(REFCLSID RenderClass, // CLSID for this renderer
__in_opt LPCTSTR pName, // Debug ONLY description
__inout_opt LPUNKNOWN pUnk, // Aggregated owner object
__inout HRESULT *phr); // General OLE return code
~CBaseVideoRenderer();
// IQualityControl methods - Notify allows audio-video throttling
STDMETHODIMP SetSink( IQualityControl * piqc);
STDMETHODIMP Notify( IBaseFilter * pSelf, Quality q);
// These provide a full video quality management implementation
void OnRenderStart(IMediaSample *pMediaSample);
void OnRenderEnd(IMediaSample *pMediaSample);
void OnWaitStart();
void OnWaitEnd();
HRESULT OnStartStreaming();
HRESULT OnStopStreaming();
void ThrottleWait();
// Handle the statistics gathering for our quality management
void PreparePerformanceData(int trLate, int trFrame);
virtual void RecordFrameLateness(int trLate, int trFrame);
virtual void OnDirectRender(IMediaSample *pMediaSample);
virtual HRESULT ResetStreamingTimes();
BOOL ScheduleSample(IMediaSample *pMediaSample);
HRESULT ShouldDrawSampleNow(IMediaSample *pMediaSample,
__inout REFERENCE_TIME *ptrStart,
__inout REFERENCE_TIME *ptrEnd);
virtual HRESULT SendQuality(REFERENCE_TIME trLate, REFERENCE_TIME trRealStream);
STDMETHODIMP JoinFilterGraph(__inout_opt IFilterGraph * pGraph, __in_opt LPCWSTR pName);
//
// Do estimates for standard deviations for per-frame
// statistics
//
// *piResult = (llSumSq - iTot * iTot / m_cFramesDrawn - 1) /
// (m_cFramesDrawn - 2)
// or 0 if m_cFramesDrawn <= 3
//
HRESULT GetStdDev(
int nSamples,
__out int *piResult,
LONGLONG llSumSq,
LONGLONG iTot
);
public:
// IQualProp property page support
STDMETHODIMP get_FramesDroppedInRenderer(__out int *cFramesDropped);
STDMETHODIMP get_FramesDrawn(__out int *pcFramesDrawn);
STDMETHODIMP get_AvgFrameRate(__out int *piAvgFrameRate);
STDMETHODIMP get_Jitter(__out int *piJitter);
STDMETHODIMP get_AvgSyncOffset(__out int *piAvg);
STDMETHODIMP get_DevSyncOffset(__out int *piDev);
// Implement an IUnknown interface and expose IQualProp
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid,__deref_out VOID **ppv);
};
#endif // __RENBASE__

View File

@@ -1,284 +0,0 @@
//------------------------------------------------------------------------------
// File: Schedule.cpp
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1996-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
// DbgLog values (all on LOG_TIMING):
//
// 2 for schedulting, firing and shunting of events
// 3 for wait delays and wake-up times of event thread
// 4 for details of whats on the list when the thread awakes
/* Construct & destructors */
CAMSchedule::CAMSchedule( HANDLE ev )
: CBaseObject(TEXT("CAMSchedule"))
, head(&z, 0), z(0, MAX_TIME)
, m_dwNextCookie(0), m_dwAdviseCount(0)
, m_pAdviseCache(0), m_dwCacheCount(0)
, m_ev( ev )
{
head.m_dwAdviseCookie = z.m_dwAdviseCookie = 0;
}
CAMSchedule::~CAMSchedule()
{
m_Serialize.Lock();
// Delete cache
CAdvisePacket * p = m_pAdviseCache;
while (p)
{
CAdvisePacket *const p_next = p->m_next;
delete p;
p = p_next;
}
ASSERT( m_dwAdviseCount == 0 );
// Better to be safe than sorry
if ( m_dwAdviseCount > 0 )
{
DumpLinkedList();
while ( !head.m_next->IsZ() )
{
head.DeleteNext();
--m_dwAdviseCount;
}
}
// If, in the debug version, we assert twice, it means, not only
// did we have left over advises, but we have also let m_dwAdviseCount
// get out of sync. with the number of advises actually on the list.
ASSERT( m_dwAdviseCount == 0 );
m_Serialize.Unlock();
}
/* Public methods */
DWORD CAMSchedule::GetAdviseCount()
{
// No need to lock, m_dwAdviseCount is 32bits & declared volatile
return m_dwAdviseCount;
}
REFERENCE_TIME CAMSchedule::GetNextAdviseTime()
{
CAutoLock lck(&m_Serialize); // Need to stop the linked list from changing
return head.m_next->m_rtEventTime;
}
DWORD_PTR CAMSchedule::AddAdvisePacket
( const REFERENCE_TIME & time1
, const REFERENCE_TIME & time2
, HANDLE h, BOOL periodic
)
{
// Since we use MAX_TIME as a sentry, we can't afford to
// schedule a notification at MAX_TIME
ASSERT( time1 < MAX_TIME );
DWORD_PTR Result;
CAdvisePacket * p;
m_Serialize.Lock();
if (m_pAdviseCache)
{
p = m_pAdviseCache;
m_pAdviseCache = p->m_next;
--m_dwCacheCount;
}
else
{
p = new CAdvisePacket();
}
if (p)
{
p->m_rtEventTime = time1; p->m_rtPeriod = time2;
p->m_hNotify = h; p->m_bPeriodic = periodic;
Result = AddAdvisePacket( p );
}
else Result = 0;
m_Serialize.Unlock();
return Result;
}
HRESULT CAMSchedule::Unadvise(DWORD_PTR dwAdviseCookie)
{
HRESULT hr = S_FALSE;
CAdvisePacket * p_prev = &head;
CAdvisePacket * p_n;
m_Serialize.Lock();
while ( p_n = p_prev->Next() ) // The Next() method returns NULL when it hits z
{
if ( p_n->m_dwAdviseCookie == dwAdviseCookie )
{
Delete( p_prev->RemoveNext() );
--m_dwAdviseCount;
hr = S_OK;
// Having found one cookie that matches, there should be no more
#ifdef DEBUG
while (p_n = p_prev->Next())
{
ASSERT(p_n->m_dwAdviseCookie != dwAdviseCookie);
p_prev = p_n;
}
#endif
break;
}
p_prev = p_n;
};
m_Serialize.Unlock();
return hr;
}
REFERENCE_TIME CAMSchedule::Advise( const REFERENCE_TIME & rtTime )
{
REFERENCE_TIME rtNextTime;
CAdvisePacket * pAdvise;
DbgLog((LOG_TIMING, 2,
TEXT("CAMSchedule::Advise( %lu ms )"), ULONG(rtTime / (UNITS / MILLISECONDS))));
CAutoLock lck(&m_Serialize);
#ifdef DEBUG
if (DbgCheckModuleLevel(LOG_TIMING, 4)) DumpLinkedList();
#endif
// Note - DON'T cache the difference, it might overflow
while ( rtTime >= (rtNextTime = (pAdvise=head.m_next)->m_rtEventTime) &&
!pAdvise->IsZ() )
{
ASSERT(pAdvise->m_dwAdviseCookie); // If this is zero, its the head or the tail!!
ASSERT(pAdvise->m_hNotify != INVALID_HANDLE_VALUE);
if (pAdvise->m_bPeriodic == TRUE)
{
ReleaseSemaphore(pAdvise->m_hNotify,1,NULL);
pAdvise->m_rtEventTime += pAdvise->m_rtPeriod;
ShuntHead();
}
else
{
ASSERT( pAdvise->m_bPeriodic == FALSE );
EXECUTE_ASSERT(SetEvent(pAdvise->m_hNotify));
--m_dwAdviseCount;
Delete( head.RemoveNext() );
}
}
DbgLog((LOG_TIMING, 3,
TEXT("CAMSchedule::Advise() Next time stamp: %lu ms, for advise %lu."),
DWORD(rtNextTime / (UNITS / MILLISECONDS)), pAdvise->m_dwAdviseCookie ));
return rtNextTime;
}
/* Private methods */
DWORD_PTR CAMSchedule::AddAdvisePacket( __inout CAdvisePacket * pPacket )
{
ASSERT(pPacket->m_rtEventTime >= 0 && pPacket->m_rtEventTime < MAX_TIME);
ASSERT(CritCheckIn(&m_Serialize));
CAdvisePacket * p_prev = &head;
CAdvisePacket * p_n;
const DWORD_PTR Result = pPacket->m_dwAdviseCookie = ++m_dwNextCookie;
// This relies on the fact that z is a sentry with a maximal m_rtEventTime
for(;;p_prev = p_n)
{
p_n = p_prev->m_next;
if ( p_n->m_rtEventTime >= pPacket->m_rtEventTime ) break;
}
p_prev->InsertAfter( pPacket );
++m_dwAdviseCount;
DbgLog((LOG_TIMING, 2, TEXT("Added advise %lu, for thread 0x%02X, scheduled at %lu"),
pPacket->m_dwAdviseCookie, GetCurrentThreadId(), (pPacket->m_rtEventTime / (UNITS / MILLISECONDS)) ));
// If packet added at the head, then clock needs to re-evaluate wait time.
if ( p_prev == &head ) SetEvent( m_ev );
return Result;
}
void CAMSchedule::Delete( __inout CAdvisePacket * pPacket )
{
if ( m_dwCacheCount >= dwCacheMax ) delete pPacket;
else
{
m_Serialize.Lock();
pPacket->m_next = m_pAdviseCache;
m_pAdviseCache = pPacket;
++m_dwCacheCount;
m_Serialize.Unlock();
}
}
// Takes the head of the list & repositions it
void CAMSchedule::ShuntHead()
{
CAdvisePacket * p_prev = &head;
CAdvisePacket * p_n;
m_Serialize.Lock();
CAdvisePacket *const pPacket = head.m_next;
// This will catch both an empty list,
// and if somehow a MAX_TIME time gets into the list
// (which would also break this method).
ASSERT( pPacket->m_rtEventTime < MAX_TIME );
// This relies on the fact that z is a sentry with a maximal m_rtEventTime
for(;;p_prev = p_n)
{
p_n = p_prev->m_next;
if ( p_n->m_rtEventTime > pPacket->m_rtEventTime ) break;
}
// If p_prev == pPacket then we're already in the right place
if (p_prev != pPacket)
{
head.m_next = pPacket->m_next;
(p_prev->m_next = pPacket)->m_next = p_n;
}
#ifdef DEBUG
DbgLog((LOG_TIMING, 2, TEXT("Periodic advise %lu, shunted to %lu"),
pPacket->m_dwAdviseCookie, (pPacket->m_rtEventTime / (UNITS / MILLISECONDS)) ));
#endif
m_Serialize.Unlock();
}
#ifdef DEBUG
void CAMSchedule::DumpLinkedList()
{
m_Serialize.Lock();
int i=0;
DbgLog((LOG_TIMING, 1, TEXT("CAMSchedule::DumpLinkedList() this = 0x%p"), this));
for ( CAdvisePacket * p = &head
; p
; p = p->m_next , i++
)
{
DbgLog((LOG_TIMING, 1, TEXT("Advise List # %lu, Cookie %d, RefTime %lu"),
i,
p->m_dwAdviseCookie,
p->m_rtEventTime / (UNITS / MILLISECONDS)
));
}
m_Serialize.Unlock();
}
#endif

View File

@@ -1,128 +0,0 @@
//------------------------------------------------------------------------------
// File: Schedule.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1996-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __CAMSchedule__
#define __CAMSchedule__
class CAMSchedule : private CBaseObject
{
public:
virtual ~CAMSchedule();
// ev is the event we should fire if the advise time needs re-evaluating
CAMSchedule( HANDLE ev );
DWORD GetAdviseCount();
REFERENCE_TIME GetNextAdviseTime();
// We need a method for derived classes to add advise packets, we return the cookie
DWORD_PTR AddAdvisePacket( const REFERENCE_TIME & time1, const REFERENCE_TIME & time2, HANDLE h, BOOL periodic );
// And a way to cancel
HRESULT Unadvise(DWORD_PTR dwAdviseCookie);
// Tell us the time please, and we'll dispatch the expired events. We return the time of the next event.
// NB: The time returned will be "useless" if you start adding extra Advises. But that's the problem of
// whoever is using this helper class (typically a clock).
REFERENCE_TIME Advise( const REFERENCE_TIME & rtTime );
// Get the event handle which will be set if advise time requires re-evaluation.
HANDLE GetEvent() const { return m_ev; }
private:
// We define the nodes that will be used in our singly linked list
// of advise packets. The list is ordered by time, with the
// elements that will expire first at the front.
class CAdvisePacket
{
public:
CAdvisePacket()
{}
CAdvisePacket * m_next;
DWORD_PTR m_dwAdviseCookie;
REFERENCE_TIME m_rtEventTime; // Time at which event should be set
REFERENCE_TIME m_rtPeriod; // Periodic time
HANDLE m_hNotify; // Handle to event or semephore
BOOL m_bPeriodic; // TRUE => Periodic event
CAdvisePacket( __inout_opt CAdvisePacket * next, LONGLONG time ) : m_next(next), m_rtEventTime(time)
{}
void InsertAfter( __inout CAdvisePacket * p )
{
p->m_next = m_next;
m_next = p;
}
int IsZ() const // That is, is it the node that represents the end of the list
{ return m_next == 0; }
CAdvisePacket * RemoveNext()
{
CAdvisePacket *const next = m_next;
CAdvisePacket *const new_next = next->m_next;
m_next = new_next;
return next;
}
void DeleteNext()
{
delete RemoveNext();
}
CAdvisePacket * Next() const
{
CAdvisePacket * result = m_next;
if (result->IsZ()) result = 0;
return result;
}
DWORD_PTR Cookie() const
{ return m_dwAdviseCookie; }
};
// Structure is:
// head -> elmt1 -> elmt2 -> z -> null
// So an empty list is: head -> z -> null
// Having head & z as links makes insertaion,
// deletion and shunting much easier.
CAdvisePacket head, z; // z is both a tail and a sentry
volatile DWORD_PTR m_dwNextCookie; // Strictly increasing
volatile DWORD m_dwAdviseCount; // Number of elements on list
CCritSec m_Serialize;
// AddAdvisePacket: adds the packet, returns the cookie (0 if failed)
DWORD_PTR AddAdvisePacket( __inout CAdvisePacket * pPacket );
// Event that we should set if the packed added above will be the next to fire.
const HANDLE m_ev;
// A Shunt is where we have changed the first element in the
// list and want it re-evaluating (i.e. repositioned) in
// the list.
void ShuntHead();
// Rather than delete advise packets, we cache them for future use
CAdvisePacket * m_pAdviseCache;
DWORD m_dwCacheCount;
enum { dwCacheMax = 5 }; // Don't bother caching more than five
void Delete( __inout CAdvisePacket * pLink );// This "Delete" will cache the Link
// Attributes and methods for debugging
public:
#ifdef DEBUG
void DumpLinkedList();
#else
void DumpLinkedList() {}
#endif
};
#endif // __CAMSchedule__

View File

@@ -1,83 +0,0 @@
//------------------------------------------------------------------------------
// File: SeekPT.cpp
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include "seekpt.h"
//==================================================================
// CreateInstance
// This goes in the factory template table to create new instances
// If there is already a mapper instance - return that, else make one
// and save it in a static variable so that forever after we can return that.
//==================================================================
CUnknown * CSeekingPassThru::CreateInstance(__inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr)
{
return new CSeekingPassThru(NAME("Seeking PassThru"),pUnk, phr);
}
STDMETHODIMP CSeekingPassThru::NonDelegatingQueryInterface(REFIID riid, __deref_out void ** ppv)
{
if (riid == IID_ISeekingPassThru) {
return GetInterface((ISeekingPassThru *) this, ppv);
} else {
if (m_pPosPassThru &&
(riid == IID_IMediaSeeking ||
riid == IID_IMediaPosition)) {
return m_pPosPassThru->NonDelegatingQueryInterface(riid,ppv);
} else {
return CUnknown::NonDelegatingQueryInterface(riid, ppv);
}
}
}
CSeekingPassThru::CSeekingPassThru( __in_opt LPCTSTR pName, __inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr )
: CUnknown(pName, pUnk, phr),
m_pPosPassThru(NULL)
{
}
CSeekingPassThru::~CSeekingPassThru()
{
delete m_pPosPassThru;
}
STDMETHODIMP CSeekingPassThru::Init(BOOL bRendererSeeking, IPin *pPin)
{
HRESULT hr = NOERROR;
if (m_pPosPassThru) {
hr = E_FAIL;
} else {
m_pPosPassThru =
bRendererSeeking ?
new CRendererPosPassThru(
NAME("Render Seeking COM object"),
(IUnknown *)this,
&hr,
pPin) :
new CPosPassThru(
NAME("Render Seeking COM object"),
(IUnknown *)this,
&hr,
pPin);
if (!m_pPosPassThru) {
hr = E_OUTOFMEMORY;
} else {
if (FAILED(hr)) {
delete m_pPosPassThru;
m_pPosPassThru = NULL;
}
}
}
return hr;
}

View File

@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// File: SeekPT.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __seekpt_h__
#define __seekpt_h__
class CSeekingPassThru : public ISeekingPassThru, public CUnknown
{
public:
static CUnknown *CreateInstance(__inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr);
CSeekingPassThru(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr);
~CSeekingPassThru();
DECLARE_IUNKNOWN;
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void ** ppv);
STDMETHODIMP Init(BOOL bSupportRendering, IPin *pPin);
private:
CPosPassThru *m_pPosPassThru;
};
#endif

View File

@@ -1,522 +0,0 @@
//------------------------------------------------------------------------------
// File: Source.cpp
//
// Desc: DirectShow base classes - implements CSource, which is a Quartz
// source filter 'template.'
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
// Locking Strategy.
//
// Hold the filter critical section (m_pFilter->pStateLock()) to serialise
// access to functions. Note that, in general, this lock may be held
// by a function when the worker thread may want to hold it. Therefore
// if you wish to access shared state from the worker thread you will
// need to add another critical section object. The execption is during
// the threads processing loop, when it is safe to get the filter critical
// section from within FillBuffer().
#include <streams.h>
//
// CSource::Constructor
//
// Initialise the pin count for the filter. The user will create the pins in
// the derived class.
CSource::CSource(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid)
: CBaseFilter(pName, lpunk, &m_cStateLock, clsid),
m_iPins(0),
m_paStreams(NULL)
{
}
CSource::CSource(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid, __inout HRESULT *phr)
: CBaseFilter(pName, lpunk, &m_cStateLock, clsid),
m_iPins(0),
m_paStreams(NULL)
{
UNREFERENCED_PARAMETER(phr);
}
#ifdef UNICODE
CSource::CSource(__in_opt LPCSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid)
: CBaseFilter(pName, lpunk, &m_cStateLock, clsid),
m_iPins(0),
m_paStreams(NULL)
{
}
CSource::CSource(__in_opt LPCSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid, __inout HRESULT *phr)
: CBaseFilter(pName, lpunk, &m_cStateLock, clsid),
m_iPins(0),
m_paStreams(NULL)
{
UNREFERENCED_PARAMETER(phr);
}
#endif
//
// CSource::Destructor
//
CSource::~CSource()
{
/* Free our pins and pin array */
while (m_iPins != 0) {
// deleting the pins causes them to be removed from the array...
delete m_paStreams[m_iPins - 1];
}
ASSERT(m_paStreams == NULL);
}
//
// Add a new pin
//
HRESULT CSource::AddPin(__in CSourceStream *pStream)
{
CAutoLock lock(&m_cStateLock);
/* Allocate space for this pin and the old ones */
CSourceStream **paStreams = new CSourceStream *[m_iPins + 1];
if (paStreams == NULL) {
return E_OUTOFMEMORY;
}
if (m_paStreams != NULL) {
CopyMemory((PVOID)paStreams, (PVOID)m_paStreams,
m_iPins * sizeof(m_paStreams[0]));
paStreams[m_iPins] = pStream;
delete [] m_paStreams;
}
m_paStreams = paStreams;
m_paStreams[m_iPins] = pStream;
m_iPins++;
return S_OK;
}
//
// Remove a pin - pStream is NOT deleted
//
HRESULT CSource::RemovePin(__in CSourceStream *pStream)
{
int i;
for (i = 0; i < m_iPins; i++) {
if (m_paStreams[i] == pStream) {
if (m_iPins == 1) {
delete [] m_paStreams;
m_paStreams = NULL;
} else {
/* no need to reallocate */
while (++i < m_iPins)
m_paStreams[i - 1] = m_paStreams[i];
}
m_iPins--;
return S_OK;
}
}
return S_FALSE;
}
//
// FindPin
//
// Set *ppPin to the IPin* that has the id Id.
// or to NULL if the Id cannot be matched.
STDMETHODIMP CSource::FindPin(LPCWSTR Id, __deref_out IPin **ppPin)
{
CheckPointer(ppPin,E_POINTER);
ValidateReadWritePtr(ppPin,sizeof(IPin *));
// The -1 undoes the +1 in QueryId and ensures that totally invalid
// strings (for which WstrToInt delivers 0) give a deliver a NULL pin.
int i = WstrToInt(Id) -1;
*ppPin = GetPin(i);
if (*ppPin!=NULL){
(*ppPin)->AddRef();
return NOERROR;
} else {
return VFW_E_NOT_FOUND;
}
}
//
// FindPinNumber
//
// return the number of the pin with this IPin* or -1 if none
int CSource::FindPinNumber(__in IPin *iPin) {
int i;
for (i=0; i<m_iPins; ++i) {
if ((IPin *)(m_paStreams[i])==iPin) {
return i;
}
}
return -1;
}
//
// GetPinCount
//
// Returns the number of pins this filter has
int CSource::GetPinCount(void) {
CAutoLock lock(&m_cStateLock);
return m_iPins;
}
//
// GetPin
//
// Return a non-addref'd pointer to pin n
// needed by CBaseFilter
CBasePin *CSource::GetPin(int n) {
CAutoLock lock(&m_cStateLock);
// n must be in the range 0..m_iPins-1
// if m_iPins>n && n>=0 it follows that m_iPins>0
// which is what used to be checked (i.e. checking that we have a pin)
if ((n >= 0) && (n < m_iPins)) {
ASSERT(m_paStreams[n]);
return m_paStreams[n];
}
return NULL;
}
//
// *
// * --- CSourceStream ----
// *
//
// Set Id to point to a CoTaskMemAlloc'd
STDMETHODIMP CSourceStream::QueryId(__deref_out LPWSTR *Id) {
CheckPointer(Id,E_POINTER);
ValidateReadWritePtr(Id,sizeof(LPWSTR));
// We give the pins id's which are 1,2,...
// FindPinNumber returns -1 for an invalid pin
int i = 1+ m_pFilter->FindPinNumber(this);
if (i<1) return VFW_E_NOT_FOUND;
*Id = (LPWSTR)CoTaskMemAlloc(sizeof(WCHAR) * 12);
if (*Id==NULL) {
return E_OUTOFMEMORY;
}
IntToWstr(i, *Id);
return NOERROR;
}
//
// CSourceStream::Constructor
//
// increments the number of pins present on the filter
CSourceStream::CSourceStream(
__in_opt LPCTSTR pObjectName,
__inout HRESULT *phr,
__inout CSource *ps,
__in_opt LPCWSTR pPinName)
: CBaseOutputPin(pObjectName, ps, ps->pStateLock(), phr, pPinName),
m_pFilter(ps) {
*phr = m_pFilter->AddPin(this);
}
#ifdef UNICODE
CSourceStream::CSourceStream(
__in_opt LPCSTR pObjectName,
__inout HRESULT *phr,
__inout CSource *ps,
__in_opt LPCWSTR pPinName)
: CBaseOutputPin(pObjectName, ps, ps->pStateLock(), phr, pPinName),
m_pFilter(ps) {
*phr = m_pFilter->AddPin(this);
}
#endif
//
// CSourceStream::Destructor
//
// Decrements the number of pins on this filter
CSourceStream::~CSourceStream(void) {
m_pFilter->RemovePin(this);
}
//
// CheckMediaType
//
// Do we support this type? Provides the default support for 1 type.
HRESULT CSourceStream::CheckMediaType(const CMediaType *pMediaType) {
CAutoLock lock(m_pFilter->pStateLock());
CMediaType mt;
GetMediaType(&mt);
if (mt == *pMediaType) {
return NOERROR;
}
return E_FAIL;
}
//
// GetMediaType/3
//
// By default we support only one type
// iPosition indexes are 0-n
HRESULT CSourceStream::GetMediaType(int iPosition, __inout CMediaType *pMediaType) {
CAutoLock lock(m_pFilter->pStateLock());
if (iPosition<0) {
return E_INVALIDARG;
}
if (iPosition>0) {
return VFW_S_NO_MORE_ITEMS;
}
return GetMediaType(pMediaType);
}
//
// Active
//
// The pin is active - start up the worker thread
HRESULT CSourceStream::Active(void) {
CAutoLock lock(m_pFilter->pStateLock());
HRESULT hr;
if (m_pFilter->IsActive()) {
return S_FALSE; // succeeded, but did not allocate resources (they already exist...)
}
// do nothing if not connected - its ok not to connect to
// all pins of a source filter
if (!IsConnected()) {
return NOERROR;
}
hr = CBaseOutputPin::Active();
if (FAILED(hr)) {
return hr;
}
ASSERT(!ThreadExists());
// start the thread
if (!Create()) {
return E_FAIL;
}
// Tell thread to initialize. If OnThreadCreate Fails, so does this.
hr = Init();
if (FAILED(hr))
return hr;
return Pause();
}
//
// Inactive
//
// Pin is inactive - shut down the worker thread
// Waits for the worker to exit before returning.
HRESULT CSourceStream::Inactive(void) {
CAutoLock lock(m_pFilter->pStateLock());
HRESULT hr;
// do nothing if not connected - its ok not to connect to
// all pins of a source filter
if (!IsConnected()) {
return NOERROR;
}
// !!! need to do this before trying to stop the thread, because
// we may be stuck waiting for our own allocator!!!
hr = CBaseOutputPin::Inactive(); // call this first to Decommit the allocator
if (FAILED(hr)) {
return hr;
}
if (ThreadExists()) {
hr = Stop();
if (FAILED(hr)) {
return hr;
}
hr = Exit();
if (FAILED(hr)) {
return hr;
}
Close(); // Wait for the thread to exit, then tidy up.
}
// hr = CBaseOutputPin::Inactive(); // call this first to Decommit the allocator
//if (FAILED(hr)) {
// return hr;
//}
return NOERROR;
}
//
// ThreadProc
//
// When this returns the thread exits
// Return codes > 0 indicate an error occured
DWORD CSourceStream::ThreadProc(void) {
HRESULT hr; // the return code from calls
Command com;
do {
com = GetRequest();
if (com != CMD_INIT) {
DbgLog((LOG_ERROR, 1, TEXT("Thread expected init command")));
Reply((DWORD) E_UNEXPECTED);
}
} while (com != CMD_INIT);
DbgLog((LOG_TRACE, 1, TEXT("CSourceStream worker thread initializing")));
hr = OnThreadCreate(); // perform set up tasks
if (FAILED(hr)) {
DbgLog((LOG_ERROR, 1, TEXT("CSourceStream::OnThreadCreate failed. Aborting thread.")));
OnThreadDestroy();
Reply(hr); // send failed return code from OnThreadCreate
return 1;
}
// Initialisation suceeded
Reply(NOERROR);
Command cmd;
do {
cmd = GetRequest();
switch (cmd) {
case CMD_EXIT:
Reply(NOERROR);
break;
case CMD_RUN:
DbgLog((LOG_ERROR, 1, TEXT("CMD_RUN received before a CMD_PAUSE???")));
// !!! fall through???
case CMD_PAUSE:
Reply(NOERROR);
DoBufferProcessingLoop();
break;
case CMD_STOP:
Reply(NOERROR);
break;
default:
DbgLog((LOG_ERROR, 1, TEXT("Unknown command %d received!"), cmd));
Reply((DWORD) E_NOTIMPL);
break;
}
} while (cmd != CMD_EXIT);
hr = OnThreadDestroy(); // tidy up.
if (FAILED(hr)) {
DbgLog((LOG_ERROR, 1, TEXT("CSourceStream::OnThreadDestroy failed. Exiting thread.")));
return 1;
}
DbgLog((LOG_TRACE, 1, TEXT("CSourceStream worker thread exiting")));
return 0;
}
//
// DoBufferProcessingLoop
//
// Grabs a buffer and calls the users processing function.
// Overridable, so that different delivery styles can be catered for.
HRESULT CSourceStream::DoBufferProcessingLoop(void) {
Command com;
OnThreadStartPlay();
do {
while (!CheckRequest(&com)) {
IMediaSample *pSample;
HRESULT hr = GetDeliveryBuffer(&pSample,NULL,NULL,0);
if (FAILED(hr)) {
Sleep(1);
continue; // go round again. Perhaps the error will go away
// or the allocator is decommited & we will be asked to
// exit soon.
}
// Virtual function user will override.
hr = FillBuffer(pSample);
if (hr == S_OK) {
hr = Deliver(pSample);
pSample->Release();
// downstream filter returns S_FALSE if it wants us to
// stop or an error if it's reporting an error.
if(hr != S_OK)
{
DbgLog((LOG_TRACE, 2, TEXT("Deliver() returned %08x; stopping"), hr));
return S_OK;
}
} else if (hr == S_FALSE) {
// derived class wants us to stop pushing data
pSample->Release();
DeliverEndOfStream();
return S_OK;
} else {
// derived class encountered an error
pSample->Release();
DbgLog((LOG_ERROR, 1, TEXT("Error %08lX from FillBuffer!!!"), hr));
DeliverEndOfStream();
m_pFilter->NotifyEvent(EC_ERRORABORT, hr, 0);
return hr;
}
// all paths release the sample
}
// For all commands sent to us there must be a Reply call!
if (com == CMD_RUN || com == CMD_PAUSE) {
Reply(NOERROR);
} else if (com != CMD_STOP) {
Reply((DWORD) E_UNEXPECTED);
DbgLog((LOG_ERROR, 1, TEXT("Unexpected command!!!")));
}
} while (com != CMD_STOP);
return S_FALSE;
}

View File

@@ -1,172 +0,0 @@
//------------------------------------------------------------------------------
// File: Source.h
//
// Desc: DirectShow base classes - defines classes to simplify creation of
// ActiveX source filters that support continuous generation of data.
// No support is provided for IMediaControl or IMediaPosition.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// Derive your source filter from CSource.
// During construction either:
// Create some CSourceStream objects to manage your pins
// Provide the user with a means of doing so eg, an IPersistFile interface.
//
// CSource provides:
// IBaseFilter interface management
// IMediaFilter interface management, via CBaseFilter
// Pin counting for CBaseFilter
//
// Derive a class from CSourceStream to manage your output pin types
// Implement GetMediaType/1 to return the type you support. If you support multiple
// types then overide GetMediaType/3, CheckMediaType and GetMediaTypeCount.
// Implement Fillbuffer() to put data into one buffer.
//
// CSourceStream provides:
// IPin management via CBaseOutputPin
// Worker thread management
#ifndef __CSOURCE__
#define __CSOURCE__
class CSourceStream; // The class that will handle each pin
//
// CSource
//
// Override construction to provide a means of creating
// CSourceStream derived objects - ie a way of creating pins.
class CSource : public CBaseFilter {
public:
CSource(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid, __inout HRESULT *phr);
CSource(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid);
#ifdef UNICODE
CSource(__in_opt LPCSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid, __inout HRESULT *phr);
CSource(__in_opt LPCSTR pName, __inout_opt LPUNKNOWN lpunk, CLSID clsid);
#endif
~CSource();
int GetPinCount(void);
CBasePin *GetPin(int n);
// -- Utilities --
CCritSec* pStateLock(void) { return &m_cStateLock; } // provide our critical section
HRESULT AddPin(__in CSourceStream *);
HRESULT RemovePin(__in CSourceStream *);
STDMETHODIMP FindPin(
LPCWSTR Id,
__deref_out IPin ** ppPin
);
int FindPinNumber(__in IPin *iPin);
protected:
int m_iPins; // The number of pins on this filter. Updated by CSourceStream
// constructors & destructors.
CSourceStream **m_paStreams; // the pins on this filter.
CCritSec m_cStateLock; // Lock this to serialize function accesses to the filter state
};
//
// CSourceStream
//
// Use this class to manage a stream of data that comes from a
// pin.
// Uses a worker thread to put data on the pin.
class CSourceStream : public CAMThread, public CBaseOutputPin {
public:
CSourceStream(__in_opt LPCTSTR pObjectName,
__inout HRESULT *phr,
__inout CSource *pms,
__in_opt LPCWSTR pName);
#ifdef UNICODE
CSourceStream(__in_opt LPCSTR pObjectName,
__inout HRESULT *phr,
__inout CSource *pms,
__in_opt LPCWSTR pName);
#endif
virtual ~CSourceStream(void); // virtual destructor ensures derived class destructors are called too.
protected:
CSource *m_pFilter; // The parent of this stream
// *
// * Data Source
// *
// * The following three functions: FillBuffer, OnThreadCreate/Destroy, are
// * called from within the ThreadProc. They are used in the creation of
// * the media samples this pin will provide
// *
// Override this to provide the worker thread a means
// of processing a buffer
virtual HRESULT FillBuffer(IMediaSample *pSamp) PURE;
// Called as the thread is created/destroyed - use to perform
// jobs such as start/stop streaming mode
// If OnThreadCreate returns an error the thread will exit.
virtual HRESULT OnThreadCreate(void) {return NOERROR;};
virtual HRESULT OnThreadDestroy(void) {return NOERROR;};
virtual HRESULT OnThreadStartPlay(void) {return NOERROR;};
// *
// * Worker Thread
// *
HRESULT Active(void); // Starts up the worker thread
HRESULT Inactive(void); // Exits the worker thread.
public:
// thread commands
enum Command {CMD_INIT, CMD_PAUSE, CMD_RUN, CMD_STOP, CMD_EXIT};
HRESULT Init(void) { return CallWorker(CMD_INIT); }
HRESULT Exit(void) { return CallWorker(CMD_EXIT); }
HRESULT Run(void) { return CallWorker(CMD_RUN); }
HRESULT Pause(void) { return CallWorker(CMD_PAUSE); }
HRESULT Stop(void) { return CallWorker(CMD_STOP); }
protected:
Command GetRequest(void) { return (Command) CAMThread::GetRequest(); }
BOOL CheckRequest(Command *pCom) { return CAMThread::CheckRequest( (DWORD *) pCom); }
// override these if you want to add thread commands
virtual DWORD ThreadProc(void); // the thread function
virtual HRESULT DoBufferProcessingLoop(void); // the loop executed whilst running
// *
// * AM_MEDIA_TYPE support
// *
// If you support more than one media type then override these 2 functions
virtual HRESULT CheckMediaType(const CMediaType *pMediaType);
virtual HRESULT GetMediaType(int iPosition, __inout CMediaType *pMediaType); // List pos. 0-n
// If you support only one type then override this fn.
// This will only be called by the default implementations
// of CheckMediaType and GetMediaType(int, CMediaType*)
// You must override this fn. or the above 2!
virtual HRESULT GetMediaType(__inout CMediaType *pMediaType) {return E_UNEXPECTED;}
STDMETHODIMP QueryId(
__deref_out LPWSTR * Id
);
};
#endif // __CSOURCE__

View File

@@ -1,197 +0,0 @@
//------------------------------------------------------------------------------
// File: Streams.h
//
// Desc: DirectShow base classes - defines overall streams architecture.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __STREAMS__
#define __STREAMS__
#ifdef _MSC_VER
// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable
#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter
#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union
#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated
#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated
#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed"
#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#endif // MSC_VER
// Because of differences between Visual C++ and older Microsoft SDKs,
// you may have defined _DEBUG without defining DEBUG. This logic
// ensures that both will be set if Visual C++ sets _DEBUG.
#ifdef _DEBUG
#ifndef DEBUG
#define DEBUG
#endif
#endif
#include <windows.h>
#include <windowsx.h>
#include <olectl.h>
#include <ddraw.h>
#include <mmsystem.h>
#ifndef NUMELMS
#if _WIN32_WINNT < 0x0600
#define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0]))
#else
#define NUMELMS(aa) ARRAYSIZE(aa)
#endif
#endif
///////////////////////////////////////////////////////////////////////////
// The following definitions come from the Platform SDK and are required if
// the applicaiton is being compiled with the headers from Visual C++ 6.0.
///////////////////////////////////////////////////////////////////////////
#ifndef InterlockedExchangePointer
#define InterlockedExchangePointer(Target, Value) \
(PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value))
#endif
#ifndef _WAVEFORMATEXTENSIBLE_
#define _WAVEFORMATEXTENSIBLE_
typedef struct {
WAVEFORMATEX Format;
union {
WORD wValidBitsPerSample; /* bits of precision */
WORD wSamplesPerBlock; /* valid if wBitsPerSample==0 */
WORD wReserved; /* If neither applies, set to zero. */
} Samples;
DWORD dwChannelMask; /* which channels are */
/* present in stream */
GUID SubFormat;
} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
#endif // !_WAVEFORMATEXTENSIBLE_
#if !defined(WAVE_FORMAT_EXTENSIBLE)
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
#endif // !defined(WAVE_FORMAT_EXTENSIBLE)
#ifndef GetWindowLongPtr
#define GetWindowLongPtrA GetWindowLongA
#define GetWindowLongPtrW GetWindowLongW
#ifdef UNICODE
#define GetWindowLongPtr GetWindowLongPtrW
#else
#define GetWindowLongPtr GetWindowLongPtrA
#endif // !UNICODE
#endif // !GetWindowLongPtr
#ifndef SetWindowLongPtr
#define SetWindowLongPtrA SetWindowLongA
#define SetWindowLongPtrW SetWindowLongW
#ifdef UNICODE
#define SetWindowLongPtr SetWindowLongPtrW
#else
#define SetWindowLongPtr SetWindowLongPtrA
#endif // !UNICODE
#endif // !SetWindowLongPtr
#ifndef GWLP_WNDPROC
#define GWLP_WNDPROC (-4)
#endif
#ifndef GWLP_HINSTANCE
#define GWLP_HINSTANCE (-6)
#endif
#ifndef GWLP_HWNDPARENT
#define GWLP_HWNDPARENT (-8)
#endif
#ifndef GWLP_USERDATA
#define GWLP_USERDATA (-21)
#endif
#ifndef GWLP_ID
#define GWLP_ID (-12)
#endif
#ifndef DWLP_MSGRESULT
#define DWLP_MSGRESULT 0
#endif
#ifndef DWLP_DLGPROC
#define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT)
#endif
#ifndef DWLP_USER
#define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC)
#endif
#pragma warning(push)
#pragma warning(disable: 4312 4244)
// _GetWindowLongPtr
// Templated version of GetWindowLongPtr, to suppress spurious compiler warning.
template <class T>
T _GetWindowLongPtr(HWND hwnd, int nIndex)
{
return (T)GetWindowLongPtr(hwnd, nIndex);
}
// _SetWindowLongPtr
// Templated version of SetWindowLongPtr, to suppress spurious compiler warning.
template <class T>
LONG_PTR _SetWindowLongPtr(HWND hwnd, int nIndex, T p)
{
return SetWindowLongPtr(hwnd, nIndex, (LONG_PTR)p);
}
#pragma warning(pop)
///////////////////////////////////////////////////////////////////////////
// End Platform SDK definitions
///////////////////////////////////////////////////////////////////////////
#include <strmif.h> // Generated IDL header file for streams interfaces
#include <intsafe.h> // required by amvideo.h
#include <reftime.h> // Helper class for REFERENCE_TIME management
#include <wxdebug.h> // Debug support for logging and ASSERTs
#include <amvideo.h> // ActiveMovie video interfaces and definitions
//include amaudio.h explicitly if you need it. it requires the DX SDK.
//#include <amaudio.h> // ActiveMovie audio interfaces and definitions
#include <wxutil.h> // General helper classes for threads etc
#include <combase.h> // Base COM classes to support IUnknown
#include <measure.h> // Performance measurement
#include <comlite.h> // Light weight com function prototypes
#include <cache.h> // Simple cache container class
#include <wxlist.h> // Non MFC generic list class
#include <msgthrd.h> // CMsgThread
#include <mtype.h> // Helper class for managing media types
#include <fourcc.h> // conversions between FOURCCs and GUIDs
#include <control.h> // generated from control.odl
#include <ctlutil.h> // control interface utility classes
#include <evcode.h> // event code definitions
#include <amfilter.h> // Main streams architecture class hierachy
#include <transfrm.h> // Generic transform filter
#include <transip.h> // Generic transform-in-place filter
#include <uuids.h> // declaration of type GUIDs and well-known clsids
#include <source.h> // Generic source filter
#include <outputq.h> // Output pin queueing
#include <errors.h> // HRESULT status and error definitions
#include <renbase.h> // Base class for writing ActiveX renderers
#include <refclock.h> // Base clock class
#include <sysclock.h> // System clock
#include <pstream.h> // IPersistStream helper class
#include <vtrans.h> // Video Transform Filter base class
#include <amextra.h>
#include <strmctl.h> // IAMStreamControl support
#include <edevdefs.h> // External device control interface defines
#include <audevcod.h> // audio filter device error event codes
#else
#ifdef DEBUG
#pragma message("STREAMS.H included TWICE")
#endif
#endif // __STREAMS__

View File

@@ -1,402 +0,0 @@
//------------------------------------------------------------------------------
// File: StrmCtl.cpp
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1996-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include <strmctl.h>
CBaseStreamControl::CBaseStreamControl(__inout HRESULT *phr)
: m_StreamState(STREAM_FLOWING)
, m_StreamStateOnStop(STREAM_FLOWING) // means no pending stop
, m_tStartTime(MAX_TIME)
, m_tStopTime(MAX_TIME)
, m_StreamEvent(FALSE, phr)
, m_dwStartCookie(0)
, m_dwStopCookie(0)
, m_pRefClock(NULL)
, m_FilterState(State_Stopped)
, m_bIsFlushing(FALSE)
, m_bStopSendExtra(FALSE)
{}
CBaseStreamControl::~CBaseStreamControl()
{
// Make sure we release the clock.
SetSyncSource(NULL);
return;
}
STDMETHODIMP CBaseStreamControl::StopAt(const REFERENCE_TIME * ptStop, BOOL bSendExtra, DWORD dwCookie)
{
CAutoLock lck(&m_CritSec);
m_bStopSendExtra = FALSE; // reset
m_bStopExtraSent = FALSE;
if (ptStop)
{
if (*ptStop == MAX_TIME)
{
DbgLog((LOG_TRACE,2,TEXT("StopAt: Cancel stop")));
CancelStop();
// If there's now a command to start in the future, we assume
// they want to be stopped when the graph is first run
if (m_FilterState == State_Stopped && m_tStartTime < MAX_TIME) {
m_StreamState = STREAM_DISCARDING;
DbgLog((LOG_TRACE,2,TEXT("graph will begin by DISCARDING")));
}
return NOERROR;
}
DbgLog((LOG_TRACE,2,TEXT("StopAt: %dms extra=%d"),
(int)(*ptStop/10000), bSendExtra));
// if the first command is to stop in the future, then we assume they
// want to be started when the graph is first run
if (m_FilterState == State_Stopped && m_tStartTime > *ptStop) {
m_StreamState = STREAM_FLOWING;
DbgLog((LOG_TRACE,2,TEXT("graph will begin by FLOWING")));
}
m_bStopSendExtra = bSendExtra;
m_tStopTime = *ptStop;
m_dwStopCookie = dwCookie;
m_StreamStateOnStop = STREAM_DISCARDING;
}
else
{
DbgLog((LOG_TRACE,2,TEXT("StopAt: now")));
// sending an extra frame when told to stop now would mess people up
m_bStopSendExtra = FALSE;
m_tStopTime = MAX_TIME;
m_dwStopCookie = 0;
m_StreamState = STREAM_DISCARDING;
m_StreamStateOnStop = STREAM_FLOWING; // no pending stop
}
// we might change our mind what to do with a sample we're blocking
m_StreamEvent.Set();
return NOERROR;
}
STDMETHODIMP CBaseStreamControl::StartAt
( const REFERENCE_TIME *ptStart, DWORD dwCookie )
{
CAutoLock lck(&m_CritSec);
if (ptStart)
{
if (*ptStart == MAX_TIME)
{
DbgLog((LOG_TRACE,2,TEXT("StartAt: Cancel start")));
CancelStart();
// If there's now a command to stop in the future, we assume
// they want to be started when the graph is first run
if (m_FilterState == State_Stopped && m_tStopTime < MAX_TIME) {
DbgLog((LOG_TRACE,2,TEXT("graph will begin by FLOWING")));
m_StreamState = STREAM_FLOWING;
}
return NOERROR;
}
DbgLog((LOG_TRACE,2,TEXT("StartAt: %dms"), (int)(*ptStart/10000)));
// if the first command is to start in the future, then we assume they
// want to be stopped when the graph is first run
if (m_FilterState == State_Stopped && m_tStopTime >= *ptStart) {
DbgLog((LOG_TRACE,2,TEXT("graph will begin by DISCARDING")));
m_StreamState = STREAM_DISCARDING;
}
m_tStartTime = *ptStart;
m_dwStartCookie = dwCookie;
// if (m_tStopTime == m_tStartTime) CancelStop();
}
else
{
DbgLog((LOG_TRACE,2,TEXT("StartAt: now")));
m_tStartTime = MAX_TIME;
m_dwStartCookie = 0;
m_StreamState = STREAM_FLOWING;
}
// we might change our mind what to do with a sample we're blocking
m_StreamEvent.Set();
return NOERROR;
}
// Retrieve information about current settings
STDMETHODIMP CBaseStreamControl::GetInfo(__out AM_STREAM_INFO *pInfo)
{
if (pInfo == NULL)
return E_POINTER;
pInfo->tStart = m_tStartTime;
pInfo->tStop = m_tStopTime;
pInfo->dwStartCookie = m_dwStartCookie;
pInfo->dwStopCookie = m_dwStopCookie;
pInfo->dwFlags = m_bStopSendExtra ? AM_STREAM_INFO_STOP_SEND_EXTRA : 0;
pInfo->dwFlags |= m_tStartTime == MAX_TIME ? 0 : AM_STREAM_INFO_START_DEFINED;
pInfo->dwFlags |= m_tStopTime == MAX_TIME ? 0 : AM_STREAM_INFO_STOP_DEFINED;
switch (m_StreamState) {
default:
DbgBreak("Invalid stream state");
case STREAM_FLOWING:
break;
case STREAM_DISCARDING:
pInfo->dwFlags |= AM_STREAM_INFO_DISCARDING;
break;
}
return S_OK;
}
void CBaseStreamControl::ExecuteStop()
{
ASSERT(CritCheckIn(&m_CritSec));
m_StreamState = m_StreamStateOnStop;
if (m_dwStopCookie && m_pSink) {
DbgLog((LOG_TRACE,2,TEXT("*sending EC_STREAM_CONTROL_STOPPED (%d)"),
m_dwStopCookie));
m_pSink->Notify(EC_STREAM_CONTROL_STOPPED, (LONG_PTR)this, m_dwStopCookie);
}
CancelStop(); // This will do the tidy up
}
void CBaseStreamControl::ExecuteStart()
{
ASSERT(CritCheckIn(&m_CritSec));
m_StreamState = STREAM_FLOWING;
if (m_dwStartCookie) {
DbgLog((LOG_TRACE,2,TEXT("*sending EC_STREAM_CONTROL_STARTED (%d)"),
m_dwStartCookie));
m_pSink->Notify(EC_STREAM_CONTROL_STARTED, (LONG_PTR)this, m_dwStartCookie);
}
CancelStart(); // This will do the tidy up
}
void CBaseStreamControl::CancelStop()
{
ASSERT(CritCheckIn(&m_CritSec));
m_tStopTime = MAX_TIME;
m_dwStopCookie = 0;
m_StreamStateOnStop = STREAM_FLOWING;
}
void CBaseStreamControl::CancelStart()
{
ASSERT(CritCheckIn(&m_CritSec));
m_tStartTime = MAX_TIME;
m_dwStartCookie = 0;
}
// This guy will return one of the three StreamControlState's. Here's what the caller
// should do for each one:
//
// STREAM_FLOWING: Proceed as usual (render or pass the sample on)
// STREAM_DISCARDING: Calculate the time 'til *pSampleStart and wait that long
// for the event handle (GetStreamEventHandle()). If the
// wait expires, throw the sample away. If the event
// fires, call me back, I've changed my mind.
// I use pSampleStart (not Stop) so that live sources don't
// block for the duration of their samples, since the clock
// will always read approximately pSampleStart when called
// All through this code, you'll notice the following rules:
// - When start and stop time are the same, it's as if start was first
// - An event is considered inside the sample when it's >= sample start time
// but < sample stop time
// - if any part of the sample is supposed to be sent, we'll send the whole
// thing since we don't break it into smaller pieces
// - If we skip over a start or stop without doing it, we still signal the event
// and reset ourselves in case somebody's waiting for the event, and to make
// sure we notice that the event is past and should be forgotten
// Here are the 19 cases that have to be handled (x=start o=stop <-->=sample):
//
// 1. xo<--> start then stop
// 2. ox<--> stop then start
// 3. x<o-> start
// 4. o<x-> stop then start
// 5. x<-->o start
// 6. o<-->x stop
// 7. <x->o start
// 8. <o->x no change
// 9. <xo> start
// 10. <ox> stop then start
// 11. <-->xo no change
// 12. <-->ox no change
// 13. x<--> start
// 14. <x-> start
// 15. <-->x no change
// 16. o<--> stop
// 17. <o-> no change
// 18. <-->o no change
// 19. <--> no change
enum CBaseStreamControl::StreamControlState CBaseStreamControl::CheckSampleTimes
( __in const REFERENCE_TIME * pSampleStart, __in const REFERENCE_TIME * pSampleStop )
{
CAutoLock lck(&m_CritSec);
ASSERT(!m_bIsFlushing);
ASSERT(pSampleStart && pSampleStop);
// Don't ask me how I came up with the code below to handle all 19 cases
// - DannyMi
if (m_tStopTime >= *pSampleStart)
{
if (m_tStartTime >= *pSampleStop)
return m_StreamState; // cases 8 11 12 15 17 18 19
if (m_tStopTime < m_tStartTime)
ExecuteStop(); // case 10
ExecuteStart(); // cases 3 5 7 9 13 14
return m_StreamState;
}
if (m_tStartTime >= *pSampleStop)
{
ExecuteStop(); // cases 6 16
return m_StreamState;
}
if (m_tStartTime <= m_tStopTime)
{
ExecuteStart();
ExecuteStop();
return m_StreamState; // case 1
}
else
{
ExecuteStop();
ExecuteStart();
return m_StreamState; // cases 2 4
}
}
enum CBaseStreamControl::StreamControlState CBaseStreamControl::CheckStreamState( IMediaSample * pSample )
{
REFERENCE_TIME rtBufferStart, rtBufferStop;
const BOOL bNoBufferTimes =
pSample == NULL ||
FAILED(pSample->GetTime(&rtBufferStart, &rtBufferStop));
StreamControlState state;
LONG lWait;
do
{
// something has to break out of the blocking
if (m_bIsFlushing || m_FilterState == State_Stopped)
return STREAM_DISCARDING;
if (bNoBufferTimes) {
// Can't do anything until we get a time stamp
state = m_StreamState;
break;
} else {
state = CheckSampleTimes( &rtBufferStart, &rtBufferStop );
if (state == STREAM_FLOWING)
break;
// we aren't supposed to send this, but we've been
// told to send one more than we were supposed to
// (and the stop isn't still pending and we're streaming)
if (m_bStopSendExtra && !m_bStopExtraSent &&
m_tStopTime == MAX_TIME &&
m_FilterState != State_Stopped) {
m_bStopExtraSent = TRUE;
DbgLog((LOG_TRACE,2,TEXT("%d sending an EXTRA frame"),
m_dwStopCookie));
state = STREAM_FLOWING;
break;
}
}
// We're in discarding mode
// If we've no clock, discard as fast as we can
if (!m_pRefClock) {
break;
// If we're paused, we can't discard in a timely manner because
// there's no such thing as stream times. We must block until
// we run or stop, or we'll end up throwing the whole stream away
// as quickly as possible
} else if (m_FilterState == State_Paused) {
lWait = INFINITE;
} else {
// wait until it's time for the sample until we say "discard"
// ("discard in a timely fashion")
REFERENCE_TIME rtNow;
EXECUTE_ASSERT(SUCCEEDED(m_pRefClock->GetTime(&rtNow)));
rtNow -= m_tRunStart; // Into relative ref-time
lWait = LONG((rtBufferStart - rtNow)/10000); // 100ns -> ms
if (lWait < 10) break; // Not worth waiting - discard early
}
} while(WaitForSingleObject(GetStreamEventHandle(), lWait) != WAIT_TIMEOUT);
return state;
}
void CBaseStreamControl::NotifyFilterState( FILTER_STATE new_state, REFERENCE_TIME tStart )
{
CAutoLock lck(&m_CritSec);
// or we will get confused
if (m_FilterState == new_state)
return;
switch (new_state)
{
case State_Stopped:
DbgLog((LOG_TRACE,2,TEXT("Filter is STOPPED")));
// execute any pending starts and stops in the right order,
// to make sure all notifications get sent, and we end up
// in the right state to begin next time (??? why not?)
if (m_tStartTime != MAX_TIME && m_tStopTime == MAX_TIME) {
ExecuteStart();
} else if (m_tStopTime != MAX_TIME && m_tStartTime == MAX_TIME) {
ExecuteStop();
} else if (m_tStopTime != MAX_TIME && m_tStartTime != MAX_TIME) {
if (m_tStartTime <= m_tStopTime) {
ExecuteStart();
ExecuteStop();
} else {
ExecuteStop();
ExecuteStart();
}
}
// always start off flowing when the graph starts streaming
// unless told otherwise
m_StreamState = STREAM_FLOWING;
m_FilterState = new_state;
break;
case State_Running:
DbgLog((LOG_TRACE,2,TEXT("Filter is RUNNING")));
m_tRunStart = tStart;
// fall-through
default: // case State_Paused:
m_FilterState = new_state;
}
// unblock!
m_StreamEvent.Set();
}
void CBaseStreamControl::Flushing(BOOL bInProgress)
{
CAutoLock lck(&m_CritSec);
m_bIsFlushing = bInProgress;
m_StreamEvent.Set();
}

View File

@@ -1,157 +0,0 @@
//------------------------------------------------------------------------------
// File: StrmCtl.h
//
// Desc: DirectShow base classes.
//
// Copyright (c) 1996-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __strmctl_h__
#define __strmctl_h__
class CBaseStreamControl : public IAMStreamControl
{
public:
// Used by the implementation
enum StreamControlState
{ STREAM_FLOWING = 0x1000,
STREAM_DISCARDING
};
private:
enum StreamControlState m_StreamState; // Current stream state
enum StreamControlState m_StreamStateOnStop; // State after next stop
// (i.e.Blocking or Discarding)
REFERENCE_TIME m_tStartTime; // MAX_TIME implies none
REFERENCE_TIME m_tStopTime; // MAX_TIME implies none
DWORD m_dwStartCookie; // Cookie for notification to app
DWORD m_dwStopCookie; // Cookie for notification to app
volatile BOOL m_bIsFlushing; // No optimization pls!
volatile BOOL m_bStopSendExtra; // bSendExtra was set
volatile BOOL m_bStopExtraSent; // the extra one was sent
CCritSec m_CritSec; // CritSec to guard above attributes
// Event to fire when we can come
// out of blocking, or to come out of waiting
// to discard if we change our minds.
//
CAMEvent m_StreamEvent;
// All of these methods execute immediately. Helpers for others.
//
void ExecuteStop();
void ExecuteStart();
void CancelStop();
void CancelStart();
// Some things we need to be told by our owning filter
// Your pin must also expose IAMStreamControl when QI'd for it!
//
IReferenceClock * m_pRefClock; // Need it to set advises
// Filter must tell us via
// SetSyncSource
IMediaEventSink * m_pSink; // Event sink
// Filter must tell us after it
// creates it in JoinFilterGraph()
FILTER_STATE m_FilterState; // Just need it!
// Filter must tell us via
// NotifyFilterState
REFERENCE_TIME m_tRunStart; // Per the Run call to the filter
// This guy will return one of the three StreamControlState's. Here's what
// the caller should do for each one:
//
// STREAM_FLOWING: Proceed as usual (render or pass the sample on)
// STREAM_DISCARDING: Calculate the time 'til *pSampleStop and wait
// that long for the event handle
// (GetStreamEventHandle()). If the wait
// expires, throw the sample away. If the event
// fires, call me back - I've changed my mind.
//
enum StreamControlState CheckSampleTimes( __in const REFERENCE_TIME * pSampleStart,
__in const REFERENCE_TIME * pSampleStop );
public:
// You don't have to tell us much when we're created, but there are other
// obligations that must be met. See SetSyncSource & NotifyFilterState
// below.
//
CBaseStreamControl(__inout_opt HRESULT *phr = NULL);
~CBaseStreamControl();
// If you want this class to work properly, there are thing you need to
// (keep) telling it. Filters with pins that use this class
// should ensure that they pass through to this method any calls they
// receive on their SetSyncSource.
// We need a clock to see what time it is. This is for the
// "discard in a timely fashion" logic. If we discard everything as
// quick as possible, a whole 60 minute file could get discarded in the
// first 10 seconds, and if somebody wants to turn streaming on at 30
// minutes into the file, and they make the call more than a few seconds
// after the graph is run, it may be too late!
// So we hold every sample until it's time has gone, then we discard it.
// The filter should call this when it gets a SetSyncSource
//
void SetSyncSource( IReferenceClock * pRefClock )
{
CAutoLock lck(&m_CritSec);
if (m_pRefClock) m_pRefClock->Release();
m_pRefClock = pRefClock;
if (m_pRefClock) m_pRefClock->AddRef();
}
// Set event sink for notifications
// The filter should call this in its JoinFilterGraph after it creates the
// IMediaEventSink
//
void SetFilterGraph( IMediaEventSink *pSink ) {
m_pSink = pSink;
}
// Since we schedule in stream time, we need the tStart and must track the
// state of our owning filter.
// The app should call this ever state change
//
void NotifyFilterState( FILTER_STATE new_state, REFERENCE_TIME tStart = 0 );
// Filter should call Flushing(TRUE) in BeginFlush,
// and Flushing(FALSE) in EndFlush.
//
void Flushing( BOOL bInProgress );
// The two main methods of IAMStreamControl
// Class adds default values suitable for immediate
// muting and unmuting of the stream.
STDMETHODIMP StopAt( const REFERENCE_TIME * ptStop = NULL,
BOOL bSendExtra = FALSE,
DWORD dwCookie = 0 );
STDMETHODIMP StartAt( const REFERENCE_TIME * ptStart = NULL,
DWORD dwCookie = 0 );
STDMETHODIMP GetInfo( __out AM_STREAM_INFO *pInfo);
// Helper function for pin's receive method. Call this with
// the sample and we'll tell you what to do with it. We'll do a
// WaitForSingleObject within this call if one is required. This is
// a "What should I do with this sample?" kind of call. We'll tell the
// caller to either flow it or discard it.
// If pSample is NULL we evaluate based on the current state
// settings
enum StreamControlState CheckStreamState( IMediaSample * pSample );
private:
// These don't require locking, but we are relying on the fact that
// m_StreamState can be retrieved with integrity, and is a snap shot that
// may have just been, or may be just about to be, changed.
HANDLE GetStreamEventHandle() const { return m_StreamEvent; }
enum StreamControlState GetStreamState() const { return m_StreamState; }
BOOL IsStreaming() const { return m_StreamState == STREAM_FLOWING; }
};
#endif

View File

@@ -1,74 +0,0 @@
//------------------------------------------------------------------------------
// File: SysClock.cpp
//
// Desc: DirectShow base classes - implements a system clock based on
// IReferenceClock.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <streams.h>
#include <limits.h>
#ifdef FILTER_DLL
/* List of class IDs and creator functions for the class factory. This
provides the link between the OLE entry point in the DLL and an object
being created. The class factory will call the static CreateInstance
function when it is asked to create a CLSID_SystemClock object */
CFactoryTemplate g_Templates[1] = {
{&CLSID_SystemClock, CSystemClock::CreateInstance}
};
int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);
#endif
/* This goes in the factory template table to create new instances */
CUnknown * WINAPI CSystemClock::CreateInstance(__inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr)
{
return new CSystemClock(NAME("System reference clock"),pUnk, phr);
}
CSystemClock::CSystemClock(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr) :
CBaseReferenceClock(pName, pUnk, phr)
{
}
STDMETHODIMP CSystemClock::NonDelegatingQueryInterface(
REFIID riid,
__deref_out void ** ppv)
{
if (riid == IID_IPersist)
{
return GetInterface(static_cast<IPersist *>(this), ppv);
}
else if (riid == IID_IAMClockAdjust)
{
return GetInterface(static_cast<IAMClockAdjust *>(this), ppv);
}
else
{
return CBaseReferenceClock::NonDelegatingQueryInterface(riid, ppv);
}
}
/* Return the clock's clsid */
STDMETHODIMP
CSystemClock::GetClassID(__out CLSID *pClsID)
{
CheckPointer(pClsID,E_POINTER);
ValidateReadWritePtr(pClsID,sizeof(CLSID));
*pClsID = CLSID_SystemClock;
return NOERROR;
}
STDMETHODIMP
CSystemClock::SetClockDelta(REFERENCE_TIME rtDelta)
{
return SetTimeDelta(rtDelta);
}

View File

@@ -1,39 +0,0 @@
//------------------------------------------------------------------------------
// File: SysClock.h
//
// Desc: DirectShow base classes - defines a system clock implementation of
// IReferenceClock.
//
// Copyright (c) 1992-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#ifndef __SYSTEMCLOCK__
#define __SYSTEMCLOCK__
//
// Base clock. Uses timeGetTime ONLY
// Uses most of the code in the base reference clock.
// Provides GetTime
//
class CSystemClock : public CBaseReferenceClock, public IAMClockAdjust, public IPersist
{
public:
// We must be able to create an instance of ourselves
static CUnknown * WINAPI CreateInstance(__inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr);
CSystemClock(__in_opt LPCTSTR pName, __inout_opt LPUNKNOWN pUnk, __inout HRESULT *phr);
DECLARE_IUNKNOWN
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, __deref_out void ** ppv);
// Yield up our class id so that we can be persisted
// Implement required Ipersist method
STDMETHODIMP GetClassID(__out CLSID *pClsID);
// IAMClockAdjust methods
STDMETHODIMP SetClockDelta(REFERENCE_TIME rtDelta);
}; //CSystemClock
#endif /* __SYSTEMCLOCK__ */

File diff suppressed because it is too large Load Diff

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