Changeset 105527 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jul 26, 2024 5:13:32 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceDisplayConfig.cpp
r105495 r105527 73 73 } 74 74 75 void ReplugDisplays(uint32_t cDisplays, VMMDevDisplayDef *paDisplays) 76 { 77 RT_NOREF2(cDisplays, paDisplays); 75 void ReconnectDisplays(uint32_t cDisplays, VMMDevDisplayDef *paDisplays) 76 { 78 77 D3DKMT_HANDLE hAdapter; 79 78 D3DKMT_ENUMADAPTERS EnumAdapters = {0}; 80 79 NTSTATUS rcNt; 81 ULONG id = 0; 80 uint32_t u32Mask = 0; 81 82 for(uint32_t i = 0; i < cDisplays; i++) 83 { 84 u32Mask |= (paDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_DISABLED) ? 0 : RT_BIT(i); 85 } 86 87 VGSvcVerbose(2, "ReconnectDisplays u32Mask 0x%x\n", u32Mask); 82 88 83 89 EnumAdapters.NumAdapters = RT_ELEMENTS(EnumAdapters.Adapters); … … 86 92 VGSvcVerbose(2, "D3DKMTEnumAdapters rcNt=%#x NumAdapters=%d\n", rcNt, EnumAdapters.NumAdapters); 87 93 88 for( id = 0; id < EnumAdapters.NumAdapters; id++)94 for(ULONG id = 0; id < EnumAdapters.NumAdapters; id++) 89 95 { 90 96 D3DKMT_ADAPTERINFO *pAdapterInfo = &EnumAdapters.Adapters[id]; … … 104 110 { 105 111 VBOXDISPIFESCAPE EscapeHdr = {0}; 106 EscapeHdr.escapeCode = VBOXESC_ CONFIGURETARGETS;107 EscapeHdr.u32CmdSpecific = 0;112 EscapeHdr.escapeCode = VBOXESC_RECONNECT_TARGETS; 113 EscapeHdr.u32CmdSpecific = u32Mask; 108 114 109 115 D3DKMT_ESCAPE EscapeData = {0}; … … 162 168 if (cDisplays > 0) 163 169 { 164 ReplugDisplays(cDisplays, &aDisplays[0]); 165 VGSvcVerbose(2, "Display[0] (%dx%d)\n", aDisplays[0].cx, aDisplays[0].cy); 170 for(uint32_t i = 0; i < cDisplays; i++) 171 { 172 VGSvcVerbose(2, "Display[%i] flags=%#x (%dx%d)\n", i, 173 aDisplays[i].fDisplayFlags, 174 aDisplays[i].cx, aDisplays[i].cy); 175 } 176 177 ReconnectDisplays(cDisplays, &aDisplays[0]); 166 178 } 167 179 }
Note:
See TracChangeset
for help on using the changeset viewer.