mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 05:41:21 +00:00
[KBDHID][MOUHID]
- Properly stub DispatchPower - Implement DispatchSystemControl svn path=/trunk/; revision=58992
This commit is contained in:
parent
309a347ed1
commit
22de130758
2 changed files with 226 additions and 190 deletions
|
@ -50,7 +50,7 @@ KbdHid_InsertScanCodes(
|
||||||
/* get device extension */
|
/* get device extension */
|
||||||
DeviceExtension = (PKBDHID_DEVICE_EXTENSION)Context;
|
DeviceExtension = (PKBDHID_DEVICE_EXTENSION)Context;
|
||||||
|
|
||||||
for (Index = 0; Index < Length; Index++)
|
for(Index = 0; Index < Length; Index++)
|
||||||
{
|
{
|
||||||
DPRINT("[KBDHID] ScanCode Index %lu ScanCode %x\n", Index, NewScanCodes[Index] & 0xFF);
|
DPRINT("[KBDHID] ScanCode Index %lu ScanCode %x\n", Index, NewScanCodes[Index] & 0xFF);
|
||||||
|
|
||||||
|
@ -561,8 +561,25 @@ KbdHid_Power(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp)
|
IN PIRP Irp)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
PKBDHID_DEVICE_EXTENSION DeviceExtension;
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
|
||||||
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
PoStartNextPowerIrp(Irp);
|
||||||
|
IoSkipCurrentIrpStackLocation(Irp);
|
||||||
|
return PoCallDriver(DeviceExtension->NextDeviceObject, Irp);
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
KbdHid_SystemControl(
|
||||||
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
IN PIRP Irp)
|
||||||
|
{
|
||||||
|
PKBDHID_DEVICE_EXTENSION DeviceExtension;
|
||||||
|
|
||||||
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
IoSkipCurrentIrpStackLocation(Irp);
|
||||||
|
return IoCallDriver(DeviceExtension->NextDeviceObject, Irp);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -980,6 +997,7 @@ DriverEntry(
|
||||||
DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = KbdHid_InternalDeviceControl;
|
DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = KbdHid_InternalDeviceControl;
|
||||||
DriverObject->MajorFunction[IRP_MJ_POWER] = KbdHid_Power;
|
DriverObject->MajorFunction[IRP_MJ_POWER] = KbdHid_Power;
|
||||||
DriverObject->MajorFunction[IRP_MJ_PNP] = KbdHid_Pnp;
|
DriverObject->MajorFunction[IRP_MJ_PNP] = KbdHid_Pnp;
|
||||||
|
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = KbdHid_SystemControl;
|
||||||
DriverObject->DriverUnload = KbdHid_Unload;
|
DriverObject->DriverUnload = KbdHid_Unload;
|
||||||
DriverObject->DriverExtension->AddDevice = KbdHid_AddDevice;
|
DriverObject->DriverExtension->AddDevice = KbdHid_AddDevice;
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,7 @@ MouHid_GetButtonFlags(
|
||||||
|
|
||||||
/* move to next index*/
|
/* move to next index*/
|
||||||
Index++;
|
Index++;
|
||||||
} while (Index < DeviceExtension->UsageListLength);
|
}while(Index < DeviceExtension->UsageListLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DeviceExtension->UsageListLength)
|
if (DeviceExtension->UsageListLength)
|
||||||
|
@ -200,7 +200,7 @@ MouHid_GetButtonFlags(
|
||||||
|
|
||||||
/* move to next index*/
|
/* move to next index*/
|
||||||
Index++;
|
Index++;
|
||||||
} while (Index < DeviceExtension->UsageListLength);
|
}while(Index < DeviceExtension->UsageListLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* now switch the previous list with current list */
|
/* now switch the previous list with current list */
|
||||||
|
@ -636,8 +636,25 @@ MouHid_Power(
|
||||||
IN PDEVICE_OBJECT DeviceObject,
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
IN PIRP Irp)
|
IN PIRP Irp)
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED
|
PMOUHID_DEVICE_EXTENSION DeviceExtension;
|
||||||
return STATUS_NOT_IMPLEMENTED;
|
|
||||||
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
PoStartNextPowerIrp(Irp);
|
||||||
|
IoSkipCurrentIrpStackLocation(Irp);
|
||||||
|
return PoCallDriver(DeviceExtension->NextDeviceObject, Irp);
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
MouHid_SystemControl(
|
||||||
|
IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
IN PIRP Irp)
|
||||||
|
{
|
||||||
|
PMOUHID_DEVICE_EXTENSION DeviceExtension;
|
||||||
|
|
||||||
|
DeviceExtension = DeviceObject->DeviceExtension;
|
||||||
|
IoSkipCurrentIrpStackLocation(Irp);
|
||||||
|
return IoCallDriver(DeviceExtension->NextDeviceObject, Irp);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
@ -843,7 +860,7 @@ MouHid_StartDevice(
|
||||||
&ValueCaps,
|
&ValueCaps,
|
||||||
&ValueCapsLength,
|
&ValueCapsLength,
|
||||||
PreparsedData);
|
PreparsedData);
|
||||||
if (Status == HIDP_STATUS_SUCCESS)
|
if (Status == HIDP_STATUS_SUCCESS )
|
||||||
{
|
{
|
||||||
/* mouse has wheel support */
|
/* mouse has wheel support */
|
||||||
DeviceExtension->MouseIdentifier = WHEELMOUSE_HID_HARDWARE;
|
DeviceExtension->MouseIdentifier = WHEELMOUSE_HID_HARDWARE;
|
||||||
|
@ -1116,6 +1133,7 @@ DriverEntry(
|
||||||
DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = MouHid_InternalDeviceControl;
|
DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = MouHid_InternalDeviceControl;
|
||||||
DriverObject->MajorFunction[IRP_MJ_POWER] = MouHid_Power;
|
DriverObject->MajorFunction[IRP_MJ_POWER] = MouHid_Power;
|
||||||
DriverObject->MajorFunction[IRP_MJ_PNP] = MouHid_Pnp;
|
DriverObject->MajorFunction[IRP_MJ_PNP] = MouHid_Pnp;
|
||||||
|
DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = MouHid_SystemControl;
|
||||||
DriverObject->DriverUnload = MouHid_Unload;
|
DriverObject->DriverUnload = MouHid_Unload;
|
||||||
DriverObject->DriverExtension->AddDevice = MouHid_AddDevice;
|
DriverObject->DriverExtension->AddDevice = MouHid_AddDevice;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue