Skip to content

Commit

Permalink
Temporarily hide 9bpp & 12bpp profiles that don't work on Pi zero 2
Browse files Browse the repository at this point in the history
  • Loading branch information
IanSB committed Oct 30, 2021
1 parent ca263ba commit 8f9942a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/defs.h
Expand Up @@ -121,6 +121,7 @@
#if defined(RPI2) || defined(RPI3) // Pi4 may not need these
#define USE_ALT_M7DEINTERLACE_CODE // uses re-ordered code for bob and simple motion deinterlace
#define USE_CACHED_COMPARISON_BUFFER // uses cached memory for the comparison buffer with simple & advanced motion deinterlace
#define HIDE_12BIT_PROFILES
#define INHIBIT_DOUBLE_HEIGHT // inhibit line doubling as it causes memory stalls with Pi2 & Pi3
#endif

Expand Down
23 changes: 20 additions & 3 deletions src/filesystem.c
Expand Up @@ -585,15 +585,32 @@ void scan_profiles(char profile_names[MAX_PROFILES][MAX_PROFILE_WIDTH], int has_
res = f_readdir(&dir, &fno);
if (res != FR_OK || fno.fname[0] == 0 || *count == MAX_PROFILES) break;
if (fno.fattrib & AM_DIR) {
#ifdef HIDE_12BIT_PROFILES // temporarily hide 12 bit profiles on pi zero 2
if (!(strcmp(fno.fname, "Amiga") == 0
|| strcmp(fno.fname, "Amiga_2000") == 0
|| strcmp(fno.fname, "Amiga_Var-Scanlines") == 0
|| strcmp(fno.fname, "Atari_ST") == 0
|| strcmp(fno.fname, "Atari_STE") == 0
|| strcmp(fno.fname, "Apple_IIGS") == 0))
#endif
{
strncpy(profile_names[*count], fno.fname, MAX_PROFILE_WIDTH);
(*count)++;
}
} else {
if (fno.fname[0] != '.' && strlen(fno.fname) > 4 && strcmp(fno.fname, DEFAULTTXT_STRING) != 0) {
char* filetype = fno.fname + strlen(fno.fname)-4;
if (strcmp(filetype, ".txt") == 0) {
strncpy(profile_names[*count], fno.fname, MAX_PROFILE_WIDTH);
profile_names[*count][strlen(fno.fname) - 4] = 0;
(*count)++;
#ifdef HIDE_12BIT_PROFILES
if (!(strcmp(fno.fname, "Sam_Coupe.txt") == 0
|| strcmp(fno.fname, "BBC_NuLA_3bpp_Mode7.txt") == 0
|| strcmp(fno.fname, "BBC_NuLA_12bpp_Mode7.txt") == 0))
#endif
{
strncpy(profile_names[*count], fno.fname, MAX_PROFILE_WIDTH);
profile_names[*count][strlen(fno.fname) - 4] = 0;
(*count)++;
}
}
}
}
Expand Down

0 comments on commit 8f9942a

Please sign in to comment.