change over to manual delegate for steam notification

This commit is contained in:
Joshua
2024-12-12 09:14:42 -05:00
parent f914c71e1b
commit 116aca3a14

View File

@@ -38,14 +38,27 @@ public:
void Initialize(USteamNotificationsSubsystem* MyParent) void Initialize(USteamNotificationsSubsystem* MyParent)
{ {
ParentSubsystem = MyParent; ParentSubsystem = MyParent;
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
OnExternalUITriggeredCallback.Register(this, &USteamNotificationsSubsystem::cSteamEventsStore::OnExternalUITriggered);
#endif
}
void UnInitialize(USteamNotificationsSubsystem* MyParent)
{
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
OnExternalUITriggeredCallback.Unregister();
#endif
} }
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED #if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
cSteamEventsStore() : cSteamEventsStore()
OnExternalUITriggeredCallback(this, &cSteamEventsStore::OnExternalUITriggered) {}
//:
/*OnExternalUITriggeredCallback(this, &cSteamEventsStore::OnExternalUITriggered)
{ {
} }*/
#else #else
//cSteamEventsStore() //cSteamEventsStore()
//{ //{
@@ -57,7 +70,8 @@ public:
private: private:
#if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED #if (PLATFORM_WINDOWS || PLATFORM_MAC || PLATFORM_LINUX) && STEAM_SDK_INSTALLED
STEAM_CALLBACK(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback); //STEAM_CALLBACK(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
STEAM_CALLBACK_MANUAL(cSteamEventsStore, OnExternalUITriggered, GameOverlayActivated_t, OnExternalUITriggeredCallback);
#endif #endif
}; };
@@ -72,7 +86,7 @@ public:
/** Implement this for deinitialization of instances of the system */ /** Implement this for deinitialization of instances of the system */
virtual void Deinitialize() override virtual void Deinitialize() override
{ {
MyEvents.UnInitialize(this);
} }
}; };