Skip to content

Commit

Permalink
Minor improvements for db / playlist handling (libretro#16060)
Browse files Browse the repository at this point in the history
Do not load rom_name as nothing is using it (but it does occupy memory)
Add two more media index options for label sanitization
  • Loading branch information
zoltanvb authored and Sunderland93 committed Dec 26, 2024
1 parent d4a7302 commit 01af408
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions database_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,11 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur,
}
else if (string_is_equal(str, "rom_name"))
{
/* rom_name is not used anywhere in codebase, but is frequently added to DB */
#if 0
if (!string_is_empty(val_string))
db_info->rom_name = strdup(val_string);
#endif
}
else if (string_is_equal(str, "name"))
{
Expand Down
6 changes: 4 additions & 2 deletions libretro-common/playlists/label_sanitization.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
#include <string/stdstring.h>
#include <string.h>

#define DISC_STRINGS_LENGTH 3
#define DISC_STRINGS_LENGTH 5
#define REGION_STRINGS_LENGTH 20

const char *disc_strings[DISC_STRINGS_LENGTH] = {
"(CD",
"(Disc",
"(Disk"
"(Disk",
"(Side",
"(Tape"
};

/*
Expand Down

0 comments on commit 01af408

Please sign in to comment.