mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
Fix achievements being awarded upon game reset.
This commit is contained in:
parent
e92aa45815
commit
14cebec15d
19
cheevos.c
19
cheevos.c
@ -2499,6 +2499,25 @@ found:
|
||||
return false;
|
||||
}
|
||||
|
||||
void cheevos_reset_game(void)
|
||||
{
|
||||
cheevo_t *cheevo = cheevos_locals.core.cheevos;
|
||||
const cheevo_t *end = cheevo + cheevos_locals.core.count;
|
||||
|
||||
for (; cheevo < end; cheevo++)
|
||||
{
|
||||
cheevo->last = 1;
|
||||
}
|
||||
|
||||
cheevo = cheevos_locals.unofficial.cheevos;
|
||||
end = cheevo + cheevos_locals.unofficial.count;
|
||||
|
||||
for (; cheevo < end; cheevo++)
|
||||
{
|
||||
cheevo->last = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void cheevos_populate_menu(void *data)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
|
@ -41,6 +41,8 @@ typedef struct
|
||||
|
||||
bool cheevos_load(const void *data);
|
||||
|
||||
void cheevos_reset_game(void);
|
||||
|
||||
void cheevos_populate_menu(void *data);
|
||||
|
||||
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "verbosity.h"
|
||||
#include "gfx/video_driver.h"
|
||||
#include "audio/audio_driver.h"
|
||||
#include "cheevos.h"
|
||||
|
||||
static struct retro_core_t core;
|
||||
static unsigned core_poll_type;
|
||||
@ -355,6 +356,7 @@ bool core_get_system_av_info(struct retro_system_av_info *av_info)
|
||||
bool core_reset(void)
|
||||
{
|
||||
core.retro_reset();
|
||||
cheevos_reset_game();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user