Skip to content

Commit

Permalink
moufiltr: Mirror mouse movement
Browse files Browse the repository at this point in the history
Make the driver more interesting by mirroring mouse events, so that left movement becomes right, up movement becomes down, and so on.
  • Loading branch information
Fredrik Orderud committed Feb 15, 2024
1 parent c73af47 commit 0626132
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions input/moufiltr/moufiltr.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,12 @@ Return Value:
PDEVICE_EXTENSION devExt;
WDFDEVICE hDevice;

// mirror mouse events in queue
for (MOUSE_INPUT_DATA* id = InputDataStart; id != InputDataEnd; ++id) {
id->LastX = -id->LastX;
id->LastY = -id->LastY;
}

hDevice = WdfWdmDeviceGetWdfDeviceHandle(DeviceObject);

devExt = FilterGetData(hDevice);
Expand Down

0 comments on commit 0626132

Please sign in to comment.