menu_widgets_push_achievements always returns true

This commit is contained in:
twinaphex 2019-08-15 15:48:08 +02:00
parent edaf8eb702
commit 92dec44b0e
3 changed files with 6 additions and 10 deletions

View File

@ -504,9 +504,12 @@ static void rcheevos_award(rcheevos_cheevo_t* cheevo, int mode)
/* Show the OSD message. */
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!menu_widgets_ready() || !menu_widgets_push_achievement(cheevo->info->title, cheevo->info->badge))
if (!menu_widgets_ready())
#endif
{
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
menu_widgets_push_achievement(cheevo->info->title, cheevo->info->badge);
#endif
snprintf(buffer, sizeof(buffer), "Achievement Unlocked: %s", cheevo->info->title);
runloop_msg_queue_push(buffer, 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
runloop_msg_queue_push(cheevo->info->description, 0, 3 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);

View File

@ -2261,7 +2261,7 @@ static void menu_widgets_get_badge_texture(menu_texture_item *tex, const char *b
tex, TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL);
}
bool menu_widgets_push_achievement(const char *title, const char *badge)
void menu_widgets_push_achievement(const char *title, const char *badge)
{
menu_widgets_achievement_free(NULL);
@ -2271,8 +2271,6 @@ bool menu_widgets_push_achievement(const char *title, const char *badge)
menu_widgets_get_badge_texture(&cheevo_badge, badge);
menu_widgets_start_achievement_notification();
return true;
}
static void menu_widgets_generic_message_fadeout(void *userdata)

View File

@ -53,11 +53,6 @@ void menu_widgets_volume_update_and_show(void);
void menu_widgets_iterate(unsigned width, unsigned height);
bool menu_widgets_task_msg_queue_push(retro_task_t *task,
const char *msg,
unsigned prio, unsigned duration,
bool flush);
void menu_widgets_screenshot_taken(const char *shotname, const char *filename);
void menu_widgets_start_load_content_animation(const char *content_name, bool remove_extension);
@ -68,7 +63,7 @@ void menu_widgets_context_reset(bool is_threaded,
void menu_widgets_context_destroy(void);
bool menu_widgets_push_achievement(const char *title, const char *badge);
void menu_widgets_push_achievement(const char *title, const char *badge);
/* Warning: not thread safe! */
void menu_widgets_set_message(char *message);