[Friends] Set presence data correctly
This commit is contained in:
parent
ac3697f89b
commit
aa8ca9cee7
@ -160,17 +160,19 @@ namespace Components
|
|||||||
|
|
||||||
void Friends::ClearPresence(std::string key)
|
void Friends::ClearPresence(std::string key)
|
||||||
{
|
{
|
||||||
if (Steam::Proxy::SteamFriends)
|
if (Steam::Proxy::ClientFriends)
|
||||||
{
|
{
|
||||||
Steam::Proxy::SteamFriends->SetRichPresence(key.data(), nullptr);
|
Steam::Proxy::ClientFriends.invoke<void>("SetRichPresence", 0, key.data(), nullptr);
|
||||||
|
Steam::Proxy::ClientFriends.invoke<void>("SetRichPresence", Steam::Proxy::AppId, key.data(), nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Friends::SetPresence(std::string key, std::string value)
|
void Friends::SetPresence(std::string key, std::string value)
|
||||||
{
|
{
|
||||||
if (Steam::Proxy::SteamFriends && !Dvar::Var("cl_anonymous").get<bool>())
|
if (Steam::Proxy::ClientFriends && !Dvar::Var("cl_anonymous").get<bool>())
|
||||||
{
|
{
|
||||||
Steam::Proxy::SteamFriends->SetRichPresence(key.data(), value.data());
|
Steam::Proxy::ClientFriends.invoke<void>("SetRichPresence", 0, key.data(), value.data());
|
||||||
|
Steam::Proxy::ClientFriends.invoke<void>("SetRichPresence", Steam::Proxy::AppId, key.data(), value.data());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -584,9 +586,10 @@ namespace Components
|
|||||||
|
|
||||||
if(Dvar::Var("cl_anonymous").get<bool>())
|
if(Dvar::Var("cl_anonymous").get<bool>())
|
||||||
{
|
{
|
||||||
if (Steam::Proxy::SteamFriends)
|
if (Steam::Proxy::ClientFriends)
|
||||||
{
|
{
|
||||||
Steam::Proxy::SteamFriends->ClearRichPresence();
|
Steam::Proxy::ClientFriends.invoke<void>("ClearRichPresence", 0);
|
||||||
|
Steam::Proxy::ClientFriends.invoke<void>("ClearRichPresence", Steam::Proxy::AppId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ namespace Steam
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Steam::Proxy::SetMod("IW4x - Modern Warfare 2");
|
Steam::Proxy::SetMod("IW4x \xF0\x9F\x90\x8D");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user