Changeset 28264 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Apr 13, 2010 4:01:51 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.cpp
r27286 r28264 115 115 } 116 116 117 BOOLEAN vboxLikesVideoMode(uint32_t width, uint32_t height, uint32_t bpp)117 BOOLEAN vboxLikesVideoMode(uint32_t display, uint32_t width, uint32_t height, uint32_t bpp) 118 118 { 119 119 BOOLEAN bRC = FALSE; 120 120 121 VMMDevVideoModeSupportedRequest *req= NULL;122 123 int rc = VbglGRAlloc((VMMDevRequestHeader**)&req , sizeof(VMMDevVideoModeSupportedRequest), VMMDevReq_VideoModeSupported);121 VMMDevVideoModeSupportedRequest2 *req2 = NULL; 122 123 int rc = VbglGRAlloc((VMMDevRequestHeader**)&req2, sizeof(VMMDevVideoModeSupportedRequest2), VMMDevReq_VideoModeSupported2); 124 124 if (RT_FAILURE(rc)) 125 125 { … … 132 132 else 133 133 { 134 req->width = width; 135 req->height = height; 136 req->bpp = bpp; 137 rc = VbglGRPerform(&req->header); 138 if (RT_SUCCESS(rc)) 139 { 140 bRC = req->fSupported; 134 req2->display = display; 135 req2->width = width; 136 req2->height = height; 137 req2->bpp = bpp; 138 rc = VbglGRPerform(&req2->header); 139 if (RT_SUCCESS(rc) && RT_SUCCESS(req2->header.rc)) 140 { 141 bRC = req2->fSupported; 141 142 } 142 143 else 143 144 { 144 dprintf(("VBoxVideo::vboxLikesVideoMode: ERROR querying video mode supported status from VMMDev." 145 "rc = %Rrc\n", rc)); 146 } 147 VbglGRFree(&req->header); 145 /* Retry using old inteface. */ 146 AssertCompile(sizeof(VMMDevVideoModeSupportedRequest2) >= sizeof(VMMDevVideoModeSupportedRequest)); 147 VMMDevVideoModeSupportedRequest *req = (VMMDevVideoModeSupportedRequest *)req2; 148 req->header.size = sizeof(VMMDevVideoModeSupportedRequest); 149 req->header.version = VMMDEV_REQUEST_HEADER_VERSION; 150 req->header.requestType = VMMDevReq_VideoModeSupported; 151 req->header.rc = VERR_GENERAL_FAILURE; 152 req->header.reserved1 = 0; 153 req->header.reserved2 = 0; 154 req->width = width; 155 req->height = height; 156 req->bpp = bpp; 157 158 rc = VbglGRPerform(&req->header); 159 if (RT_SUCCESS(rc) && RT_SUCCESS(req->header.rc)) 160 { 161 bRC = req->fSupported; 162 } 163 else 164 { 165 dprintf(("VBoxVideo::vboxLikesVideoMode: ERROR querying video mode supported status from VMMDev." 166 "rc = %Rrc\n", rc)); 167 } 168 } 169 VbglGRFree(&req2->header); 148 170 } 149 171 -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/Helper.h
r27205 r28264 36 36 { 37 37 BOOLEAN vboxQueryDisplayRequest(uint32_t *xres, uint32_t *yres, uint32_t *bpp, uint32_t *pDisplayId); 38 BOOLEAN vboxLikesVideoMode(uint32_t width, uint32_t height, uint32_t bpp);38 BOOLEAN vboxLikesVideoMode(uint32_t display, uint32_t width, uint32_t height, uint32_t bpp); 39 39 ULONG vboxGetHeightReduction(); 40 40 BOOLEAN vboxQueryPointerPos(uint16_t *pointerXPos, uint16_t *pointerYPos); -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r28228 r28264 483 483 484 484 /* does the host like that mode? */ 485 if (!vboxLikesVideoMode( resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 8))485 if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 8)) 486 486 { 487 487 ++matrixIndex; … … 545 545 546 546 /* does the host like that mode? */ 547 if (!vboxLikesVideoMode( resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 16))547 if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 16)) 548 548 { 549 549 ++matrixIndex; … … 605 605 606 606 /* does the host like that mode? */ 607 if (!vboxLikesVideoMode( resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 24))607 if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 24)) 608 608 { 609 609 ++matrixIndex; … … 665 665 666 666 /* does the host like that mode? */ 667 if (!vboxLikesVideoMode( resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 32))667 if (!vboxLikesVideoMode(DeviceExtension->iDevice, resolutionMatrix[matrixIndex].xRes, resolutionMatrix[matrixIndex].yRes - yOffset, 32)) 668 668 { 669 669 ++matrixIndex; … … 749 749 750 750 /* third test: does the host like the video mode? */ 751 if (!vboxLikesVideoMode( xres, yres, bpp))751 if (!vboxLikesVideoMode(DeviceExtension->iDevice, xres, yres, bpp)) 752 752 break; 753 753 … … 981 981 982 982 /* does the host like that mode? */ 983 if (vboxLikesVideoMode( xres, yres, bpp))983 if (vboxLikesVideoMode(DeviceExtension->iDevice, xres, yres, bpp)) 984 984 { 985 985 /* we must have a valid video mode by now and it must fit within the VRAM */
Note:
See TracChangeset
for help on using the changeset viewer.