Skip to content

Commit

Permalink
Disable stat function to make loading files fast
Browse files Browse the repository at this point in the history
stat function seems to be very slow. It's used only for reading the
filesize, so it's disabled untill a better solution is found.
  • Loading branch information
rickgaiser committed Dec 29, 2020
1 parent fa30283 commit 63367d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/supportbase.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static int scanForISO(char *path, char type, struct game_list_t **glist)
char fullpath[256], startup[GAME_STARTUP_MAX];
struct dirent *dirent;
DIR *dir;
struct stat st;
//struct stat st;

cache.games = NULL;
cache.count = 0;
Expand Down Expand Up @@ -353,13 +353,13 @@ static int scanForISO(char *path, char type, struct game_list_t **glist)
}
}

sprintf(fullpath, "%s/%s", path, dirent->d_name);
stat(fullpath, &st);
//sprintf(fullpath, "%s/%s", path, dirent->d_name);
//stat(fullpath, &st);

game->parts = 1;
game->media = type;
game->format = format;
game->sizeMB = st.st_size >> 20;
game->sizeMB = -1; //st.st_size >> 20;

count++;
}
Expand Down

0 comments on commit 63367d2

Please sign in to comment.