imbushuo / mac-precision-touchpad

Windows Precision Touchpad Driver Implementation for Apple MacBook / Magic Trackpad
Other
8.73k stars 559 forks source link

Nier Automata fails to launch #454

Open TellowKrinkle opened 2 years ago

TellowKrinkle commented 2 years ago

Pre-report checks

Describe the bug Nier Automata fails to launch when this driver is in use with no other mice connected.

I can't be certain it's the cause, but this C++ program based on a decompilation of Nier also fails when an external mouse is not present and the precision touchpad drivers are in use.

C++ Program Source ```cpp #include #include DIOBJECTDATAFORMAT mouseObjs[0x0B] = { { &GUID_XAxis, 0x00, 0x00FFFF03, 0x00 }, { &GUID_YAxis, 0x04, 0x00FFFF03, 0x00 }, { &GUID_ZAxis, 0x08, 0x80FFFF03, 0x00 }, { NULL, 0x0C, 0x00FFFF0C, 0x00 }, { NULL, 0x0D, 0x00FFFF0C, 0x00 }, { NULL, 0x0E, 0x80FFFF0C, 0x00 }, { NULL, 0x0F, 0x80FFFF0C, 0x00 }, { NULL, 0x10, 0x80FFFF0C, 0x00 }, { NULL, 0x11, 0x80FFFF0C, 0x00 }, { NULL, 0x12, 0x80FFFF0C, 0x00 }, { NULL, 0x13, 0x80FFFF0C, 0x00 }, }; const DIDATAFORMAT mouseFormat = { sizeof(DIDATAFORMAT), sizeof(DIOBJECTDATAFORMAT), DIDF_RELAXIS, 0x14, 0x0B, mouseObjs, }; int main() { IDirectInput8A* dinput; if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), 0x800, IID_IDirectInput8A, (void**)&dinput, 0))) { std::cerr << "Failed to create DInput" << std::endl; return EXIT_FAILURE; } LPDIRECTINPUTDEVICE8A lpdiMouse; if (FAILED(dinput->CreateDevice(GUID_SysMouse, &lpdiMouse, NULL))) { std::cerr << "Failed to create mouse" << std::endl; return EXIT_FAILURE; } if (FAILED(lpdiMouse->SetDataFormat(&mouseFormat))) { std::cerr << "Failed to set data format" << std::endl; return EXIT_FAILURE; } std::cerr << "OK" << std::endl; return EXIT_SUCCESS; } ```

To Reproduce Steps to reproduce the behavior:

  1. Disconnect any external mice
  2. Attempt to launch Nier Automata or run the given test program

Expected behavior

Traces N/A

Environment Device: 16" 2019 MacBook Pro Hardware ID: USB\VID_05AC&PID_0340&REV_0275&MI_02 OS: Windows 10 Pro 21H2

AB#788