cheevos fixes, reenable menu entries if cheevos are disabled on the fly

This commit is contained in:
radius 2018-04-30 13:04:11 -05:00
parent 605d88751f
commit 504317ac7e
3 changed files with 20 additions and 10 deletions

View File

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

View File

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

View File

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