VirtualBox

忽略:
時間撮記:
2007-4-19 下午09:34:32 (18 年 以前)
作者:
vboxsync
訊息:

Input/pckbd.c => Input/DevPS2.cpp

檔案:
移動 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Input/DevPS2.cpp

    r2241 r2246  
    7070*   Internal Functions                                                         *
    7171*******************************************************************************/
     72__BEGIN_DECLS
    7273PDMBOTHCBDECL(int) kbdIOPortDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb);
    7374PDMBOTHCBDECL(int) kbdIOPortDataWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb);
    7475PDMBOTHCBDECL(int) kbdIOPortStatusRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb);
    7576PDMBOTHCBDECL(int) kbdIOPortCommandWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb);
    76 
     77__END_DECLS
    7778#endif /* !VBOX_DEVICE_STRUCT_TESTCASE */
    7879#endif /* VBOX */
     
    380381static void pc_kbd_put_keycode(void *opaque, int keycode)
    381382{
    382     KBDState *s = opaque;
     383    KBDState *s = (KBDState*)opaque;
    383384    kbd_queue(s, keycode, 0);
    384385}
     
    387388static uint32_t kbd_read_status(void *opaque, uint32_t addr)
    388389{
    389     KBDState *s = opaque;
     390    KBDState *s = (KBDState*)opaque;
    390391    int val;
    391392    val = s->status;
     
    404405    int rc = VINF_SUCCESS;
    405406#endif /* VBOX */
    406     KBDState *s = opaque;
     407    KBDState *s = (KBDState*)opaque;
    407408
    408409#ifdef DEBUG_KBD
     
    515516static uint32_t kbd_read_data(void *opaque, uint32_t addr)
    516517{
    517     KBDState *s = opaque;
     518    KBDState *s = (KBDState*)opaque;
    518519    KBDQueue *q;
    519520#ifdef VBOX
     
    654655        {
    655656#ifdef IN_RING3
    656             PDMKEYBLEDS enmLeds = 0
    657                                 | ((val & 0x01) ? PDMKEYBLEDS_SCROLLLOCK : 0)
    658                                 | ((val & 0x02) ? PDMKEYBLEDS_NUMLOCK    : 0)
    659                                 | ((val & 0x04) ? PDMKEYBLEDS_CAPSLOCK   : 0)
    660                                 ;
     657            PDMKEYBLEDS enmLeds = PDMKEYBLEDS_NONE;
     658            if (val & 0x01)
     659                enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_SCROLLLOCK);
     660            if (val & 0x02)
     661                enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_NUMLOCK);
     662            if (val & 0x04)
     663                enmLeds = (PDMKEYBLEDS)(enmLeds | PDMKEYBLEDS_CAPSLOCK);
    661664            s->Keyboard.pDrv->pfnLedStatusChange(s->Keyboard.pDrv, enmLeds);
    662665#else
     
    749752                               int dx, int dy, int dz, int buttons_state)
    750753{
    751     KBDState *s = opaque;
     754    KBDState *s = (KBDState*)opaque;
    752755
    753756    /* check if deltas are recorded when disabled */
     
    945948    int rc = VINF_SUCCESS;
    946949#endif /* VBOX */
    947     KBDState *s = opaque;
     950    KBDState *s = (KBDState*)opaque;
    948951
    949952#ifdef DEBUG_KBD
     
    10071010static void kbd_reset(void *opaque)
    10081011{
    1009     KBDState *s = opaque;
     1012    KBDState *s = (KBDState*)opaque;
    10101013    KBDQueue *q;
    10111014#ifdef VBOX
     
    12021205    if (VBOX_FAILURE(rc))
    12031206        return rc;
    1204     if (u32 != ~0)
     1207    if (u32 != ~0U)
    12051208    {
    12061209        AssertMsgFailed(("u32=%#x\n", u32));
     
    14961499            if (VBOX_SUCCESS(rc))
    14971500            {
    1498                 pData->Keyboard.pDrv = pData->Keyboard.pDrvBase->pfnQueryInterface(pData->Keyboard.pDrvBase, PDMINTERFACE_KEYBOARD_CONNECTOR);
     1501                pData->Keyboard.pDrv = (PDMIKEYBOARDCONNECTOR*)(pData->Keyboard.pDrvBase->pfnQueryInterface(pData->Keyboard.pDrvBase, PDMINTERFACE_KEYBOARD_CONNECTOR));
    14991502                if (!pData->Keyboard.pDrv)
    15001503                {
     
    15171520            if (VBOX_SUCCESS(rc))
    15181521            {
    1519                 pData->Mouse.pDrv = pData->Mouse.pDrvBase->pfnQueryInterface(pData->Mouse.pDrvBase, PDMINTERFACE_MOUSE_CONNECTOR);
     1522                pData->Mouse.pDrv = (PDMIMOUSECONNECTOR*)(pData->Mouse.pDrvBase->pfnQueryInterface(pData->Mouse.pDrvBase, PDMINTERFACE_MOUSE_CONNECTOR));
    15201523                if (!pData->Mouse.pDrv)
    15211524                {
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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