Revert "attempt to fix issue described in #8725"

This reverts commit 90b0afdaa7.
This commit is contained in:
twinaphex 2019-05-21 03:32:18 +02:00
parent 90b0afdaa7
commit f17655f073
3 changed files with 19 additions and 19 deletions

View File

@ -2282,9 +2282,6 @@ bool cheevos_toggle_hardcore_mode(void)
const char *msg = msg_hash_to_str( const char *msg = msg_hash_to_str(
MSG_CHEEVOS_HARDCORE_MODE_ENABLE); MSG_CHEEVOS_HARDCORE_MODE_ENABLE);
/* reset the state loaded flag in case it was set */
cheevos_state_loaded_flag = false;
/* send reset core cmd to avoid any user /* send reset core cmd to avoid any user
* savestate previusly loaded. */ * savestate previusly loaded. */
command_event(CMD_EVENT_RESET, NULL); command_event(CMD_EVENT_RESET, NULL);

View File

@ -1730,10 +1730,7 @@ static bool command_event_main_state(unsigned cmd)
{ {
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
/* RCHEEVOS TODO: remove duplication below */ /* RCHEEVOS TODO: remove duplication below */
if (cheevos_hardcore_active) rcheevos_state_loaded_flag = cheevos_state_loaded_flag = true;
cheevos_state_loaded_flag = true;
if (rcheevos_hardcore_active)
rcheevos_state_loaded_flag = true;
#endif #endif
ret = true; ret = true;
#ifdef HAVE_NETWORKING #ifdef HAVE_NETWORKING

View File

@ -4167,22 +4167,28 @@ static enum runloop_state runloop_check_state(
/* RCHEEVOS TODO: remove the 'rcheevos_*' below */ /* RCHEEVOS TODO: remove the 'rcheevos_*' below */
rcheevos_hardcore_active = settings->bools.cheevos_enable rcheevos_hardcore_active = settings->bools.cheevos_enable
&& settings->bools.cheevos_hardcore_mode_enable && settings->bools.cheevos_hardcore_mode_enable
&& rcheevos_loaded && !rcheevos_hardcore_paused; && rcheevos_loaded && rcheevos_hardcore_paused;
cheevos_hardcore_active = settings->bools.cheevos_enable cheevos_hardcore_active = settings->bools.cheevos_enable
&& settings->bools.cheevos_hardcore_mode_enable && settings->bools.cheevos_hardcore_mode_enable
&& cheevos_loaded && !cheevos_hardcore_paused; && cheevos_loaded && cheevos_hardcore_paused;
rcheevos_hardcore_paused = !settings->bools.cheevos_old_enable if (!settings->bools.cheevos_old_enable)
&& rcheevos_hardcore_active {
&& rcheevos_state_loaded_flag; if (rcheevos_hardcore_active && rcheevos_state_loaded_flag)
{
cheevos_hardcore_paused = settings->bools.cheevos_old_enable rcheevos_hardcore_paused = true;
&& cheevos_hardcore_active 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);
&& cheevos_state_loaded_flag; }
}
if (rcheevos_hardcore_paused || cheevos_hardcore_paused) else
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 (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)) if (!(rcheevos_hardcore_active || cheevos_hardcore_active))
#endif #endif