VirtualBox

Changeset 91881 in vbox


Ignore:
Timestamp:
Oct 20, 2021 11:37:30 AM (3 years ago)
Author:
vboxsync
Message:

Devices/Input: Change the USB keyboard and mouse device emulations to access the CFGM API through the USB helper callback table only, bugref:10074

Location:
trunk/src/VBox/Devices/Input
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/UsbKbd.cpp

    r90700 r91881  
    17591759    RT_NOREF1(pCfgGlobal);
    17601760    PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns);
    1761     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     1761    PUSBHID     pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     1762    PCPDMUSBHLP pHlp  = pUsbIns->pHlpR3;
    17621763    Log(("usbHidConstruct/#%u:\n", iInstance));
    17631764
     
    17811782     * Validate and read the configuration.
    17821783     */
    1783     rc = CFGMR3ValidateConfig(pCfg, "/", "Mode", "Config", "UsbHid", iInstance);
     1784    rc = pHlp->pfnCFGMValidateConfig(pCfg, "/", "Mode", "Config", "UsbHid", iInstance);
    17841785    if (RT_FAILURE(rc))
    17851786        return rc;
    17861787    char szMode[64];
    1787     rc = CFGMR3QueryStringDef(pCfg, "Mode", szMode, sizeof(szMode), "basic");
     1788    rc = pHlp->pfnCFGMQueryStringDef(pCfg, "Mode", szMode, sizeof(szMode), "basic");
    17881789    if (RT_FAILURE(rc))
    17891790        return PDMUsbHlpVMSetError(pUsbIns, rc, RT_SRC_POS, N_("HID failed to query settings"));
  • trunk/src/VBox/Devices/Input/UsbMouse.cpp

    r90993 r91881  
    23582358    RT_NOREF1(pCfgGlobal);
    23592359    PDMUSB_CHECK_VERSIONS_RETURN(pUsbIns);
    2360     PUSBHID pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     2360    PUSBHID     pThis = PDMINS_2_DATA(pUsbIns, PUSBHID);
     2361    PCPDMUSBHLP pHlp  = pUsbIns->pHlpR3;
     2362
    23612363    LogRelFlow(("usbHidConstruct/#%u:\n", iInstance));
    23622364
     
    23792381     * Validate and read the configuration.
    23802382     */
    2381     rc = CFGMR3ValidateConfig(pCfg, "/", "Mode|CoordShift", "Config", "UsbHid", iInstance);
     2383    rc = pHlp->pfnCFGMValidateConfig(pCfg, "/", "Mode|CoordShift", "Config", "UsbHid", iInstance);
    23822384    if (RT_FAILURE(rc))
    23832385        return rc;
    23842386    char szMode[64];
    2385     rc = CFGMR3QueryStringDef(pCfg, "Mode", szMode, sizeof(szMode), "relative");
     2387    rc = pHlp->pfnCFGMQueryStringDef(pCfg, "Mode", szMode, sizeof(szMode), "relative");
    23862388    if (RT_FAILURE(rc))
    23872389        return PDMUsbHlpVMSetError(pUsbIns, rc, RT_SRC_POS, N_("HID failed to query settings"));
     
    24142416        return PDMUsbHlpVMSetError(pUsbIns, VERR_PDM_MISSING_INTERFACE, RT_SRC_POS, N_("HID failed to query mouse interface"));
    24152417
    2416     rc = CFGMR3QueryU8Def(pCfg, "CoordShift", &pThis->u8CoordShift, 1);
     2418    rc = pHlp->pfnCFGMQueryU8Def(pCfg, "CoordShift", &pThis->u8CoordShift, 1);
    24172419    if (RT_FAILURE(rc))
    24182420        return PDMUsbHlpVMSetError(pUsbIns, rc, RT_SRC_POS, N_("HID failed to query shift factor"));
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