diff --git a/loader/include/Geode/modify/AsStaticFunction.hpp b/loader/include/Geode/modify/AsStaticFunction.hpp index b23f70fe..2de3fc8c 100644 --- a/loader/include/Geode/modify/AsStaticFunction.hpp +++ b/loader/include/Geode/modify/AsStaticFunction.hpp @@ -13,18 +13,18 @@ namespace geode::modifier { struct Impl {}; \ template \ struct Impl { \ - static Return function(Params... params) { return Class2::FunctionName_(params...); } \ + static Return GEODE_CDECL_CALL function(Params... params) { return Class2::FunctionName_(params...); } \ }; \ template \ struct Impl { \ - 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 \ struct Impl { \ - 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...); \ } \ diff --git a/loader/include/Geode/platform/cplatform.h b/loader/include/Geode/platform/cplatform.h index b42e1b01..562b11d4 100644 --- a/loader/include/Geode/platform/cplatform.h +++ b/loader/include/Geode/platform/cplatform.h @@ -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 diff --git a/loader/src/main.cpp b/loader/src/main.cpp index 4e6676ac..bdbea13a 100644 --- a/loader/src/main.cpp +++ b/loader/src/main.cpp @@ -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;