2022-07-30 12:24:03 -04:00
|
|
|
#include <Windows.h>
|
2022-10-08 06:26:45 -04:00
|
|
|
#include <stdio.h>
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
#pragma comment(linker, "/export:XInputGetState=xinput1_4.XInputGetState")
|
|
|
|
#pragma comment(linker, "/export:XInputSetState=xinput1_4.XInputSetState")
|
|
|
|
#pragma comment(linker, "/export:XInputGetCapabilities=xinput1_4.XInputGetCapabilities")
|
|
|
|
|
|
|
|
DWORD XInputGetDSoundAudioDeviceGuids(DWORD user, GUID* render, GUID* capture) {
|
|
|
|
return ERROR_BAD_ARGUMENTS;
|
|
|
|
}
|
|
|
|
|
|
|
|
#pragma comment(linker, "/export:XInputGetDSoundAudioDeviceGuids=_XInputGetDSoundAudioDeviceGuids")
|
|
|
|
|
2023-06-09 08:39:35 -04:00
|
|
|
__declspec(dllimport) DWORD WINAPI loadGeode(void*);
|
2022-07-30 12:24:03 -04:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID _) {
|
|
|
|
if (reason == DLL_PROCESS_ATTACH) {
|
2023-06-09 08:39:35 -04:00
|
|
|
// Prevents threads from notifying this DLL on creation or destruction.
|
|
|
|
// Kind of redundant for a game that isn't multi-threaded but will provide
|
|
|
|
// some slight optimizations if a mod frequently creates and deletes threads.
|
|
|
|
DisableThreadLibraryCalls(module);
|
|
|
|
|
|
|
|
DWORD code = loadGeode(module);
|
|
|
|
if (code != 0)
|
2022-07-30 12:24:03 -04:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
return TRUE;
|
2022-12-12 13:21:43 -05:00
|
|
|
}
|