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

6 Commits

Author SHA1 Message Date
narzoul
71e90210ad Introduced a DirectDraw repository for reusable objects 2016-03-31 23:05:54 +02:00
narzoul
4f4b0cf732 Disabled immersive context menus
Immersive context menus don't display correctly when theming is disabled:
all menu items have empty labels and no icons.
Disabled this menu style through a faked registry value.
2016-03-24 23:12:28 +01:00
narzoul
acbc183d00 Disabled themes, fixed nonclient area rendering and caret deadlock
Disabled visual styles and added WM_NCPAINT handling (as a simple BitBlt copy
from the original DC) to reduce glitches in rendering of common controls and
windows, such as the GetSaveFileName dialog window in StarCraft.

Fixed a deadlock in the caret emulation code caused by locking the GDI
critical section prior to calling beginGdiRendering, which is locking both the
DirectDraw and GDI critical sections. Another thread that only calls
beginGdiRendering without entering the GDI critical section first could thus
run into a deadlock as both threads were waiting on each other's critical
sections.
Now the global caret data has it its own critical section instead of sharing
the GDI critical section.
2016-01-17 15:31:08 +01:00
narzoul
5a30b072ba Revamping GDI interworking - Part 1
Previous method of GDI interworking does not seem feasible anymore as it is
leaking GDI resources in more complex scenarios (StarCraft). There does not
seem to be a way to prevent all leaks as the ReleaseDC hook does not capture
all released DCs.

New method redirects the individual GDI drawing methods instead by replacing
DCs only temporarily for each operation. Currently only BitBlt is supported
(which seems sufficient for Deadlock 2).

Also, writing to unlocked video surface memory no longer works on Windows 10.
To work around this restriction, the primary surface is temporarily locked
for the duration of each GDI rendering operation.
2016-01-04 23:37:58 +01:00
narzoul
3610edb117 Extended hooking to all methods in debug mode
All methods of all hooked interfaces are now hooked in debug mode.
This provides more function entry/exit logs.
2015-12-30 00:46:10 +01:00
narzoul
2a5e699c6e Initial commit 2015-12-25 01:57:44 +01:00