cleanup cheevos hardcore conditions

This commit is contained in:
radius 2018-04-30 14:39:20 -05:00
parent 7216726664
commit 1037093d45
3 changed files with 14 additions and 20 deletions

View File

@ -1088,8 +1088,7 @@ static void command_event_load_auto_state(void)
#endif #endif
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (cheevos_loaded && settings->bools.cheevos_enable if (cheevos_hardcore_active)
&& settings->bools.cheevos_hardcore_mode_enable)
goto error; goto error;
#endif #endif
@ -1327,8 +1326,7 @@ static bool command_event_save_auto_state(void)
goto error; goto error;
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (cheevos_loaded && settings->bools.cheevos_enable if (cheevos_hardcore_active)
&& settings->bools.cheevos_hardcore_mode_enable)
goto error; goto error;
#endif #endif
@ -1827,8 +1825,7 @@ bool command_event(enum event_command cmd, void *data)
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
if (cheevos_loaded && settings->bools.cheevos_enable if (cheevos_hardcore_active)
&& settings->bools.cheevos_hardcore_mode_enable)
return false; return false;
} }
#endif #endif
@ -1870,8 +1867,7 @@ bool command_event(enum event_command cmd, void *data)
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (cheevos_loaded && settings->bools.cheevos_enable if (cheevos_hardcore_active)
&& settings->bools.cheevos_hardcore_mode_enable)
return false; return false;
#endif #endif
@ -1976,8 +1972,7 @@ bool command_event(enum event_command cmd, void *data)
{ {
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
if (cheevos_loaded && settings->bools.cheevos_enable if (cheevos_hardcore_active)
&& settings->bools.cheevos_hardcore_mode_enable)
return false; return false;
#endif #endif
@ -1988,8 +1983,7 @@ bool command_event(enum event_command cmd, void *data)
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (cheevos_loaded && settings->bools.cheevos_enable if (cheevos_hardcore_active)
&& settings->bools.cheevos_hardcore_mode_enable)
return false; return false;
#endif #endif
if (settings->bools.rewind_enable) if (settings->bools.rewind_enable)

View File

@ -2571,8 +2571,7 @@ static int menu_displaylist_parse_load_content_settings(
if (settings->bools.quick_menu_show_save_load_state if (settings->bools.quick_menu_show_save_load_state
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
&& !(settings->bools.cheevos_enable && !cheevos_hardcore_active
&& settings->bools.cheevos_hardcore_mode_enable && cheevos_loaded)
#endif #endif
) )
{ {
@ -2595,8 +2594,7 @@ static int menu_displaylist_parse_load_content_settings(
if (settings->bools.quick_menu_show_save_load_state && if (settings->bools.quick_menu_show_save_load_state &&
settings->bools.quick_menu_show_undo_save_load_state settings->bools.quick_menu_show_undo_save_load_state
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
&& !(settings->bools.cheevos_enable && settings->bools.cheevos_hardcore_mode_enable && !cheevos_hardcore_active
&& cheevos_loaded)
#endif #endif
) )
{ {

View File

@ -2986,9 +2986,12 @@ static enum runloop_state runloop_check_state(
old_should_loadstate = should_loadstate; old_should_loadstate = should_loadstate;
} }
cheevos_hardcore_active = settings->bools.cheevos_enable
&& settings->bools.cheevos_hardcore_mode_enable
&& cheevos_loaded;
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (!cheevos_loaded || !settings->bools.cheevos_enable if (!cheevos_hardcore_active)
|| !settings->bools.cheevos_hardcore_mode_enable)
#endif #endif
{ {
char s[128]; char s[128];
@ -3003,8 +3006,7 @@ static enum runloop_state runloop_check_state(
/* Checks if slowmotion toggle/hold was being pressed and/or held. */ /* Checks if slowmotion toggle/hold was being pressed and/or held. */
#ifdef HAVE_CHEEVOS #ifdef HAVE_CHEEVOS
if (!cheevos_loaded || !settings->bools.cheevos_enable if (!cheevos_hardcore_active)
|| !settings->bools.cheevos_hardcore_mode_enable)
#endif #endif
{ {
static bool old_slowmotion_button_state = false; static bool old_slowmotion_button_state = false;