diff --git a/cheevos/cheevos.c b/cheevos/cheevos.c index 5a7687dc64..0b9a1ea075 100644 --- a/cheevos/cheevos.c +++ b/cheevos/cheevos.c @@ -258,7 +258,7 @@ typedef struct typedef struct { - int console_id; + cheevos_console_t console_id; bool core_supports; bool addrs_patched; int add_buffer; @@ -276,7 +276,7 @@ typedef struct static cheevos_locals_t cheevos_locals = { - /* console_id */ 0, + /* console_id */ CHEEVOS_CONSOLE_NONE, /* core_supports */ true, /* addrs_patched */ false, /* add_buffer */ 0, @@ -1385,7 +1385,7 @@ static int cheevos_read__json_number(void *userdata, } else if (ud->is_console_id) { - cheevos_locals.console_id = (int)strtol(number, NULL, 10); + cheevos_locals.console_id = (cheevos_console_t)strtol(number, NULL, 10); ud->is_console_id = 0; } diff --git a/cheevos/cheevos.h b/cheevos/cheevos.h index cf2526e504..ed1baae311 100644 --- a/cheevos/cheevos.h +++ b/cheevos/cheevos.h @@ -47,6 +47,7 @@ typedef struct cheevos_ctx_desc typedef enum { + CHEEVOS_CONSOLE_NONE = 0, /* Don't change those, the values match the console IDs * at retroachievements.org. */ CHEEVOS_CONSOLE_MEGA_DRIVE = 1,