- Timestamp:
- Apr 3, 2009 1:13:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/MouseFilter/VBoxMouse.cpp
r18682 r18688 186 186 if (status == STATUS_SUCCESS) 187 187 { 188 /* Check whether the device claims the IO port 0x60 . */189 BOOLEAN b Port60h= FALSE;188 /* Check whether the device claims the IO port 0x60 or interrupt 12. */ 189 BOOLEAN bDetected = FALSE; 190 190 191 191 CM_RESOURCE_LIST *pResourceList = (CM_RESOURCE_LIST *)&Property[0]; 192 192 193 dprintf(("VBoxMouse::vboxDeviceAdded: Configuration: descriptors%d\n",193 dprintf(("VBoxMouse::vboxDeviceAdded: Configuration: Number of descriptors = %d\n", 194 194 pResourceList->Count)); 195 195 … … 217 217 pPartialDescriptor->u.Generic.Start.QuadPart, pPartialDescriptor->u.Generic.Length)); 218 218 219 if (pPartialDescriptor->Type == CmResourceTypePort)219 switch(pPartialDescriptor->Type) 220 220 { 221 222 case CmResourceTypePort: 223 224 dprintf(("VBoxMouse::vboxDeviceAdded: PartialDescriptor %d: Port 0x%x\n", iPartialDescriptor, pPartialDescriptor->u.Port.Start.QuadPart)); 221 225 if (pPartialDescriptor->u.Port.Start.QuadPart == 0x60) 222 226 { 223 b Port60h= TRUE;227 bDetected = TRUE; 224 228 } 229 break; 230 231 case CmResourceTypeInterrupt: 232 233 dprintf(("VBoxMouse::vboxDeviceAdded: PartialDescriptor %d: Int %ld\n", iPartialDescriptor, pPartialDescriptor->u.Interrupt.Vector)); 234 if (pPartialDescriptor->u.Interrupt.Vector == 0x12) 235 { 236 bDetected = TRUE; 237 } 238 break; 239 240 default: 241 break; 225 242 } 226 243 } 227 244 } 228 245 229 if (b Port60h)246 if (bDetected) 230 247 { 231 248 /* It's the emulated 8042 PS/2 mouse/kbd device, so mark it as the Host one. … … 234 251 InterlockedExchange (&g_ctx.fHostMouseFound, TRUE); 235 252 devExt->HostMouse = TRUE; 236 dprintf(("VBoxMouse::vboxDeviceAdded: host mouse found.\n"));253 dprintf(("VBoxMouse::vboxDeviceAdded: Host mouse found.\n")); 237 254 } 238 255 } … … 274 291 dprintf(("VBoxMouse::vboxDeviceRemoved: the request allocation has failed.\n")); 275 292 } 276 293 277 294 InterlockedExchange (&g_ctx.fHostInformed, FALSE); 278 295 } … … 303 320 static void vboxInformHost (PDEVICE_EXTENSION devExt) 304 321 { 305 dprintf (("VBoxMouse::vboxInformHost: %p\n", devExt));322 dprintf (("VBoxMouse::vboxInformHost: DevExt=%p, HostMouse=%d\n", devExt, devExt->HostMouse)); 306 323 307 324 if (vboxIsVBGLInited ())
Note:
See TracChangeset
for help on using the changeset viewer.