mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-30 03:15:38 -05:00
Merge branch 'tulip-hook' of https://github.com/geode-sdk/geode into tulip-hook
This commit is contained in:
commit
2c2bb8d706
3 changed files with 9 additions and 7 deletions
|
@ -13,18 +13,18 @@ namespace geode::modifier {
|
||||||
struct Impl {}; \
|
struct Impl {}; \
|
||||||
template <class Return, class... Params> \
|
template <class Return, class... Params> \
|
||||||
struct Impl<Return (*)(Params...)> { \
|
struct Impl<Return (*)(Params...)> { \
|
||||||
static Return function(Params... params) { return Class2::FunctionName_(params...); } \
|
static Return GEODE_CDECL_CALL function(Params... params) { return Class2::FunctionName_(params...); } \
|
||||||
}; \
|
}; \
|
||||||
template <class Return, class Class, class... Params> \
|
template <class Return, class Class, class... Params> \
|
||||||
struct Impl<Return (Class::*)(Params...)> { \
|
struct Impl<Return (Class::*)(Params...)> { \
|
||||||
static Return function(Class* self, Params... params) { \
|
static Return GEODE_CDECL_CALL function(Class* self, Params... params) { \
|
||||||
auto self2 = addresser::rthunkAdjust(Function, self); \
|
auto self2 = addresser::rthunkAdjust(Function, self); \
|
||||||
return self2->Class2::FunctionName_(params...); \
|
return self2->Class2::FunctionName_(params...); \
|
||||||
} \
|
} \
|
||||||
}; \
|
}; \
|
||||||
template <class Return, class Class, class... Params> \
|
template <class Return, class Class, class... Params> \
|
||||||
struct Impl<Return (Class::*)(Params...) const> { \
|
struct Impl<Return (Class::*)(Params...) const> { \
|
||||||
static Return function(Class const* self, Params... params) { \
|
static Return GEODE_CDECL_CALL function(Class const* self, Params... params) { \
|
||||||
auto self2 = addresser::rthunkAdjust(Function, self); \
|
auto self2 = addresser::rthunkAdjust(Function, self); \
|
||||||
return self2->Class2::FunctionName_(params...); \
|
return self2->Class2::FunctionName_(params...); \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#define GEODE_IS_DESKTOP
|
#define GEODE_IS_DESKTOP
|
||||||
#define GEODE_PLATFORM_NAME "Windows"
|
#define GEODE_PLATFORM_NAME "Windows"
|
||||||
#define GEODE_CALL __stdcall
|
#define GEODE_CALL __stdcall
|
||||||
|
#define GEODE_CDECL_CALL __cdecl
|
||||||
#define GEODE_PLATFORM_EXTENSION ".dll"
|
#define GEODE_PLATFORM_EXTENSION ".dll"
|
||||||
#define GEODE_PLATFORM_SHORT_IDENTIFIER "win"
|
#define GEODE_PLATFORM_SHORT_IDENTIFIER "win"
|
||||||
#define CC_TARGET_OS_WIN32
|
#define CC_TARGET_OS_WIN32
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
#define CC_TARGET_OS_MAC
|
#define CC_TARGET_OS_MAC
|
||||||
#endif
|
#endif
|
||||||
#define GEODE_CALL
|
#define GEODE_CALL
|
||||||
|
#define GEODE_CDECL_CALL
|
||||||
#else
|
#else
|
||||||
#define GEODE_MACOS(...)
|
#define GEODE_MACOS(...)
|
||||||
#define GEODE_IOS(...)
|
#define GEODE_IOS(...)
|
||||||
|
@ -56,6 +58,7 @@
|
||||||
#define GEODE_IS_MOBILE
|
#define GEODE_IS_MOBILE
|
||||||
#define GEODE_PLATFORM_NAME "Android"
|
#define GEODE_PLATFORM_NAME "Android"
|
||||||
#define GEODE_CALL
|
#define GEODE_CALL
|
||||||
|
#define GEODE_CDECL_CALL
|
||||||
#define GEODE_PLATFORM_EXTENSION ".so"
|
#define GEODE_PLATFORM_EXTENSION ".so"
|
||||||
#define GEODE_PLATFORM_SHORT_IDENTIFIER "android"
|
#define GEODE_PLATFORM_SHORT_IDENTIFIER "android"
|
||||||
#define CC_TARGET_OS_ANDROID
|
#define CC_TARGET_OS_ANDROID
|
||||||
|
|
|
@ -165,13 +165,12 @@ int geodeEntry(void* platformData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// set up internal mod, settings and data
|
// set up internal mod, settings and data
|
||||||
auto setupIntMod = LoaderImpl::get()->setupInternalMod();
|
auto internalSetupRes = LoaderImpl::get()->setupInternalMod();
|
||||||
if (!setupIntMod) {
|
if (!internalSetupRes) {
|
||||||
LoaderImpl::get()->platformMessageBox(
|
LoaderImpl::get()->platformMessageBox(
|
||||||
"Unable to Load Geode!",
|
"Unable to Load Geode!",
|
||||||
"There was an unknown fatal error setting up "
|
"There was an unknown fatal error setting up "
|
||||||
"the internal mod and Geode can not be loaded. "
|
"the internal mod and Geode can not be loaded." + internalSetupRes.unwrapErr()
|
||||||
"(" + setupIntMod.unwrapErr() + ")"
|
|
||||||
);
|
);
|
||||||
LoaderImpl::get()->reset();
|
LoaderImpl::get()->reset();
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue