mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
let rc_runtime_t manage triggers
This commit is contained in:
parent
5838817bbd
commit
0d6f0e4826
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,8 @@ typedef struct rcheevos_ctx_desc
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
RCHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
RCHEEVOS_ACTIVE_SOFTCORE = 1 << 0,
|
||||||
RCHEEVOS_ACTIVE_HARDCORE = 1 << 1
|
RCHEEVOS_ACTIVE_HARDCORE = 1 << 1,
|
||||||
|
RCHEEVOS_ACTIVE_UNOFFICIAL = 1 << 2
|
||||||
};
|
};
|
||||||
|
|
||||||
bool rcheevos_load(const void *data);
|
bool rcheevos_load(const void *data);
|
||||||
|
@ -407,25 +407,30 @@ static int rcheevos_new_cheevo(rcheevos_readud_t* ud)
|
|||||||
static int rcheevos_new_lboard(rcheevos_readud_t* ud)
|
static int rcheevos_new_lboard(rcheevos_readud_t* ud)
|
||||||
{
|
{
|
||||||
rcheevos_ralboard_t* lboard = ud->patchdata->lboards + ud->lboard_count++;
|
rcheevos_ralboard_t* lboard = ud->patchdata->lboards + ud->lboard_count++;
|
||||||
|
char format[32];
|
||||||
|
|
||||||
lboard->title = rcheevos_unescape_string(ud->title.string, ud->title.length);
|
lboard->title = rcheevos_unescape_string(ud->title.string, ud->title.length);
|
||||||
lboard->description = rcheevos_unescape_string(ud->desc.string, ud->desc.length);
|
lboard->description = rcheevos_unescape_string(ud->desc.string, ud->desc.length);
|
||||||
lboard->format = rcheevos_unescape_string(ud->format.string, ud->format.length);
|
|
||||||
lboard->mem = rcheevos_unescape_string(ud->memaddr.string, ud->memaddr.length);
|
lboard->mem = rcheevos_unescape_string(ud->memaddr.string, ud->memaddr.length);
|
||||||
lboard->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
lboard->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||||
|
|
||||||
if ( !lboard->title
|
if ( !lboard->title
|
||||||
|| !lboard->description
|
|| !lboard->description
|
||||||
|| !lboard->format
|
|
||||||
|| !lboard->mem)
|
|| !lboard->mem)
|
||||||
{
|
{
|
||||||
CHEEVOS_FREE(lboard->title);
|
CHEEVOS_FREE(lboard->title);
|
||||||
CHEEVOS_FREE(lboard->description);
|
CHEEVOS_FREE(lboard->description);
|
||||||
CHEEVOS_FREE(lboard->format);
|
|
||||||
CHEEVOS_FREE(lboard->mem);
|
CHEEVOS_FREE(lboard->mem);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ud->format.length > 0 && ud->format.length < sizeof(format) - 1)
|
||||||
|
{
|
||||||
|
memcpy(format, ud->format.string, ud->format.length);
|
||||||
|
format[ud->format.length] = '\0';
|
||||||
|
lboard->format = rc_parse_format(format);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -693,7 +698,6 @@ void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata)
|
|||||||
{
|
{
|
||||||
CHEEVOS_FREE(lboard->title);
|
CHEEVOS_FREE(lboard->title);
|
||||||
CHEEVOS_FREE(lboard->description);
|
CHEEVOS_FREE(lboard->description);
|
||||||
CHEEVOS_FREE(lboard->format);
|
|
||||||
CHEEVOS_FREE(lboard->mem);
|
CHEEVOS_FREE(lboard->mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,15 +32,16 @@ typedef struct
|
|||||||
const char* memaddr;
|
const char* memaddr;
|
||||||
unsigned points;
|
unsigned points;
|
||||||
unsigned id;
|
unsigned id;
|
||||||
|
unsigned active;
|
||||||
} rcheevos_racheevo_t;
|
} rcheevos_racheevo_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
const char* title;
|
const char* title;
|
||||||
const char* description;
|
const char* description;
|
||||||
const char* format;
|
|
||||||
const char* mem;
|
const char* mem;
|
||||||
unsigned id;
|
unsigned id;
|
||||||
|
unsigned format;
|
||||||
} rcheevos_ralboard_t;
|
} rcheevos_ralboard_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
Loading…
x
Reference in New Issue
Block a user