Skip to content

Commit

Permalink
Fix small double load bug
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed Aug 10, 2024
1 parent 83bc048 commit 0b86250
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/retro_achievements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ namespace
{
void retro_achievements_game_image_loaded(ra_game_state_ptr game_state)
{
printf("Func: retro_achievements_game_image_loaded\n");
const rc_client_game_t* game = rc_client_get_game_info(ra_state->rc_client);
rc_client_user_game_summary_t summary;
rc_client_get_user_game_summary(ra_state->rc_client, &summary);
Expand Down Expand Up @@ -1067,11 +1068,12 @@ void retro_achievements_shutdown()
bool retro_achievements_load_game()
{
if (!ra_state->emu_state->rom_loaded)
return false;
return true;

const rc_client_user_t* user = rc_client_get_user_info(ra_state->rc_client);
if (!user)
return false;
return true; // not logged in or login in progress, in which case the game will be loaded
// when the login is done

if (ra_state->game_state && ra_state->game_state->outstanding_requests.load() != 0)
return false;
Expand Down

0 comments on commit 0b86250

Please sign in to comment.