mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
Load xinput if it's not already loaded
This commit is contained in:
parent
1f9cb46b02
commit
9385cb302c
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,9 @@ struct XINPUT_STATE;
|
|||
#pragma comment(linker, "/export:XInputGetState,@2")
|
||||
extern "C" DWORD XInputGetState(DWORD dwUserIndex, XINPUT_STATE *pState) {
|
||||
auto xinput = GetModuleHandleA(XINPUT_PATH);
|
||||
if (!xinput)
|
||||
xinput = LoadLibraryA(XINPUT_PATH);
|
||||
|
||||
if (xinput) {
|
||||
auto fp = GetProcAddress(xinput, "XInputGetState");
|
||||
if (fp) {
|
||||
|
|
Loading…
Reference in a new issue