scarface: bugfix
@@ -157,7 +157,10 @@ void Init()
void operator()(injector::reg_pack& regs)
{
regs.esi = *(uint32_t*)(regs.edi + 0x264);
+ auto controller = std::string_view((char*)regs.edi + 0x40);
+ if (controller.starts_with("Mouse"))
+ {
auto rgdod = (LPDIDEVICEOBJECTDATA)(regs.esp + 0x10);
if (rgdod)
{
@@ -172,6 +175,7 @@ void Init()
}
}
}
+ }
}; injector::MakeInline<GetDeviceDataHook>(pattern.get_first(0), pattern.get_first(6));
pattern = hook::pattern("0F BF 54 24 08 ? ? ? ? 03");
@@ -182,6 +186,9 @@ void Init()
{
*(int32_t*)&regs.edx = *(int16_t*)(regs.esp + 0x8);
+ if (OptionManager::bGamepadUsed)
+ return;
+
enum
{
weaponleft = 0x9,
