reactos/sdk/include/reactos
Oleg Dubinskiy e034377b51
[WIN32SS][ENG][NTDDRAW] Manage DirectDraw instances when switching display mode (#4519)
CORE-17932

[ENG] Implement DirectDraw management in switch display mode functions
(e.g. resolution change, color depth, display frequency etc.):

- Switch DirectDraw instances between the two PDEVs (the current one and
  the new one allocated by ourselves) by calling dxg!DxDdDynamicModeChange
  function.

- Suspend them before and resume after the display mode switch, by calling
  dxg!DxDdsuspendDirectDraw and dxg!DxDdResumeDirectDraw appropriately.

We currently don't have these functions implemented, but MS DXG has, so
it allows to properly manage DirectDraw PDEVs using this driver, similarly
to Windows.
My analysis confirms that these functions are always called in XP/2k3 on
display mode switch, even when there is no any DirectX app running at the
moment. Analyzing their prototypes show that my guesses are correct.

- Initialize hDev and dhpdev members for EDD_DIRECTDRAW_GLOBAL for newly
  created surfaces, switch them during mode change and re-initialize after
  it also. They are commonly used by DirectDraw stack.
  In addition, enable DirectDraw for old and new PDEVs, by calling
  dxg!DxDdEnableDirectDraw function.


[NTDDRAW] Additionally, fix usage of DirectDraw lock count in the PDEVOBJ
structure.

- Enable cDirectDrawDisableLocks member for storing its value, instead of
  DxDd_nCount, which is marked as ROS-specific.

- Use it in win32k!DxEngGet/SetHdevData for getting/setting DirectDraw
  count appropriately.

My analysis also shows that in Windows, the PDEVOBJ::cDirectDrawDisableLocks
method calls DxEngGetHdevData with type 8, which corresponds to our DxDd_nCount.
So there are no doubts that this member is used there.

- Rename DxEngGetHdevData_dd_count alias of type 8 to DxEngGetHdevData_dd_locks,
  to match more accurately an actual member name. Update the enumeration
  and fix all code parts appropriately.

All these changes allow to properly change display mode during executing
DirectDraw applications, when they try to switch in full-screen mode.
At least a bugcheck that happened before my changes, does no longer appear.

There are still some games that don't run correctly, as if there is no
3D acceleration (which actually exists). This requires further investigations.
2023-06-21 18:00:24 +02:00
..
appcompat [APPHELP][APPHELP_APITEST] Implement SdbGetDatabaseInformation 2019-02-25 20:00:34 +01:00
arc [SDK] Add CONFIGURATION_TYPE definition back in arc.h 2023-06-04 21:40:04 +02:00
arm
debug [SDK] Use FORCEINLINE instead of inline 2020-11-16 16:58:10 +01:00
dll [DESK] Pass the list of all display modes to extensions 2022-06-20 14:38:03 +03:00
drivers [WIN32SS][ENG][NTDDRAW] Manage DirectDraw instances when switching display mode (#4519) 2023-06-21 18:00:24 +02:00
elf Add .keep guard files in order to restore lost but empty directories we had with SVN. 2017-10-04 10:28:36 +02:00
idl [ADVAPI32][SECLOGON] CreateProcessWithLogonW: Pass the environment to the callee 2023-06-10 14:10:14 +02:00
kjk
libs [ZLIB] Update to v1.2.13. CORE-18752 2023-02-02 02:18:39 +03:00
mc [TRANSLATION] Big Romanian (ro-RO) translation update - part 1 (#4701) 2022-10-09 14:00:20 +03:00
services [SERVICES] On service start control message, send the service tag 2018-12-30 21:44:25 +01:00
subsys [KERNEL32][SDK] RegisterConsoleIME and UnregisterConsoleIME (#5270) 2023-05-07 22:55:46 +09:00
ui [SDK:REACTOS] Move our ROS-specific header-only UI libraries into a "ui" sub-folder. (#4205) 2022-01-06 02:17:25 +01:00
wine [SDK] Shorten autogenerated Copyright strings (#5210) 2023-04-04 12:10:59 +02:00
winsock [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
browseui_undoc.h [EXPLORER][BROWSEUI][SHELL32][NETSHELL] Fix wrong usage of CComPtr 2022-10-02 00:38:23 +02:00
buildno.h.cmake [SYSDM] Introduce KERNEL_VERSION_REVISION_RC and align system uptime string 2021-02-01 07:32:14 +01:00
comctl32_undoc.h [SDK][INCLUDE] Improve <comctl32_undoc.h> more 2020-02-13 11:26:40 +09:00
compat_undoc.h [LDR][APPHELP] Add a shim that disables manifest compatibility version parsing 2019-08-19 12:08:06 +02:00
compatguid_undoc.h [NTDLL] Check the process manifest at startup for a compatibility section. 2018-04-09 19:36:09 +02:00
debug.h [SDK] Silence a GCC warning on RtlAssert 2020-02-08 22:09:14 +01:00
exeformat.h
iernonce_undoc.h [IERNONCE] [RUNONCEEX] Add RunOnceEx functionality for ReactOS (#3926) 2021-09-29 11:30:32 +02:00
imm32_undoc.h [IMM32] Fix & Rename: s/Imm32LockIMCEx/Imm32InternalLockIMC/ (#4436) 2022-04-08 22:23:30 +09:00
jpnvkeys.h [IMM32][NTUSER][SDK] Add ImmCallImeConsoleIME (#5271) 2023-05-10 14:04:01 +09:00
kddll.h [NTOS:KD] Add some annotations. 2023-03-09 18:32:36 +01:00
kdros.h [SDK] Enforce callback type for KdRosRegisterCliCallback(), KdRosDeregisterCliCallback(). 2018-04-29 12:33:14 +02:00
manifest.xml
manifest_dll.rc [SDK] Fix copy-pasta, addendum to 7861960 by Mark Jansen. 2017-12-24 16:48:13 +01:00
manifest_exe.rc [SDK] Guard manifest_[dll|exe].rc against wrong usage. 2017-12-24 11:44:21 +01:00
manifest_hosted.rc [TELEPHON.CPL] Include winuser.h in the rc which is needed for manifest_hosted.rc 2018-03-01 10:05:54 +02:00
msgdump.h Remove '.html' from spdx.org license page URLs. (#4845) 2022-11-03 18:25:37 +01:00
msvctarget.h [SDK] Allow ARM64 MSVC to complete configuration (#4045) 2021-10-22 18:52:32 +03:00
probe.h [NTOS:EX][SDK:REACTOS] Fix capitalization of "LangId" in the ProbeFor*** functions. 2022-02-08 15:56:34 +01:00
reactx.h
rosioctl.h [USETUP] Remove the PARTITION_EXT2 constant and use PARTITION_LINUX in favour since PARTITION_EXT2 is just an alias to PARTITION_LINUX 2018-11-07 23:16:29 +01:00
rossym.h [NTOS:KD][NTOS:KD64][NTOS:KDBG] Fix IRQL & spinlock use 2021-06-29 11:49:20 +02:00
shellutils.h [SDK] Define CCoInit in shellutils 2022-11-01 21:24:14 +01:00
shlguid_undoc.h [SDK][INCLUDE] Add CLSID_CopyToMenu and CLSID_MoveToMenu (#3032) 2020-08-11 17:26:05 +09:00
shlobj_undoc.h [SHELL32][SHELL32_APITEST] Implement SHCreateFileDataObject 2021-12-31 21:27:30 +01:00
shlwapi_undoc.h [SHELL32][INCLUDE] Fix PathResolve for double-backslash (#4833) 2022-11-04 21:44:46 +09:00
srmp.h
stubs.h [SPEC2DEF] Fix compilation of generated stub C files with int64 parameters 2019-01-08 18:58:56 +01:00
svc.h [SDK:REACTOS][SVCHOST] Add/complete all missing definitions in the SVCHOST global header. (#4295) 2022-04-01 04:55:31 +02:00
tcpip_undoc.h
undocelfapi.h [SDK] Add a header for the user-mode NT EventLog API. Addendum to commit dca4fd46 (SVN r71384). 2018-03-25 00:28:04 +01:00
undocgdi.h [FONTEXT] Initial implementation of CFontExt::DoGetFontTitle (#3127) 2020-09-12 09:40:48 +09:00
undocmpr.h [WINLOGON][MPR][SDK] WNetClearConnections: Fix function parameter type (#3480) 2021-04-18 21:58:44 +03:00
undocshell.h [SHELL32] shlexec: Initial support of App Paths (#4850) 2022-11-08 09:23:06 +09:00
undocuser.h [INCLUDE][USER32] Add WM_FINALDESTROY and improve ImeWndProcA/W 2022-11-13 09:59:17 +09:00
uxundoc.h [FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
verifier.h [RTL] Use RtlApplicationVerifierStop for DPH 2022-11-01 21:26:05 +01:00
version.cmake 🎊 🍾 🥳 Happy New Year 2023 to the ReactOS Community! 🎆 ⚛️ ☢️ 2023-01-01 00:00:00 +03:00
version.h.cmake
version.rc [SDK] Shorten autogenerated Copyright strings (#5210) 2023-04-04 12:10:59 +02:00
windbgkd.h [REACTOS] Finally get some ARM64 applications building (#4517) 2022-05-25 17:06:32 +03:00
windns_undoc.h [DNSAPI][DNSRSLVR] Implement DnsGetCacheDataTable() 2019-12-22 11:21:04 +01:00
winxx.h Remove '.html' from spdx.org license page URLs. (#4845) 2022-11-03 18:25:37 +01:00
wmiioctl.h