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 {}; \
|
||||
template <class Return, class... 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> \
|
||||
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); \
|
||||
return self2->Class2::FunctionName_(params...); \
|
||||
} \
|
||||
}; \
|
||||
template <class Return, class Class, class... Params> \
|
||||
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); \
|
||||
return self2->Class2::FunctionName_(params...); \
|
||||
} \
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#define GEODE_IS_DESKTOP
|
||||
#define GEODE_PLATFORM_NAME "Windows"
|
||||
#define GEODE_CALL __stdcall
|
||||
#define GEODE_CDECL_CALL __cdecl
|
||||
#define GEODE_PLATFORM_EXTENSION ".dll"
|
||||
#define GEODE_PLATFORM_SHORT_IDENTIFIER "win"
|
||||
#define CC_TARGET_OS_WIN32
|
||||
|
@ -44,6 +45,7 @@
|
|||
#define CC_TARGET_OS_MAC
|
||||
#endif
|
||||
#define GEODE_CALL
|
||||
#define GEODE_CDECL_CALL
|
||||
#else
|
||||
#define GEODE_MACOS(...)
|
||||
#define GEODE_IOS(...)
|
||||
|
@ -56,6 +58,7 @@
|
|||
#define GEODE_IS_MOBILE
|
||||
#define GEODE_PLATFORM_NAME "Android"
|
||||
#define GEODE_CALL
|
||||
#define GEODE_CDECL_CALL
|
||||
#define GEODE_PLATFORM_EXTENSION ".so"
|
||||
#define GEODE_PLATFORM_SHORT_IDENTIFIER "android"
|
||||
#define CC_TARGET_OS_ANDROID
|
||||
|
|
|
@ -165,13 +165,12 @@ int geodeEntry(void* platformData) {
|
|||
}
|
||||
|
||||
// set up internal mod, settings and data
|
||||
auto setupIntMod = LoaderImpl::get()->setupInternalMod();
|
||||
if (!setupIntMod) {
|
||||
auto internalSetupRes = LoaderImpl::get()->setupInternalMod();
|
||||
if (!internalSetupRes) {
|
||||
LoaderImpl::get()->platformMessageBox(
|
||||
"Unable to Load Geode!",
|
||||
"There was an unknown fatal error setting up "
|
||||
"the internal mod and Geode can not be loaded. "
|
||||
"(" + setupIntMod.unwrapErr() + ")"
|
||||
"the internal mod and Geode can not be loaded." + internalSetupRes.unwrapErr()
|
||||
);
|
||||
LoaderImpl::get()->reset();
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue