Changeset 105660 in vbox
- Timestamp:
- Aug 13, 2024 11:59:37 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r105526 r105660 3423 3423 { 3424 3424 WARN(("VBOXESC_CONFIGURETARGETS invalid command %d", pEscapeHdr->u32CmdSpecific)); 3425 //Status = STATUS_INVALID_PARAMETER;3426 //break;3425 Status = STATUS_INVALID_PARAMETER; 3426 break; 3427 3427 } 3428 3428 … … 3507 3507 } 3508 3508 3509 uint32_t u32Mask = pEscapeHdr->u32CmdSpecific; 3509 uint32_t u32ConnectMask = pEscapeHdr->u32CmdSpecific; 3510 3511 HANDLE hKey = NULL; 3512 Status = IoOpenDeviceRegistryKey(pDevExt->pPDO, PLUGPLAY_REGKEY_DRIVER, GENERIC_WRITE, &hKey); 3513 if (!NT_SUCCESS(Status)) 3514 { 3515 WARN(("VBOXESC_CONFIGURETARGETS IoOpenDeviceRegistryKey failed, Status = 0x%x", Status)); 3516 hKey = NULL; 3517 } 3510 3518 3511 3519 for (int i = 0; i < VBoxCommonFromDeviceExt(pDevExt)->cDisplays; ++i) 3512 3520 { 3513 3521 VBOXWDDM_TARGET *pTarget = &pDevExt->aTargets[i]; 3514 bool fConn Req = u32Mask & RT_BIT(i);3522 bool fConnectReq = u32ConnectMask & RT_BIT(i); 3515 3523 3516 3524 pTarget->fConfigured = true; 3517 3525 3518 if ( !pTarget->fConnected && fConnReq)3526 if (pTarget->fConnected != fConnectReq) 3519 3527 { 3520 Status = VBoxWddmChildStatusConnect(pDevExt, (uint32_t)i, TRUE); 3521 LOG(("VBOXESC_RECONNECT_TARGETS connecting target %d, status 0x%x", i, Status)); 3528 Status = VBoxWddmChildStatusConnect(pDevExt, (uint32_t)i, fConnectReq); 3529 LOG(("VBOXESC_RECONNECT_TARGETS %sconnecting target %d, status 0x%x", fConnectReq ? "" : "dis", i, Status)); 3530 pTarget->fConnected = fConnectReq; 3531 3532 if (RT_LIKELY(hKey)) 3533 { 3534 WCHAR wszNameBuf[sizeof(VBOXWDDM_REG_DRV_DISPFLAGS_PREFIX) / sizeof(WCHAR) + 32]; 3535 RTUtf16Printf(wszNameBuf, RT_ELEMENTS(wszNameBuf), "%ls%u", VBOXWDDM_REG_DRV_DISPFLAGS_PREFIX, i); 3536 Status = vboxWddmRegSetValueDword(hKey, wszNameBuf, fConnectReq); 3537 } 3522 3538 } 3523 else if (pTarget->fConnected && !fConnReq) 3524 { 3525 Status = VBoxWddmChildStatusConnect(pDevExt, (uint32_t)i, FALSE); 3526 LOG(("VBOXESC_RECONNECT_TARGETS disconnecting target %d, status 0x%x", i, Status)); 3527 } 3528 } 3539 } 3540 3541 if (RT_LIKELY(hKey)) 3542 { 3543 NTSTATUS rcNt2 = ZwClose(hKey); 3544 Assert(rcNt2 == STATUS_SUCCESS); NOREF(rcNt2); 3545 } 3529 3546 3530 3547 Status = STATUS_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.