diff --git a/src/rc_client.c b/src/rc_client.c index d9a65c7d..28944ee1 100644 --- a/src/rc_client.c +++ b/src/rc_client.c @@ -4038,8 +4038,12 @@ static void rc_client_ping(rc_client_scheduled_callback_data_t* callback_data, r if (!client->callbacks.rich_presence_override || !client->callbacks.rich_presence_override(client, buffer, sizeof(buffer))) { + rc_mutex_lock(&client->state.mutex); + rc_runtime_get_richpresence(&client->game->runtime, buffer, sizeof(buffer), client->state.legacy_peek, client, NULL); + + rc_mutex_unlock(&client->state.mutex); } memset(&api_params, 0, sizeof(api_params)); @@ -4078,9 +4082,13 @@ size_t rc_client_get_rich_presence_message(rc_client_t* client, char buffer[], s if (!client || !client->game || !buffer) return 0; + rc_mutex_lock(&client->state.mutex); + result = rc_runtime_get_richpresence(&client->game->runtime, buffer, (unsigned)buffer_size, client->state.legacy_peek, client, NULL); + rc_mutex_unlock(&client->state.mutex); + if (result == 0) result = snprintf(buffer, buffer_size, "Playing %s", client->game->public_.title);