1
0
mirror of https://github.com/narzoul/DDrawCompat synced 2024-12-30 08:55:36 +01:00

94 Commits

Author SHA1 Message Date
narzoul
ccc23c75b9 Emulate hardware cursor in scaled fullscreen mode 2022-09-27 21:44:53 +02:00
narzoul
647a4bfcff Added DisplayResolution setting 2022-09-27 21:44:53 +02:00
narzoul
62983b19fe Create helper surfaces via DirectDraw runtime 2022-09-27 21:44:53 +02:00
narzoul
51a451f424 Perform P8 to R8G8B8 conversion in pixel shader 2022-09-27 21:44:53 +02:00
narzoul
74460b2d24 Added CpuAffinity setting 2022-09-27 21:44:52 +02:00
narzoul
b3b54d5fbd Added ThreadPriorityBoost setting 2022-09-27 21:44:35 +02:00
narzoul
6f92c8ef22 Added config parser 2022-09-22 18:53:57 +02:00
narzoul
7c506d86c9 Support unicode file paths 2021-05-12 21:53:19 +02:00
narzoul
c8723e171b Added version info to DLL 2021-04-07 20:18:59 +02:00
narzoul
b2c92f31da Use variable templates and auto template parameters 2021-03-28 11:19:28 +02:00
narzoul
71c67fffd4 Reworked vtable hooking 2021-03-16 14:13:20 +01:00
narzoul
75f8f7e689 Replace vtable function pointers instead of using Detours 2021-02-24 23:35:21 +01:00
narzoul
4e3debf776 Merged Gdi::DcCache into Gdi::Dc 2021-02-24 23:35:19 +01:00
narzoul
b83f7ca879 Disable DIB redirection for icon and cursor creating functions
Fixes corrupt icon in volume mixer.
2021-02-24 23:35:16 +01:00
narzoul
205f517845 Fixed scroll bar control painting and thumb tracking 2021-02-24 23:30:48 +01:00
narzoul
0a39f17089 Fixed caption button positions, sizes and hit boxes 2021-01-31 16:25:13 +01:00
narzoul
050248a552 Moved z-buffer bit depth caps fix to driver level 2021-01-07 01:06:37 +01:00
narzoul
13ab654665 Moved presentation window implementation to separate file 2021-01-04 22:15:10 +01:00
narzoul
453dc4d681 Renamed PaintHandlers to User32WndProcs 2021-01-04 22:11:49 +01:00
narzoul
799e9a95ae Removed dependency on D3DKMTPresent
Fixes presentation issues when Hardware Accelerated GPU Scheduling is enabled
(issue #73).
2020-07-13 23:44:05 +02:00
narzoul
2ce97329a9 Limit GlobalMemoryStatus values to 2GB 2020-06-21 22:48:51 +02:00
narzoul
ff5bcc031c Eliminate redundant device state changes 2020-06-21 22:48:39 +02:00
narzoul
8e07040750 Moved dynamic index/vertex buffers to separate class 2020-06-16 22:20:40 +02:00
narzoul
b5e3de76cb Use QueryThreadCycleTime for mitigation of busy waiting 2020-06-02 17:18:13 +02:00
narzoul
bff7253ecd Improved rendering performance for indexed and system memory primitives 2020-05-26 14:42:14 +02:00
narzoul
ca9404ec6f Suppress flushes from execute buffers
Mitigates performance issues in Rowan's Mig Alley (issue #12).
2020-05-26 00:15:41 +02:00
narzoul
757f648385 Support injection via dciman32.dll 2020-05-10 14:20:35 +02:00
narzoul
10f61c11e9 Emulate disabled font smoothing 2020-04-28 09:20:48 +02:00
narzoul
d06fe4e6ba Hook Direct3D execute buffer interface 2020-04-19 01:31:15 +02:00
narzoul
652bf67706 Hook Direct3D light and material interfaces 2020-04-17 23:53:18 +02:00
narzoul
ec7a40333e Attempt to mitigate thread scheduling issues caused by busy waiting
Fixes black intro videos in Star Wars Rebellion (issue #22)
and performance issues in The Longest Journey.
2020-04-12 16:18:56 +02:00
narzoul
aeaeeaed4d Log window message names 2020-02-01 14:11:47 +01:00
narzoul
bb6092e0bd Partial workaround for black D3DTA_DIFFUSE color on some drivers when RHW=0
Fixes black screen issues under some circumstances (e.g. underwater) in
Might and Magic 9 (issue #48).
2019-08-10 14:23:52 +02:00
narzoul
d23904afd2 Prefer color fills in system memory 2019-08-01 16:00:22 +02:00
narzoul
c526cc2506 Prefer locks and blits in system memory 2019-08-01 16:00:21 +02:00
narzoul
07de716af9 Reworked oversized surface support 2019-08-01 16:00:18 +02:00
narzoul
3e0eada40d Refactored adapter and device references 2019-08-01 16:00:17 +02:00
narzoul
26f8742dc2 Reverted forcing surfaces to system memory 2019-08-01 16:00:10 +02:00
narzoul
5b171691f0 Separate DirectDraw and UMD critical sections 2019-06-08 15:59:17 +02:00
narzoul
727be63db1 Implement GDI system palette emulation 2018-12-31 20:31:58 +01:00
narzoul
58aba66ca2 Hook all GDI threads 2018-12-08 21:57:13 +01:00
narzoul
785663700d Separate GDI and DirectDraw surfaces 2018-12-08 21:53:40 +01:00
narzoul
6183aed7da Optimize GDI redraw on window position changes 2018-12-08 21:53:38 +01:00
narzoul
39d148e3ba Aggregate render target locks 2018-02-03 17:02:32 +01:00
narzoul
4b02a40bc9 Hooked the IDirectDrawGammaControl interface 2017-06-05 16:35:48 +02:00
narzoul
640f746633 Implement 8/16 bit display mode emulation
8/16 bit display mode emulation is now implemented internally instead of
relying on the builtin Windows shims, as those are sometimes unreliable
(not triggering for some games on some systems when they should).

External DirectDraw hooks (such as the DWM8And16BitMitigation shim)
are disabled to avoid interference.

Fixes issues reported in #8, #9, #15.
2017-05-28 15:40:33 +02:00
narzoul
d1cd72b304 Hooked the IDirectDrawClipper interface 2017-05-20 11:34:28 +02:00
narzoul
cd22b333e3 Support oversized surfaces in system memory
AMD drivers reject system memory surfaces that are larger than the maximum
texture width/height supported by the driver (usually 4096x4096 for AMD).
This can cause issues in games that create larger system memory surfaces.

This workaround crops the driver resource dimensions to the allowed
maximum values and handles blitting outside this region by creating a
temporary resource that maps to the actual affected system memory region.

Fixes crashes with AMD drivers in Rainbow Six games and Desperados,
mentioned in issue #2 and #8.
2017-02-18 18:53:53 +01:00
narzoul
26995d6108 Create palettized surfaces in system memory 2016-12-22 20:49:00 +01:00
narzoul
d898961a7e Restore legacy double/triple buffered v-sync behavior
On recent drivers, double buffered DirectDraw flips no longer wait for the
vertical sync before returning and instead just insert the flip into the
flip queue for later execution. This effectively results in triple buffered
behavior (in the render-ahead sense) and causes up to an extra frame of
latency even if the flip queue size is set to 1.

To restore the legacy double buffered behavior, each flip waits for the
presented frame to leave the flip queue before returning.

To restore the legacy triple buffered behavior, the flip queue size is
forced to 1. This causes the flip to wait if the previous flip is still
pending.
2016-12-04 15:43:05 +01:00