This commit is contained in:
radius 2019-05-16 21:02:46 -05:00 committed by twinaphex
parent d0707437c9
commit f393898825
3 changed files with 23 additions and 6 deletions

View File

@ -953,6 +953,7 @@ bool rcheevos_unload(void)
rcheevos_loaded = false;
rcheevos_hardcore_paused = false;
rcheevos_state_loaded_flag = false;
}
return true;

View File

@ -2264,6 +2264,7 @@ bool cheevos_unload(void)
cheevos_loaded = false;
cheevos_hardcore_paused = false;
cheevos_state_loaded_flag = false;
return true;
}

View File

@ -4165,21 +4165,36 @@ static enum runloop_state runloop_check_state(
#ifdef HAVE_CHEEVOS
/* RCHEEVOS TODO: remove the 'rcheevos_*' below */
rcheevos_hardcore_active = cheevos_hardcore_active = settings->bools.cheevos_enable
rcheevos_hardcore_active = settings->bools.cheevos_enable
&& settings->bools.cheevos_hardcore_mode_enable
&& (rcheevos_loaded || cheevos_loaded) && !(rcheevos_hardcore_paused || cheevos_hardcore_paused);
&& rcheevos_loaded && rcheevos_hardcore_paused;
if ((rcheevos_hardcore_active || cheevos_hardcore_active) && (rcheevos_state_loaded_flag || cheevos_state_loaded_flag))
cheevos_hardcore_active = settings->bools.cheevos_enable
&& settings->bools.cheevos_hardcore_mode_enable
&& cheevos_loaded && cheevos_hardcore_paused;
if (!settings->bools.cheevos_old_enable)
{
rcheevos_hardcore_paused = cheevos_hardcore_paused = true;
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_DISABLED), 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
if (rcheevos_hardcore_active && rcheevos_state_loaded_flag)
{
rcheevos_hardcore_paused = true;
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_DISABLED), 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
else
{
if (cheevos_hardcore_active && cheevos_state_loaded_flag)
{
cheevos_hardcore_paused = true;
runloop_msg_queue_push(msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_DISABLED), 0, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
if (!(rcheevos_hardcore_active || cheevos_hardcore_active))
#endif
{
char s[128];
bool rewinding = false;
bool rewinding = false;
unsigned t = 0;
s[0] = '\0';