Changeset 63068 in vbox for trunk/src/VBox/Additions/WINNT/Mouse
- Timestamp:
- Aug 5, 2016 9:56:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Mouse/NT4/VBoxPS2NT.cpp
r63067 r63068 2480 2480 static NTSTATUS KbdInitHw(PDEVICE_OBJECT pDevObj) 2481 2481 { 2482 NTSTATUS status ;2482 NTSTATUS status = STATUS_SUCCESS; /* Shut up MSC. */ 2483 2483 BOOLEAN fWaitForAck = TRUE; 2484 2484 PDEVEXT pDevExt = (PDEVEXT)pDevObj->DeviceExtension; … … 2495 2495 if (NT_SUCCESS(status)) 2496 2496 break; 2497 if (status == STATUS_IO_TIMEOUT) 2498 { 2499 LARGE_INTEGER nextQuery, difference, tenSeconds; 2500 KeStallExecutionProcessor(50); 2501 KeQueryTickCount(&nextQuery); 2502 difference.QuadPart = nextQuery.QuadPart - startOfSpin.QuadPart; 2503 tenSeconds.QuadPart = 10*10*1000*1000; 2504 ASSERT(KeQueryTimeIncrement() <= MAXLONG); 2505 if (difference.QuadPart*KeQueryTimeIncrement() >= tenSeconds.QuadPart) 2506 break; 2507 } 2497 2508 else 2498 { 2499 if (status == STATUS_IO_TIMEOUT) 2500 { 2501 LARGE_INTEGER nextQuery, difference, tenSeconds; 2502 KeStallExecutionProcessor(50); 2503 KeQueryTickCount(&nextQuery); 2504 difference.QuadPart = nextQuery.QuadPart - startOfSpin.QuadPart; 2505 tenSeconds.QuadPart = 10*10*1000*1000; 2506 ASSERT(KeQueryTimeIncrement() <= MAXLONG); 2507 if (difference.QuadPart*KeQueryTimeIncrement() >= tenSeconds.QuadPart) 2508 break; 2509 } 2510 else 2511 break; 2512 } 2509 break; 2513 2510 } 2514 2511 … … 2542 2539 { 2543 2540 status = PutBytePoll(i8042Dat, TRUE /*=wait*/, KbdDevType, pDevExt, 2544 2545 2541 ConvertTypematic(pDevExt->Cfg.KeyRepeatCurrent.Rate, 2542 pDevExt->Cfg.KeyRepeatCurrent.Delay)); 2546 2543 /* ignore errors */ 2547 2544 } … … 2671 2668 { 2672 2669 PRTL_QUERY_REGISTRY_TABLE aQuery = NULL; 2673 UNICODE_STRING parametersPath ;2670 UNICODE_STRING parametersPath = { 0, 0, NULL }; /* Shut up MSC (actually badly structured code is a fault, but whatever). */ 2674 2671 UNICODE_STRING defaultPointerName; 2675 2672 UNICODE_STRING defaultKeyboardName; … … 3214 3211 static NTSTATUS MouFindWheel(PDEVICE_OBJECT pDevObj) 3215 3212 { 3216 NTSTATUS status ;3213 NTSTATUS status = STATUS_SUCCESS; /* Shut up MSC. */ 3217 3214 PDEVEXT pDevExt = (PDEVEXT) pDevObj->DeviceExtension; 3218 3215 … … 3232 3229 } 3233 3230 3234 UCHAR byte ;3231 UCHAR byte = UINT8_MAX; 3235 3232 for (unsigned i = 0; i < 5; i++) 3236 3233 {
Note:
See TracChangeset
for help on using the changeset viewer.