VirtualBox

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


Ignore:
Timestamp:
Feb 7, 2008 2:35:49 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27973
Message:

Additions/common: fixed the guest R3 library display change query function - display is an out parameter, not an in parameter

File:
1 edited

Legend:

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

    r6842 r6849  
    119119 * @param   pcy         Where to store the vertical pixel resolution (0 = do not change).
    120120 * @param   pcBits      Where to store the bits per pixel (0 = do not change).
    121  * @param   fEventAck   Flag that the request is an acknowlegement for the
    122  *                      VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST.
    123  *                      Values:
    124  *                          0                                   - just querying,
    125  *                          VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST - event acknowledged.
    126  * @param   iDisplay    0 for primary display, 1 for the first secondary, etc.
    127  */
    128 VBGLR3DECL(int) VbglR3GetDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits,
    129                                               uint32_t fEventAck, uint32_t iDisplay)
    130 {
    131     VMMDevDisplayChangeRequest2 Req;
    132     vmmdevInitRequest(&Req.header, VMMDevReq_GetDisplayChangeRequest2);
    133     Req.xres = 0;
    134     Req.yres = 0;
    135     Req.bpp = 0;
    136     Req.eventAck = fEventAck;
    137     Req.display = iDisplay;
     121 * @param   iDisplay    Where to store the display number the request was for - 0 for the
     122 *                      primary display, 1 for the first secondary, etc.
     123 */
     124VBGLR3DECL(int) VbglR3GetLastDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits,
     125                                                 uint32_t *piDisplay)
     126{
     127    VMMDevDisplayChangeRequest2 Req = { { 0 } };
     128
     129#ifndef VBOX_VBGLR3_XFREE86
     130    AssertPtrReturn(pcx, VERR_INVALID_PARAMETER);
     131    AssertPtrReturn(pcy, VERR_INVALID_PARAMETER);
     132    AssertPtrReturn(pcBits, VERR_INVALID_PARAMETER);
     133    AssertPtrReturn(piDisplay, VERR_INVALID_PARAMETER);
     134#endif
     135vmmdevInitRequest(&Req.header, VMMDevReq_GetDisplayChangeRequest2);
    138136    int rc = vbglR3GRPerform(&Req.header);
    139137    if (RT_SUCCESS(rc))
     
    144142        *pcy = Req.yres;
    145143        *pcBits = Req.bpp;
     144        *piDisplay = Req.display;
    146145    }
    147146    return rc;
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