Add Cheevos::GetAchievementProgressText
Measured achievements formatting is now up to rcheevos, not DuckStation
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
#include "common/log.h"
|
||||
#include "common/md5_digest.h"
|
||||
#include "common/platform.h"
|
||||
#include "common/string.h"
|
||||
#include "common/string_util.h"
|
||||
#include "common/timestamp.h"
|
||||
#include "common_host_interface.h"
|
||||
@ -1377,6 +1376,15 @@ std::pair<u32, u32> GetAchievementProgress(const Achievement& achievement)
|
||||
return result;
|
||||
}
|
||||
|
||||
TinyString GetAchievementProgressText(const Achievement& achievement)
|
||||
{
|
||||
TinyString result;
|
||||
rc_runtime_format_achievement_measured(&s_rcheevos_runtime, achievement.id, result.GetWriteableCharArray(),
|
||||
result.GetWritableBufferSize());
|
||||
result.UpdateSize();
|
||||
return result;
|
||||
}
|
||||
|
||||
void CheevosEventHandler(const rc_runtime_event_t* runtime_event)
|
||||
{
|
||||
static const char* events[] = {"RC_RUNTIME_EVENT_ACHIEVEMENT_ACTIVATED", "RC_RUNTIME_EVENT_ACHIEVEMENT_PAUSED",
|
||||
|
||||
Reference in New Issue
Block a user