mac-precision-touchpad
mac-precision-touchpad copied to clipboard
Nier Automata fails to launch
Pre-report checks
- [x] Have you checked (use search) Azure DevOps Board and Github issues for known bugs and plans?
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
#include <dinput.h>
#include <iostream>
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:
- Disconnect any external mice
- Attempt to launch Nier Automata or run the given test program
Expected behavior
- Nier successfully launches
- The test program prints "OK"
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