update AdvancedSteamSessions plugin with changes from upstream

This commit is contained in:
Mamadou Babaei
2025-06-27 14:46:38 +02:00
parent 1ae66a148b
commit 90468777de
2 changed files with 23 additions and 5 deletions
@@ -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);
} }
}; };
@@ -1,6 +1,10 @@
// Fill out your copyright notice in the Description page of Project Settings. // Fill out your copyright notice in the Description page of Project Settings.
#include "AdvancedSteamFriendsLibrary.h" #include "AdvancedSteamFriendsLibrary.h"
#include "OnlineSubSystemHeader.h" #include "OnlineSubSystemHeader.h"
#include "Engine/Texture.h"
#include "Engine/Texture2D.h"
#include "TextureResource.h"
#include "PixelFormat.h"
//General Log //General Log
DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog); DEFINE_LOG_CATEGORY(AdvancedSteamFriendsLog);