Changeset 3110 in vbox for trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
- Timestamp:
- Jun 14, 2007 4:18:18 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r2981 r3110 773 773 } 774 774 775 case VMMDevReq_GetDisplayChangeRequest2: 776 { 777 if (requestHeader->size != sizeof(VMMDevDisplayChangeRequest2)) 778 { 779 requestHeader->rc = VERR_INVALID_PARAMETER; 780 } 781 else 782 { 783 VMMDevDisplayChangeRequest2 *displayChangeRequest = (VMMDevDisplayChangeRequest2*)requestHeader; 784 /* just pass on the information */ 785 Log(("VMMDev: returning display change request xres = %d, yres = %d, bpp = %d at %d\n", 786 pData->displayChangeRequest.xres, pData->displayChangeRequest.yres, pData->displayChangeRequest.bpp, pData->displayChangeRequest.display)); 787 displayChangeRequest->xres = pData->displayChangeRequest.xres; 788 displayChangeRequest->yres = pData->displayChangeRequest.yres; 789 displayChangeRequest->bpp = pData->displayChangeRequest.bpp; 790 displayChangeRequest->display = pData->displayChangeRequest.display; 791 792 if (displayChangeRequest->eventAck == VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST) 793 { 794 /* Remember which resolution the client have queried. */ 795 pData->lastReadDisplayChangeRequest = pData->displayChangeRequest; 796 } 797 798 requestHeader->rc = VINF_SUCCESS; 799 } 800 break; 801 } 802 775 803 /* 776 804 * Query whether the given video mode is supported … … 1374 1402 1375 1403 1376 static DECLCALLBACK(int) vmmdevRequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t xres, uint32_t yres, uint32_t bpp )1404 static DECLCALLBACK(int) vmmdevRequestDisplayChange(PPDMIVMMDEVPORT pInterface, uint32_t xres, uint32_t yres, uint32_t bpp, uint32_t display) 1377 1405 { 1378 1406 VMMDevState *pData = IVMMDEVPORT_2_VMMDEVSTATE(pInterface); … … 1381 1409 bool fSameResolution = (!xres || (pData->lastReadDisplayChangeRequest.xres == xres)) && 1382 1410 (!yres || (pData->lastReadDisplayChangeRequest.yres == yres)) && 1383 (!bpp || (pData->lastReadDisplayChangeRequest.bpp == bpp)); 1411 (!bpp || (pData->lastReadDisplayChangeRequest.bpp == bpp)) && 1412 pData->lastReadDisplayChangeRequest.display == display; 1384 1413 1385 1414 if (!xres && !yres && !bpp) … … 1390 1419 1391 1420 #ifdef DEBUG_sunlover 1392 Log(("vmmdevRequestDisplayChange: same=%d. new: xres=%d, yres=%d, bpp=%d . old: xres=%d, yres=%d, bpp=%d.\n",1393 fSameResolution, xres, yres, bpp, pData->lastReadDisplayChangeRequest.xres, pData->lastReadDisplayChangeRequest.yres, pData->lastReadDisplayChangeRequest.bpp));1421 Log(("vmmdevRequestDisplayChange: same=%d. new: xres=%d, yres=%d, bpp=%d, display=%d. old: xres=%d, yres=%d, bpp=%d, display=%d.\n", 1422 fSameResolution, xres, yres, bpp, display, pData->lastReadDisplayChangeRequest.xres, pData->lastReadDisplayChangeRequest.yres, pData->lastReadDisplayChangeRequest.bpp, pData->lastReadDisplayChangeRequest.display)); 1394 1423 #endif /* DEBUG_sunlover */ 1395 1424 1396 1425 if (!fSameResolution) 1397 1426 { 1398 LogRel(("VMMDev::SetVideoModeHint: got a video mode hint (%dx%dx%d) \n",1399 xres, yres, bpp ));1427 LogRel(("VMMDev::SetVideoModeHint: got a video mode hint (%dx%dx%d) at %d\n", 1428 xres, yres, bpp, display)); 1400 1429 1401 1430 /* we could validate the information here but hey, the guest can do that as well! */ 1402 pData->displayChangeRequest.xres = xres; 1403 pData->displayChangeRequest.yres = yres; 1404 pData->displayChangeRequest.bpp = bpp; 1431 pData->displayChangeRequest.xres = xres; 1432 pData->displayChangeRequest.yres = yres; 1433 pData->displayChangeRequest.bpp = bpp; 1434 pData->displayChangeRequest.display = display; 1405 1435 1406 1436 /* IRQ so the guest knows what's going on */
Note:
See TracChangeset
for help on using the changeset viewer.