VirtualBox

Ignore:
Timestamp:
Mar 10, 2008 2:50:08 PM (17 years ago)
Author:
vboxsync
Message:

VMMDev: added VMMDEV_GUEST_SUPPORTS_GRAPHICS capability, enabled by default, to distinguish cases where the guest additions are loaded but graphics are not supported

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r6915 r7409  
    521521                VMMDevReqGuestCapabilities *guestCaps = (VMMDevReqGuestCapabilities*)pRequestHeader;
    522522
     523                /* Enable this automatically for guests using the old
     524                   request to report their capabilities. */
     525                /** @todo change this when we next bump the interface version */
     526                guestCaps->caps |= VMMDEV_GUEST_SUPPORTS_GRAPHICS;
    523527                if (pData->guestCaps != guestCaps->caps)
    524528                {
     
    528532                    LogRel(("Guest Additions capability report: (0x%x) "
    529533                            "VMMDEV_GUEST_SUPPORTS_SEAMLESS: %s "
    530                             "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s\n",
     534                            "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s"
     535                            "VMMDEV_GUEST_SUPPORTS_GRAPHICS: %s\n",
    531536                            guestCaps->caps,
    532537                            guestCaps->caps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
    533                             guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no"));
     538                            guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no",
     539                            guestCaps->caps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no"));
    534540
    535541                    pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, guestCaps->caps);
    536542                }
     543                pRequestHeader->rc = VINF_SUCCESS;
     544            }
     545            break;
     546        }
     547
     548        /* Change guest capabilities */
     549        case VMMDevReq_SetGuestCapabilities:
     550        {
     551            if (pRequestHeader->size != sizeof(VMMDevReqGuestCapabilities2))
     552            {
     553                AssertMsgFailed(("VMMDev guest caps structure has invalid size!\n"));
     554                pRequestHeader->rc = VERR_INVALID_PARAMETER;
     555            }
     556            else
     557            {
     558                VMMDevReqGuestCapabilities2 *guestCaps = (VMMDevReqGuestCapabilities2*)pRequestHeader;
     559
     560                pData->guestCaps |= guestCaps->u32OrMask;
     561                pData->guestCaps &= ~guestCaps->u32NotMask;
     562
     563                LogRel(("Guest Additions capability report: (0x%x) "
     564                        "VMMDEV_GUEST_SUPPORTS_SEAMLESS: %s "
     565                        "VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING: %s"
     566                        "VMMDEV_GUEST_SUPPORTS_GRAPHICS: %s\n",
     567                        pData->guestCaps,
     568                        pData->guestCaps & VMMDEV_GUEST_SUPPORTS_SEAMLESS ? "yes" : "no",
     569                        pData->guestCaps & VMMDEV_GUEST_SUPPORTS_GUEST_HOST_WINDOW_MAPPING ? "yes" : "no",
     570                        pData->guestCaps & VMMDEV_GUEST_SUPPORTS_GRAPHICS ? "yes" : "no"));
     571
     572                pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps);
    537573                pRequestHeader->rc = VINF_SUCCESS;
    538574            }
     
    22942330    pData->fu32AdditionsOk = false;
    22952331    memset (&pData->guestInfo, 0, sizeof (pData->guestInfo));
    2296     pData->guestCaps = 0;
    22972332
    22982333    memset (&pData->lastReadDisplayChangeRequest, 0, sizeof (pData->lastReadDisplayChangeRequest));
     
    23162351    pData->u32NewGuestFilterMask = 0;
    23172352    pData->fNewGuestFilterMask   = 0;
     2353
     2354    /* This is the default, as Windows and OS/2 guests take this for granted. */
     2355    /** @todo change this when we next bump the interface version */
     2356    pData->guestCaps = VMMDEV_GUEST_SUPPORTS_GRAPHICS;
     2357    pData->pDrv->pfnUpdateGuestCapabilities(pData->pDrv, pData->guestCaps);
    23182358}
    23192359
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette