Changeset 42217 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.cpp
- Timestamp:
- Jul 18, 2012 8:41:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVidPn.cpp
r42158 r42217 219 219 NTSTATUS Status = STATUS_SUCCESS; 220 220 221 pVsi->VideoStandard = D3DKMDT_VSS_ VESA_DMT;221 pVsi->VideoStandard = D3DKMDT_VSS_OTHER; 222 222 pVsi->ActiveSize = *pResolution; 223 223 pVsi->VSyncFreq.Numerator = VSync * 1000; 224 224 pVsi->VSyncFreq.Denominator = 1000; 225 pVsi->TotalSize.cx = pVsi->ActiveSize.cx + VBOXVDPN_C_DISPLAY_HBLANK_SIZE;226 pVsi->TotalSize.cy = pVsi->ActiveSize.cy + VBOXVDPN_C_DISPLAY_VBLANK_SIZE;225 pVsi->TotalSize.cx = pVsi->ActiveSize.cx;// + VBOXVDPN_C_DISPLAY_HBLANK_SIZE; 226 pVsi->TotalSize.cy = pVsi->ActiveSize.cy;// + VBOXVDPN_C_DISPLAY_VBLANK_SIZE; 227 227 pVsi->PixelRate = pVsi->TotalSize.cx * pVsi->TotalSize.cy * VSync; 228 228 pVsi->HSyncFreq.Numerator = (UINT)((pVsi->PixelRate / pVsi->TotalSize.cy) * 1000); … … 527 527 D3DKMDT_2DREGION *paResolutions; 528 528 uint32_t cResolutions; 529 BOOLEAN fMatch ;529 BOOLEAN fMatched; 530 530 } VBOXVIDPNMATCHMONMODESENUM, *PVBOXVIDPNMATCHMONMODESENUM; 531 531 … … 535 535 PVBOXVIDPNMATCHMONMODESENUM pInfo = (PVBOXVIDPNMATCHMONMODESENUM)pContext; 536 536 537 Assert(pInfo->fMatch); 537 Assert(pInfo->fMatched); 538 539 BOOLEAN fFound = FALSE; 538 540 539 541 for (UINT i = 0; i < pInfo->cResolutions; ++i) 540 542 { 541 543 D3DKMDT_2DREGION *pResolution = &pInfo->paResolutions[i]; 542 if (pMonitorSMI->VideoSignalInfo.ActiveSize.cx != pResolution->cx543 || pMonitorSMI->VideoSignalInfo.ActiveSize.cy != pResolution->cy)544 { 545 pInfo->fMatch = FALSE;544 if (pMonitorSMI->VideoSignalInfo.ActiveSize.cx == pResolution->cx 545 && pMonitorSMI->VideoSignalInfo.ActiveSize.cy == pResolution->cy) 546 { 547 fFound = TRUE; 546 548 break; 547 549 } 548 550 } 549 551 552 if (!fFound) 553 pInfo->fMatched = FALSE; 554 550 555 pMonitorSMSIf->pfnReleaseModeInfo(hMonitorSMS, pMonitorSMI); 551 556 552 return pInfo->fMatch ;557 return pInfo->fMatched; 553 558 } 554 559 … … 585 590 } 586 591 587 VBOXVIDPNMATCHMONMODESENUM Info; 588 Info.paResolutions = pResolutions; 589 Info.cResolutions = cResolutions; 590 Info.fMatch = TRUE; 591 592 Status = vboxVidPnEnumMonitorSourceModes(hMonitorSMS, pMonitorSMSIf, vboxFidPnMatchMonitorModesEnum, &Info); 592 /* we care only about monitor modes covering all needed resolutions, 593 * we do NOT care if resolutions do not cover some monitor modes */ 594 SIZE_T cModes = 0; 595 Status = pMonitorSMSIf->pfnGetNumModes(hMonitorSMS, &cModes); 593 596 if (NT_SUCCESS(Status)) 594 597 { 595 *pfMatch = Info.fMatch; 596 } 598 if (cModes < cResolutions) 599 *pfMatch = FALSE; 600 else 601 { 602 VBOXVIDPNMATCHMONMODESENUM Info; 603 Info.paResolutions = pResolutions; 604 Info.cResolutions = cResolutions; 605 Info.fMatched = TRUE; 606 607 Status = vboxVidPnEnumMonitorSourceModes(hMonitorSMS, pMonitorSMSIf, vboxFidPnMatchMonitorModesEnum, &Info); 608 if (NT_SUCCESS(Status)) 609 *pfMatch = Info.fMatched; 610 } 611 } 612 else 613 WARN(("pfnGetNumModes failed, Status 0x%x", Status)); 597 614 598 615 NTSTATUS tmpStatus = pMonitorInterface->pfnReleaseMonitorSourceModeSet(pDevExt->u.primary.DxgkInterface.DeviceHandle, hMonitorSMS); … … 1299 1316 { 1300 1317 Status = vboxVidPnPopulateTargetModeInfoFromLegacy(pNewVidPnTargetModeInfo, pResolution, i == pInfo->iPreferredResolution); 1301 Assert(Status == STATUS_SUCCESS);1302 1318 if (NT_SUCCESS(Status)) 1303 1319 { … … 1309 1325 continue; 1310 1326 } 1327 else 1328 { 1329 WARN(("pfnAddMode failed, Status 0x%x", Status)); 1330 } 1331 } 1332 else 1333 { 1334 WARN(("vboxVidPnPopulateTargetModeInfoFromLegacy failed, Status 0x%x", Status)); 1311 1335 } 1312 1336 … … 1314 1338 Assert(tmpStatus == STATUS_SUCCESS); 1315 1339 } 1340 1316 1341 /* we're here because of an error */ 1317 1342 Assert(!NT_SUCCESS(Status)); 1318 break; 1343 /* ignore mode addition failure */ 1344 Status = STATUS_SUCCESS; 1345 continue; 1319 1346 } 1320 1347 }
Note:
See TracChangeset
for help on using the changeset viewer.