VirtualBox

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


Ignore:
Timestamp:
Jun 12, 2015 6:10:56 AM (9 years ago)
Author:
vboxsync
Message:

Windows guest additions, VBVA: host mouse cursor capability.

Location:
trunk/src/VBox/Additions/common/VBoxVideo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp

    r56322 r56378  
    492492 * @param  u32Index  the index of the parameter to query,
    493493 *                   @see VBVACONF32::u32Index
     494 * @param  u32DefValue defaut value
    494495 * @param  pulValue  where to store the value of the parameter on success
    495496 */
    496 RTDECL(int) VBoxQueryConfHGSMI(PHGSMIGUESTCOMMANDCONTEXT pCtx,
    497                                uint32_t u32Index, uint32_t *pulValue)
     497RTDECL(int) VBoxQueryConfHGSMIDef(PHGSMIGUESTCOMMANDCONTEXT pCtx,
     498                                  uint32_t u32Index, uint32_t u32DefValue, uint32_t *pulValue)
    498499{
    499500    int rc = VINF_SUCCESS;
     
    512513        /* Prepare data to be sent to the host. */
    513514        p->u32Index = u32Index;
    514         p->u32Value = UINT32_MAX;
     515        p->u32Value = u32DefValue;
    515516        rc = VBoxHGSMIBufferSubmit(pCtx, p);
    516517        if (RT_SUCCESS(rc))
     
    528529}
    529530
     531RTDECL(int) VBoxQueryConfHGSMI(PHGSMIGUESTCOMMANDCONTEXT pCtx,
     532                               uint32_t u32Index, uint32_t *pulValue)
     533{
     534    return VBoxQueryConfHGSMIDef(pCtx, u32Index, UINT32_MAX, pulValue);
     535}
    530536
    531537/**
  • trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp

    r56354 r56378  
    373373{
    374374    uint32_t u32Flags = 0;
    375     int rc = VBoxQueryConfHGSMI(pCtx, VBOX_VBVA_CONF32_SCREEN_FLAGS, &u32Flags);
     375    int rc = VBoxQueryConfHGSMIDef(pCtx, VBOX_VBVA_CONF32_SCREEN_FLAGS, 0, &u32Flags);
    376376    LogFunc(("u32Flags = 0x%x rc %Rrc\n", u32Flags, rc));
    377377    if (RT_FAILURE(rc))
     
    379379    return (uint16_t)u32Flags;
    380380}
     381
     382
     383/**
     384 * Query the mouse cursor flags VBVA_MOUSE_CURSOR_*.
     385 *
     386 * @returns The mask of VBVA_MOUSE_CURSOR_* flags or 0 if host does not support the request.
     387 * @param  pCtx  the context containing the heap to use
     388 */
     389RTDECL(uint32_t) VBoxHGSMIGetMouseCursorFlags(PHGSMIGUESTCOMMANDCONTEXT pCtx)
     390{
     391    uint32_t u32Flags = 0;
     392    int rc = VBoxQueryConfHGSMIDef(pCtx, VBOX_VBVA_CONF32_MOUSE_CURSOR, 0, &u32Flags);
     393    LogFunc(("u32Flags = 0x%x rc %Rrc\n", u32Flags, rc));
     394    if (RT_FAILURE(rc))
     395        u32Flags = 0;
     396    return u32Flags;
     397}
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