Changeset 39525 in vbox for trunk/src/VBox
- Timestamp:
- Dec 5, 2011 12:41:59 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r39524 r39525 3743 3743 /* set screen layout (unused currently) */ 3744 3744 Assert(pEscape->PrivateDriverDataSize >= sizeof (VBOXDISPIFESCAPE_SCREENLAYOUT)); 3745 if (pEscape->PrivateDriverDataSize >=sizeof (VBOXDISPIFESCAPE_SCREENLAYOUT))3745 if (pEscape->PrivateDriverDataSize < sizeof (VBOXDISPIFESCAPE_SCREENLAYOUT)) 3746 3746 { 3747 PVBOXDISPIFESCAPE_SCREENLAYOUT pLo = (PVBOXDISPIFESCAPE_SCREENLAYOUT)pEscapeHdr; 3748 Assert(pLo->ScreenLayout.cScreens <= (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays); 3749 for (UINT i = 0; i < pLo->ScreenLayout.cScreens; ++i) 3750 { 3751 PVBOXSCREENLAYOUT_ELEMENT pEl = &pLo->ScreenLayout.aScreens[i]; 3752 Assert(pEl->VidPnSourceId < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays); 3753 if (pEl->VidPnSourceId < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays) 3754 { 3755 PVBOXWDDM_SOURCE pSource = &pDevExt->aSources[pEl->VidPnSourceId]; 3756 NTSTATUS tmpStatus = vboxWddmGhDisplayUpdateScreenPos(pDevExt, pSource, &pEl->pos); 3757 Assert(tmpStatus == STATUS_SUCCESS); 3758 } 3759 } 3760 Status = STATUS_SUCCESS; 3747 WARN(("VBOXESC_SCREENLAYOUT: incorrect buffer size (%d) < sizeof (VBOXDISPIFESCAPE_SCREENLAYOUT) (%d)", 3748 pEscape->PrivateDriverDataSize, sizeof (VBOXDISPIFESCAPE_SCREENLAYOUT))); 3749 Status = STATUS_INVALID_PARAMETER; 3761 3750 break; 3762 3751 } 3763 else 3752 3753 PVBOXDISPIFESCAPE_SCREENLAYOUT pLo = (PVBOXDISPIFESCAPE_SCREENLAYOUT)pEscapeHdr; 3754 if (pLo->ScreenLayout.cScreens > (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays) 3764 3755 { 3765 LOGREL(("VBOXESC_SCREENLAYOUT: incorrect buffer size (%d) < sizeof (VBOXDISPIFESCAPE_SCREENLAYOUT) (%d)", 3766 pEscape->PrivateDriverDataSize, sizeof (VBOXDISPIFESCAPE_SCREENLAYOUT))); 3767 AssertBreakpoint(); 3756 WARN(("VBOXESC_SCREENLAYOUT: number of screens too big (%d), should be <= (%d)", 3757 pLo->ScreenLayout.cScreens, VBoxCommonFromDeviceExt(pDevExt)->cDisplays)); 3768 3758 Status = STATUS_INVALID_PARAMETER; 3759 break; 3769 3760 } 3761 3762 for (UINT i = 0; i < pLo->ScreenLayout.cScreens; ++i) 3763 { 3764 PVBOXSCREENLAYOUT_ELEMENT pEl = &pLo->ScreenLayout.aScreens[i]; 3765 Assert(pEl->VidPnSourceId < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays); 3766 if (pEl->VidPnSourceId < (UINT)VBoxCommonFromDeviceExt(pDevExt)->cDisplays) 3767 { 3768 PVBOXWDDM_SOURCE pSource = &pDevExt->aSources[pEl->VidPnSourceId]; 3769 NTSTATUS tmpStatus = vboxWddmGhDisplayUpdateScreenPos(pDevExt, pSource, &pEl->pos); 3770 Assert(tmpStatus == STATUS_SUCCESS); 3771 } 3772 } 3773 3774 Status = STATUS_SUCCESS; 3775 break; 3770 3776 } 3771 3777 case VBOXESC_SWAPCHAININFO:
Note:
See TracChangeset
for help on using the changeset viewer.