fix proxyloader

This commit is contained in:
matcool 2024-06-02 14:57:23 -03:00
parent 6b79cb2b6e
commit 637a79429e
3 changed files with 5 additions and 7 deletions

View file

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.21)
add_library(ProxyLoader SHARED proxyLoader.cpp proxyLoader.def)
add_library(ProxyLoader SHARED proxyLoader.cpp)
set_target_properties(ProxyLoader PROPERTIES
PREFIX ""
OUTPUT_NAME "XInput1_4"

View file

@ -5,9 +5,10 @@
#define PROXY(export, ordinal) \
"/export:" #export "=\\\\.\\GLOBALROOT\\SystemRoot\\System32\\XInput1_4.dll.#" #ordinal
// This is the only function required by libcocos2d.dll.
#pragma comment(linker, PROXY(XInputGetAudioDeviceIds, 2))
extern "C" void XInputGetAudioDeviceIds() {}
// This are the only two functions required by libcocos2d.dll.
#pragma comment(linker, PROXY(XInputGetState, 2))
#pragma comment(linker, PROXY(XInputGetCapabilities, 4))
static std::wstring getErrorString() {
return L"Could not load Geode. Error code: " + std::to_wstring(GetLastError());

View file

@ -1,3 +0,0 @@
LIBRARY XINPUT1_4
EXPORTS
XInputGetAudioDeviceIds @2