Fix SteamFriends.GetRichPresence(key, value)

Adds key/value to the dictionary only if the rich presence was set successfully. Also fixes #307
This commit is contained in:
Andrii Vitiv 2019-09-15 00:48:49 +03:00 committed by GitHub
parent 5666bb432e
commit 9ad3a57ad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,8 +253,12 @@ namespace Steamworks
/// </summary>
public static bool SetRichPresence( string key, string value )
{
richPresence[key] = value;
return Internal.SetRichPresence( key, value );
bool success = Internal.SetRichPresence( key, value );
if ( success )
richPresence[key] = value;
return success;
}
/// <summary>
@ -285,4 +289,4 @@ namespace Steamworks
}
}
}
}