mirror of
https://github.com/libretro/RetroArch
synced 2025-03-20 01:21:03 +00:00
Merge pull request #10904 from Jamiras/cheevos_unlock_lbl
(cheevos) restore display of unlocked achievements across hardcore modes
This commit is contained in:
commit
d927b6ec83
@ -145,8 +145,8 @@ typedef struct rcheevos_async_io_request
|
|||||||
int attempt_count;
|
int attempt_count;
|
||||||
char type;
|
char type;
|
||||||
char hardcore;
|
char hardcore;
|
||||||
char* success_message;
|
const char* success_message;
|
||||||
char* failure_message;
|
const char* failure_message;
|
||||||
char user_agent[256];
|
char user_agent[256];
|
||||||
} rcheevos_async_io_request;
|
} rcheevos_async_io_request;
|
||||||
|
|
||||||
@ -1150,15 +1150,22 @@ void rcheevos_get_achievement_state(unsigned index, char *buffer, size_t buffer_
|
|||||||
{
|
{
|
||||||
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNSUPPORTED_ENTRY;
|
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNSUPPORTED_ENTRY;
|
||||||
}
|
}
|
||||||
|
else if (!(cheevo->active & RCHEEVOS_ACTIVE_HARDCORE))
|
||||||
|
{
|
||||||
|
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE;
|
||||||
|
}
|
||||||
|
else if (!(cheevo->active & RCHEEVOS_ACTIVE_SOFTCORE))
|
||||||
|
{
|
||||||
|
/* if in hardcore mode, track progress towards hardcore unlock */
|
||||||
|
const settings_t* settings = config_get_ptr();
|
||||||
|
const bool hardcore = settings->bools.cheevos_hardcore_mode_enable && !rcheevos_hardcore_paused;
|
||||||
|
check_measured = hardcore;
|
||||||
|
|
||||||
|
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
settings_t* settings = config_get_ptr();
|
/* Use either "Locked" for core or "Unofficial" for unofficial as set above and track progress */
|
||||||
bool hardcore = settings->bools.cheevos_hardcore_mode_enable && !rcheevos_hardcore_paused;
|
|
||||||
if (hardcore && !(cheevo->active & RCHEEVOS_ACTIVE_HARDCORE))
|
|
||||||
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE;
|
|
||||||
else if (!hardcore && !(cheevo->active & RCHEEVOS_ACTIVE_SOFTCORE))
|
|
||||||
enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY;
|
|
||||||
else /* Use either "Locked" for core or "Unofficial" for unofficial as set above */
|
|
||||||
check_measured = true;
|
check_measured = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1548,7 +1555,7 @@ static int rcheevos_iterate(rcheevos_coro_t* coro)
|
|||||||
CORO_STOP();
|
CORO_STOP();
|
||||||
|
|
||||||
/* iterate over the possible hashes for the file being loaded */
|
/* iterate over the possible hashes for the file being loaded */
|
||||||
rc_hash_initialize_iterator(&coro->iterator, coro->path, coro->data, coro->len);
|
rc_hash_initialize_iterator(&coro->iterator, coro->path, (uint8_t*)coro->data, coro->len);
|
||||||
#ifdef CHEEVOS_TIME_HASH
|
#ifdef CHEEVOS_TIME_HASH
|
||||||
start = cpu_features_get_time_usec();
|
start = cpu_features_get_time_usec();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user