Skip to content

Commit

Permalink
use default mapping if initializing map with no game loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Mar 31, 2024
1 parent a7d5026 commit a19ec00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cheevos/cheevos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a19ec00

Please sign in to comment.