Steam callback c++ occuring twice.

You’ll need to provide more information, and some code where this is ocurring

I have set up steam and everything works correctly apart that a callback is being triggered twice. I am not calling “SteamAPI_RunCallbacks” anywhere in my code.

I have the same problem. Steam overlay callback is triggering twice in my project.

Header SteamCallbacks.h:

class GAMELIFTSTEAM_API SteamCallbacks
{
public:
	SteamCallbacks();
	~SteamCallbacks();

private:
	STEAM_CALLBACK(SteamCallbacks, OnSteamOverlayActivated, GameOverlayActivated_t);

Implementation SteamCallbacks.cpp:

void SteamCallbacks::OnSteamOverlayActivated(GameOverlayActivated_t* pCallback)
{
	if (pCallback->m_bActive)
	{
		UE_LOG(LogTemp, Warning, TEXT("Steam overlay now active."));
	}
	else
	{
		UE_LOG(LogTemp, Warning, TEXT("Steam overlay now inactive."));
	}
}

This might help:

Use STEAM_CALLBACK_MANUAL instead

1 Like