Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Commit

Permalink
fixed crasher on large collection files
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Inman committed Jul 29, 2022
1 parent 6e091fa commit 020b401
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/miniui/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ static void getUniqueName(Entry* entry, char* out_name) {
}

static void Directory_index(Directory* self) {
int skip_index = exactMatch(Paths.fauxRecentDir, self->path) || prefixMatch(Paths.collectionsDir, self->path); // not alphabetized

Entry* prior = NULL;
int alpha = -1;
int index = 0;
Expand All @@ -247,13 +249,16 @@ static void Directory_index(Directory* self) {
entry->unique = strdup(entry_filename);
}
}
int a = getIndexChar(entry->name);
if (a!=alpha) {
index = self->alphas->count;
IntArray_push(self->alphas, i);
alpha = a;

if (!skip_index) {
int a = getIndexChar(entry->name);
if (a!=alpha) {
index = self->alphas->count;
IntArray_push(self->alphas, i);
alpha = a;
}
entry->alpha = index;
}
entry->alpha = index;

prior = entry;
}
Expand Down
2 changes: 2 additions & 0 deletions todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Please see the README.txt in the zip file for installation and update instructions.

DO NOT RELEASE UNTIL YOU FIX LARGE COLLECTION BACK OUT BLACKOUTS

- added Collections (see updated README.txt for info)
- added collated Roms folders with matching display names (see updated README.txt for info)
- changed default Screen size from Native to Aspect
Expand Down

0 comments on commit 020b401

Please sign in to comment.