From a19ec003e6570536e65e690fd354925ac6590c9d Mon Sep 17 00:00:00 2001 From: Jamiras Date: Sun, 31 Mar 2024 10:48:48 -0600 Subject: [PATCH] use default mapping if initializing map with no game loaded --- cheevos/cheevos.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cheevos/cheevos.c b/cheevos/cheevos.c index 3168418d6a4..6261ed7ea5a 100644 --- a/cheevos/cheevos.c +++ b/cheevos/cheevos.c @@ -216,11 +216,9 @@ static int rcheevos_init_memory(rcheevos_locals_t* locals) unsigned console_id; #ifdef HAVE_RC_CLIENT - /* we can't initialize memory without knowing which console to initialize for */ + /* if no game is loaded, fallback to a default mapping (SYSTEM RAM followed by SAVE RAM) */ game = rc_client_get_game_info(locals->client); - if (!game || !game->console_id) - return 0; - console_id = game->console_id; + console_id = game ? game->console_id : 0; #else console_id = locals->game.console_id; #endif