diff --git a/cheevos/cheevos.c b/cheevos/cheevos.c index 4a1694239f9..92cac17bf82 100644 --- a/cheevos/cheevos.c +++ b/cheevos/cheevos.c @@ -107,7 +107,8 @@ static rcheevos_locals_t rcheevos_locals = 0, /* menuitem_count */ #endif #ifdef HAVE_RC_CLIENT - true,/* hardcore_allowed */ + true, /* hardcore_allowed */ + false,/* is_disconnected */ #else #ifdef HAVE_GFX_WIDGETS 0, /* active_lboard_trackers */ @@ -617,6 +618,7 @@ static void rcheevos_server_error(const char* api_name, const char* message) static void rcheevos_server_disconnected(void) { CHEEVOS_LOG(RCHEEVOS_TAG "Unable to communicate with RetroAchievements server\n"); + rcheevos_locals.is_disconnected = true; /* always show message - even with widget. it helps the user understand what the widget is for */ { @@ -634,6 +636,7 @@ static void rcheevos_server_disconnected(void) static void rcheevos_server_reconnected(void) { CHEEVOS_LOG(RCHEEVOS_TAG "All pending requests synced to RetroAchievements server\n"); + rcheevos_locals.is_disconnected = false; { const char* message = msg_hash_to_str(MENU_ENUM_LABEL_CHEEVOS_SERVER_RECONNECTED); @@ -2442,7 +2445,9 @@ static void rcheevos_client_load_game_callback(int result, char msg[256]; #if defined(HAVE_GFX_WIDGETS) - gfx_widget_set_cheevos_disconnect(false); + /* hide the loading widget if not in a disconnected state */ + if (!rcheevos_locals.is_disconnected) + gfx_widget_set_cheevos_disconnect(false); #endif if (result != RC_OK || !game) diff --git a/cheevos/cheevos_locals.h b/cheevos/cheevos_locals.h index aa57027780d..1c90708a42b 100644 --- a/cheevos/cheevos_locals.h +++ b/cheevos/cheevos_locals.h @@ -220,6 +220,7 @@ typedef struct rcheevos_locals_t #ifdef HAVE_RC_CLIENT bool hardcore_allowed; /* prevents enabling hardcore if illegal settings detected */ + bool is_disconnected; /* indicates there are pending requests */ #else #ifdef HAVE_GFX_WIDGETS diff --git a/cheevos/cheevos_menu.c b/cheevos/cheevos_menu.c index 8164400295b..90e904fffea 100644 --- a/cheevos/cheevos_menu.c +++ b/cheevos/cheevos_menu.c @@ -472,6 +472,10 @@ void rcheevos_menu_populate(void* data) case RC_CLIENT_LOAD_GAME_STATE_STARTING_SESSION: msg = MENU_ENUM_LABEL_VALUE_CHEEVOS_STARTING_SESSION; break; + case RC_CLIENT_LOAD_GAME_STATE_NONE: + if (!rc_client_get_user_info(rcheevos_locals->client)) + msg = MENU_ENUM_LABEL_VALUE_NOT_LOGGED_IN; + break; } menu_entries_append(info->list, diff --git a/runloop.c b/runloop.c index 86e28f67e84..09c616fec2e 100644 --- a/runloop.c +++ b/runloop.c @@ -6983,6 +6983,10 @@ int runloop_iterate(void) netplay_driver_ctl(RARCH_NETPLAY_CTL_PAUSE, NULL); #endif #endif +#ifdef HAVE_CHEEVOS + if (cheevos_enable) + rcheevos_idle(); +#endif #ifdef HAVE_MENU /* Rely on vsync throttling unless VRR is enabled and menu throttle is disabled. */ if (vrr_runloop_enable && !settings->bools.menu_throttle_framerate) @@ -6998,10 +7002,6 @@ int runloop_iterate(void) : settings->floats.video_refresh_rate)); else runloop_set_frame_limit(&video_st->av_info, settings->floats.fastforward_ratio); -#endif -#ifdef HAVE_CHEEVOS - if (cheevos_enable) - rcheevos_idle(); #endif goto end; case RUNLOOP_STATE_ITERATE: