Jump to content

SteamOverlay Active/Inactive


SpiderPig
 Share

Go to solution Solved by gamecreator,

Recommended Posts

I created a class specifically for steam callbacks;

#header

class cSteamCallbacks
{
private:
	STEAM_CALLBACK(cSteamCallbacks, _onGameOverlayActivated, GameOverlayActivated_t);

public:
	bool steamOverlayActive = false;
};
#cpp

void cSteamCallbacks::_onGameOverlayActivated(GameOverlayActivated_t * pCallback)
{
	if (pCallback->m_bActive == 1) {
		steamOverlayActive = true;
	}
	else {
		steamOverlayActive = false;
	}
}
#App.cpp

cSteamCallback* steamCallback = nullptr;

bool _steamSuccess = Steamworks::Initialize();
if (_steamSuccess == true) {
	steamCallback = new cSteamCallback();
}

#Loop
if(steamCallback->steamOverlayActive == false){
	//Update mouse interaction
}

 

  • Like 2
  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...