Skip to content

Commit

Permalink
[NFSU2] disable wheel readout to prevent spamming
Browse files Browse the repository at this point in the history
  • Loading branch information
xan1242 committed Oct 9, 2022
1 parent 89ae145 commit f43a1c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NFSU2_Addresses.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ unsigned int LastControlledDeviceOldState = 0;
#define STEER_HANDLER_ADDR1 0x0041E083
#define STEER_HANDLER_ADDR2 0x0041E09A
#define REALDRIVER_STEER_OFFSET 0x2C8

#define DISABLE_WHEEL_ADDR 0x005D2C6A
3 changes: 2 additions & 1 deletion dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2030,7 +2030,7 @@ int Init()
injector::MakeCALL(ACTUALREADJOYDATA_CALL_ADDR2, ReadControllerData, true);
injector::MakeCALL(ACTUALREADJOYDATA_CALL_ADDR3, ReadControllerData, true);
#endif
#ifndef GAME_UG
#ifdef GAME_UG2
// custom config finder (because it returns 0 with the original function)
injector::MakeJMP(FINDSCANNERCONFIG_ADDR, FindScannerConfig_Custom, true);
// Win32 mouse injection
Expand All @@ -2039,6 +2039,7 @@ int Init()
injector::MakeJMP(0x005D268C, 0x5D269C, true);
// disable PC_CURSOR texture to avoid duplicate cursors
injector::WriteMemory<unsigned int>(0x0050B4EA, 0, true);
injector::MakeNOP(DISABLE_WHEEL_ADDR, 5, true);
#endif

// custom steering handler
Expand Down

0 comments on commit f43a1c7

Please sign in to comment.