mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 11:05:08 -05:00
Compare commits
4 commits
a4f8295784
...
71f56ef49e
Author | SHA1 | Date | |
---|---|---|---|
|
71f56ef49e | ||
|
1af10eea7f | ||
|
37fb2a3ddf | ||
|
290e0e0a34 |
3 changed files with 19 additions and 3 deletions
|
@ -13,7 +13,7 @@
|
||||||
* Add new system for ordered hook priority (673317d, 6db3084)
|
* Add new system for ordered hook priority (673317d, 6db3084)
|
||||||
* See docs: LINK HERE!!
|
* See docs: LINK HERE!!
|
||||||
* C++20 coroutine support for `geode::Task`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#coroutines) (e61b2c0, ab196b9)
|
* C++20 coroutine support for `geode::Task`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#coroutines) (e61b2c0, ab196b9)
|
||||||
* Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks)
|
* Add `Task::chain`, [see docs](https://docs.geode-sdk.org/tutorials/tasks#chaining-tasks) (3248831)
|
||||||
* Single page local mods list (efb1fbf)
|
* Single page local mods list (efb1fbf)
|
||||||
* Split mod problems into load and outdated (12e8bbb, 09fa872, df2528c)
|
* Split mod problems into load and outdated (12e8bbb, 09fa872, df2528c)
|
||||||
* This means mods made for outdated gd or geode versions no longer count as actual errors, resulting in less clutter in the ui
|
* This means mods made for outdated gd or geode versions no longer count as actual errors, resulting in less clutter in the ui
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
struct XINPUT_STATE;
|
struct XINPUT_STATE;
|
||||||
struct XINPUT_CAPABILITIES;
|
struct XINPUT_CAPABILITIES;
|
||||||
|
struct XINPUT_VIBRATION;
|
||||||
|
|
||||||
constexpr static auto MAX_PATH_CHARS = 32768u;
|
constexpr static auto MAX_PATH_CHARS = 32768u;
|
||||||
|
|
||||||
|
@ -41,6 +42,17 @@ extern "C" DWORD XInputGetState(DWORD dwUserIndex, XINPUT_STATE *pState) {
|
||||||
return ERROR_DEVICE_NOT_CONNECTED;
|
return ERROR_DEVICE_NOT_CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma comment(linker, "/export:XInputSetState,@3")
|
||||||
|
extern "C" DWORD XInputSetState(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration) {
|
||||||
|
static auto fp = getFP("XInputSetState");
|
||||||
|
if (fp) {
|
||||||
|
using FPType = decltype(&XInputSetState);
|
||||||
|
return reinterpret_cast<FPType>(fp)(dwUserIndex, pVibration);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ERROR_DEVICE_NOT_CONNECTED;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma comment(linker, "/export:XInputGetCapabilities,@4")
|
#pragma comment(linker, "/export:XInputGetCapabilities,@4")
|
||||||
extern "C" DWORD XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES *pCapabilities) {
|
extern "C" DWORD XInputGetCapabilities(DWORD dwUserIndex, DWORD dwFlags, XINPUT_CAPABILITIES *pCapabilities) {
|
||||||
static auto fp = getFP("XInputGetCapabilities");
|
static auto fp = getFP("XInputGetCapabilities");
|
||||||
|
|
|
@ -8,11 +8,15 @@ $execute {
|
||||||
// this is needed because the transitions in cocos uses dynamic cast to check
|
// this is needed because the transitions in cocos uses dynamic cast to check
|
||||||
// layers, which fail on user layers due to typeinfo not matching
|
// layers, which fail on user layers due to typeinfo not matching
|
||||||
|
|
||||||
|
#if defined(GEODE_IS_MAC) && GEODE_COMP_GD_VERSION != 22074
|
||||||
|
#error "Unsupported version for macOS dynamic cast fix, please update the addresses"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(GEODE_IS_INTEL_MAC)
|
#if defined(GEODE_IS_INTEL_MAC)
|
||||||
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7dd5e7);
|
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x7ba1d8);
|
||||||
(void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
(void) Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||||
#elif defined(GEODE_IS_ARM_MAC)
|
#elif defined(GEODE_IS_ARM_MAC)
|
||||||
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x6dfb10);
|
void* dynamicCastAddr = reinterpret_cast<void*>(base::get() + 0x6c8bcc);
|
||||||
(void)Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
(void)Mod::get()->hook(dynamicCastAddr, &cast::typeinfoCastInternal, "__dynamic_cast");
|
||||||
#elif defined(GEODE_IS_ANDROID)
|
#elif defined(GEODE_IS_ANDROID)
|
||||||
void* handle = dlopen("libcocos2dcpp.so", RTLD_LAZY | RTLD_NOLOAD);
|
void* handle = dlopen("libcocos2dcpp.so", RTLD_LAZY | RTLD_NOLOAD);
|
||||||
|
|
Loading…
Reference in a new issue