Changeset 105749 in vbox
- Timestamp:
- Aug 21, 2024 9:31:01 AM (3 months ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r105660 r105749 3493 3493 } 3494 3494 3495 if (pEscape->PrivateDriverDataSize != sizeof (*pEscapeHdr))3495 if (pEscape->PrivateDriverDataSize < sizeof (VBOXDISPIFESCAPE_RECONNECT_TARGETS)) 3496 3496 { 3497 3497 WARN(("VBOXESC_RECONNECT_TARGETS invalid private driver size %d\n", pEscape->PrivateDriverDataSize)); … … 3500 3500 } 3501 3501 3502 if (pEscapeHdr->u32CmdSpecific == 0)3503 { 3504 WARN(("VBOXESC_RECONNECT_TARGETS u32CmdSpecific is zero\n"));3502 if (pEscapeHdr->u32CmdSpecific != 0) 3503 { 3504 WARN(("VBOXESC_RECONNECT_TARGETS u32CmdSpecific is not zero\n")); 3505 3505 Status = STATUS_INVALID_PARAMETER; 3506 3506 break; 3507 3507 } 3508 3508 3509 uint32_t u32ConnectMask = pEscapeHdr->u32CmdSpecific; 3509 VBOXDISPIFESCAPE_RECONNECT_TARGETS *pVBoxEscapeReconnectTargets = (VBOXDISPIFESCAPE_RECONNECT_TARGETS *)pEscape->pPrivateDriverData; 3510 uint32_t u32ConnectMask = pVBoxEscapeReconnectTargets->u32ConnectMask; 3511 uint32_t u32DisconnectMask = pVBoxEscapeReconnectTargets->u32DisconnectMask; 3512 3513 if (u32ConnectMask & u32DisconnectMask) 3514 { 3515 WARN(("VBOXESC_RECONNECT_TARGETS (u32ConnectMask & u32DisconnectMask) is not zero\n")); 3516 Status = STATUS_INVALID_PARAMETER; 3517 break; 3518 } 3510 3519 3511 3520 HANDLE hKey = NULL; … … 3520 3529 { 3521 3530 VBOXWDDM_TARGET *pTarget = &pDevExt->aTargets[i]; 3522 bool fConnectReq = u32ConnectMask & RT_BIT(i); 3531 bool fConnectReq; 3532 3533 if (u32ConnectMask & RT_BIT(i)) 3534 fConnectReq = true; 3535 else if (u32DisconnectMask & RT_BIT(i)) 3536 fConnectReq = false; 3537 else 3538 continue; 3523 3539 3524 3540 pTarget->fConfigured = true; -
trunk/src/VBox/Additions/WINNT/include/VBoxDisplay.h
r105526 r105749 133 133 } VBOXDISPIFESCAPE_TARGETCONNECTIVITY; 134 134 135 typedef struct VBOXDISPIFESCAPE_RECONNECT_TARGETS 136 { 137 VBOXDISPIFESCAPE EscapeHdr; 138 uint32_t u32ConnectMask; 139 uint32_t u32DisconnectMask; 140 } VBOXDISPIFESCAPE_RECONNECT_TARGETS; 141 135 142 #endif /* VBOX_WITH_WDDM */ 136 143 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceDisplayConfig.cpp
r105677 r105749 121 121 D3DKMT_ENUMADAPTERS EnumAdapters = {0}; 122 122 NTSTATUS rcNt; 123 uint32_t u32 Mask = 0;123 uint32_t u32ConnectMask = 0, u32DisconnectMask = 0; 124 124 125 125 for(uint32_t i = 0; i < cDisplays; i++) 126 126 { 127 u32Mask |= (paDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_DISABLED) ? 0 : RT_BIT(i); 128 } 129 130 VGSvcVerbose(3, "ReconnectDisplays u32Mask 0x%x\n", u32Mask); 127 uint32_t u32Mask = RT_BIT(paDisplays[i].idDisplay); 128 129 if (paDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_DISABLED) 130 u32DisconnectMask |= u32Mask; 131 else 132 u32ConnectMask |= u32Mask; 133 } 134 135 VGSvcVerbose(3, "ReconnectDisplays u32ConnectMask 0x%RX32, u32DisconnectMask 0x%RX32\n", u32ConnectMask, u32DisconnectMask); 131 136 132 137 EnumAdapters.NumAdapters = RT_ELEMENTS(EnumAdapters.Adapters); … … 152 157 if (hAdapter) 153 158 { 154 VBOXDISPIFESCAPE EscapeHdr = {0}; 155 EscapeHdr.escapeCode = VBOXESC_RECONNECT_TARGETS; 156 EscapeHdr.u32CmdSpecific = u32Mask; 159 VBOXDISPIFESCAPE_RECONNECT_TARGETS VBoxEscapeReconnectTargets = {{0}}; 160 161 VBoxEscapeReconnectTargets.EscapeHdr.escapeCode = VBOXESC_RECONNECT_TARGETS; 162 VBoxEscapeReconnectTargets.EscapeHdr.u32CmdSpecific = 0; 163 VBoxEscapeReconnectTargets.u32ConnectMask = u32ConnectMask; 164 VBoxEscapeReconnectTargets.u32DisconnectMask = u32DisconnectMask; 157 165 158 166 D3DKMT_ESCAPE EscapeData = {0}; … … 160 168 EscapeData.Type = D3DKMT_ESCAPE_DRIVERPRIVATE; 161 169 EscapeData.Flags.HardwareAccess = 1; 162 EscapeData.pPrivateDriverData = & EscapeHdr;163 EscapeData.PrivateDriverDataSize = sizeof ( EscapeHdr);170 EscapeData.pPrivateDriverData = &VBoxEscapeReconnectTargets; 171 EscapeData.PrivateDriverDataSize = sizeof (VBoxEscapeReconnectTargets); 164 172 165 173 rcNt = g_pfnD3DKMTEscape(&EscapeData); … … 272 280 for(uint32_t i = 0; i < cDisplays; i++) 273 281 { 274 VGSvcVerbose(2, " Display[%i] flags=%#x (%dx%d)\n", i,282 VGSvcVerbose(2, "%u) Display[%u] flags=%#x (%dx%d)\n", i, aDisplays[i].idDisplay, 275 283 aDisplays[i].fDisplayFlags, 276 284 aDisplays[i].cx, aDisplays[i].cy);
Note:
See TracChangeset
for help on using the changeset viewer.