From a218c36a0a26dc5b3816d830f39694df834251d1 Mon Sep 17 00:00:00 2001 From: Jamiras <32680403+Jamiras@users.noreply.github.com> Date: Tue, 2 Apr 2024 01:07:06 -0600 Subject: [PATCH] use default mapping if initializing map with no game loaded (#16396) --- cheevos/cheevos.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cheevos/cheevos.c b/cheevos/cheevos.c index 3168418d6a..6261ed7ea5 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