Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
OFFTKP committed May 3, 2024
1 parent 8225c90 commit 3dec694
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/retro_achievements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1265,9 +1265,10 @@ void retro_achievements_draw_panel(int win_w)
se_boxed_image_dual_label(line1, line2, ICON_FK_TROPHY, image, 0, offset1, offset2);
if (se_button(ICON_FK_SIGN_OUT " Logout", ImVec2{0, 0}))
{
char login_info_path[SB_FILE_PATH_SIZE];
snprintf(login_info_path, SB_FILE_PATH_SIZE, "%sra_token.txt", se_get_pref_path());
remove(login_info_path);
std::string path = se_get_pref_path();
path += "ra_token.txt";

::remove(path.c_str());
rc_client_logout(ra_state->rc_client);
}

Expand Down
1 change: 1 addition & 0 deletions src/sb_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ static inline bool sb_path_has_file_ext(const char * path, const char * ext){
}
static bool sb_file_exists(const char * path){
FILE * f = fopen(path,"r");
printf("Checking for file %s: %d\n",path,f!=NULL);
if(f){fclose(f);return true;}
return false;
}
Expand Down

0 comments on commit 3dec694

Please sign in to comment.