vbox的更動 2246 路徑 trunk/src/VBox/Devices/Input/DevPS2.cpp
- 時間撮記:
- 2007-4-19 下午09:34:32 (18 年 以前)
- 檔案:
-
- 移動 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Input/DevPS2.cpp
r2241 r2246 70 70 * Internal Functions * 71 71 *******************************************************************************/ 72 __BEGIN_DECLS 72 73 PDMBOTHCBDECL(int) kbdIOPortDataRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb); 73 74 PDMBOTHCBDECL(int) kbdIOPortDataWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb); 74 75 PDMBOTHCBDECL(int) kbdIOPortStatusRead(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t *pu32, unsigned cb); 75 76 PDMBOTHCBDECL(int) kbdIOPortCommandWrite(PPDMDEVINS pDevIns, void *pvUser, RTIOPORT Port, uint32_t u32, unsigned cb); 76 77 __END_DECLS 77 78 #endif /* !VBOX_DEVICE_STRUCT_TESTCASE */ 78 79 #endif /* VBOX */ … … 380 381 static void pc_kbd_put_keycode(void *opaque, int keycode) 381 382 { 382 KBDState *s = opaque;383 KBDState *s = (KBDState*)opaque; 383 384 kbd_queue(s, keycode, 0); 384 385 } … … 387 388 static uint32_t kbd_read_status(void *opaque, uint32_t addr) 388 389 { 389 KBDState *s = opaque;390 KBDState *s = (KBDState*)opaque; 390 391 int val; 391 392 val = s->status; … … 404 405 int rc = VINF_SUCCESS; 405 406 #endif /* VBOX */ 406 KBDState *s = opaque;407 KBDState *s = (KBDState*)opaque; 407 408 408 409 #ifdef DEBUG_KBD … … 515 516 static uint32_t kbd_read_data(void *opaque, uint32_t addr) 516 517 { 517 KBDState *s = opaque;518 KBDState *s = (KBDState*)opaque; 518 519 KBDQueue *q; 519 520 #ifdef VBOX … … 654 655 { 655 656 #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); 661 664 s->Keyboard.pDrv->pfnLedStatusChange(s->Keyboard.pDrv, enmLeds); 662 665 #else … … 749 752 int dx, int dy, int dz, int buttons_state) 750 753 { 751 KBDState *s = opaque;754 KBDState *s = (KBDState*)opaque; 752 755 753 756 /* check if deltas are recorded when disabled */ … … 945 948 int rc = VINF_SUCCESS; 946 949 #endif /* VBOX */ 947 KBDState *s = opaque;950 KBDState *s = (KBDState*)opaque; 948 951 949 952 #ifdef DEBUG_KBD … … 1007 1010 static void kbd_reset(void *opaque) 1008 1011 { 1009 KBDState *s = opaque;1012 KBDState *s = (KBDState*)opaque; 1010 1013 KBDQueue *q; 1011 1014 #ifdef VBOX … … 1202 1205 if (VBOX_FAILURE(rc)) 1203 1206 return rc; 1204 if (u32 != ~0 )1207 if (u32 != ~0U) 1205 1208 { 1206 1209 AssertMsgFailed(("u32=%#x\n", u32)); … … 1496 1499 if (VBOX_SUCCESS(rc)) 1497 1500 { 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)); 1499 1502 if (!pData->Keyboard.pDrv) 1500 1503 { … … 1517 1520 if (VBOX_SUCCESS(rc)) 1518 1521 { 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)); 1520 1523 if (!pData->Mouse.pDrv) 1521 1524 {
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器