Changeset 47758 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 15, 2013 12:39:09 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 88016
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r47419 r47758 2460 2460 InsertConfigNode(pLunL1, "Config", &pCfg); 2461 2461 InsertConfigInteger(pCfg, "Object", (uintptr_t)pMouse); 2462 InsertConfigInteger(pCfg, "Priority", 2); /* Prefer over PS/2 */ 2462 2463 } 2463 2464 if ( aPointingHID == PointingHIDType_USBTablet -
trunk/src/VBox/Main/src-client/MouseImpl.cpp
r47701 r47758 59 59 /** The capabilities of this device. */ 60 60 uint32_t u32DevCaps; 61 /** The device priority. */ 62 uint32_t u32Priority; 61 63 }; 62 64 … … 975 977 * Validate configuration. 976 978 */ 977 if (!CFGMR3AreValuesValid(pCfg, "Object\0 "))979 if (!CFGMR3AreValuesValid(pCfg, "Object\0Priority\0")) 978 980 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 979 981 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, … … 1009 1011 } 1010 1012 pThis->pMouse = (Mouse *)pv; /** @todo Check this cast! */ 1013 /* 1014 * Get the device priority. 1015 */ 1016 rc = CFGMR3QueryU32Def(pCfg, "Priority", &pThis->u32Priority, 1); 1017 if (RT_FAILURE(rc)) 1018 { 1019 AssertMsgFailed(("Configuration error: Bad \"Priority\" value! rc=%Rrc\n", rc)); 1020 return rc; 1021 } 1011 1022 unsigned cDev; 1012 1023 { 1024 PDRVMAINMOUSE pObject = pThis; 1013 1025 AutoReadLock mouseLock(pThis->pMouse COMMA_LOCKVAL_SRC_POS); 1014 1026 1015 1027 for (cDev = 0; cDev < MOUSE_MAX_DEVICES; ++cDev) 1016 if ( !pThis->pMouse->mpDrv[cDev])1028 if (pThis->pMouse->mpDrv[cDev]) 1017 1029 { 1018 pThis->pMouse->mpDrv[cDev] = pThis; 1030 /* Fix priorities. */ 1031 if ( pThis->pMouse->mpDrv[cDev]->u32Priority 1032 <= pObject->u32Priority) 1033 { 1034 PDRVMAINMOUSE pNewObject = pThis->pMouse->mpDrv[cDev]; 1035 pThis->pMouse->mpDrv[cDev] = pObject; 1036 pObject = pNewObject; 1037 } 1038 } 1039 else 1040 { 1041 pThis->pMouse->mpDrv[cDev] = pObject; 1019 1042 break; 1020 1043 }
Note:
See TracChangeset
for help on using the changeset viewer.