VirtualBox

Changeset 8366 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Apr 24, 2008 3:02:20 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30152
Message:

Additions/X11, Additions/common: report the maximum supported resolution in the X11 additions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp

    r8155 r8366  
    235235    return fRc;
    236236}
     237
     238
     239/**
     240 * Report the maximum resolution that we currently support to the host.
     241 *
     242 * @returns iprt status value
     243 * @param   u32Width   the maximum horizontal resolution
     244 * @param   u32Height  the maximum vertical resolution
     245 */
     246VBGLR3DECL(int) VbglR3ReportMaxGuestResolution(uint32_t u32Width, uint32_t u32Height)
     247{
     248    int rc = VERR_UNRESOLVED_ERROR;
     249    VMMDevReqGuestResolution req;
     250
     251    vmmdevInitRequest(&req.header, VMMDevReq_SetMaxGuestResolution);
     252    req.u32MaxWidth      = u32Width;
     253    req.u32MaxHeight     = u32Height;
     254    rc = vbglR3GRPerform(&req.header);
     255    if (!RT_SUCCESS(rc) || !RT_SUCCESS(req.header.rc))
     256        LogRelFunc(("error reporting maximum supported resolution to VMMDev. "
     257                    "rc = %Vrc, VMMDev rc = %Vrc\n", rc, req.header.rc));
     258    if (RT_SUCCESS(rc))
     259        rc = req.header.rc;
     260    return rc;
     261}
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