mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 06:11:51 +00:00
(Menu/database) Set label of MENU_FILE_RDB_ENTRY to rdb file so that we know
which database to perform query on again
This commit is contained in:
parent
e212f61114
commit
eb0863cb39
@ -139,13 +139,13 @@ static void libretrodb_write_index_header(int fd, libretrodb_index_t * idx)
|
||||
rmsgpack_write_uint(fd, idx->next);
|
||||
}
|
||||
|
||||
void libretrodb_close(libretrodb_t * db)
|
||||
void libretrodb_close(libretrodb_t *db)
|
||||
{
|
||||
close(db->fd);
|
||||
db->fd = -1;
|
||||
}
|
||||
|
||||
int libretrodb_open(const char * path, libretrodb_t * db)
|
||||
int libretrodb_open(const char *path, libretrodb_t *db)
|
||||
{
|
||||
libretrodb_header_t header;
|
||||
libretrodb_metadata_t md;
|
||||
@ -155,6 +155,7 @@ int libretrodb_open(const char * path, libretrodb_t * db)
|
||||
if (fd == -1)
|
||||
return -errno;
|
||||
|
||||
strcpy(db->path, path);
|
||||
db->root = lseek(fd, 0, SEEK_CUR);
|
||||
|
||||
if ((rv = read(fd, &header, sizeof(header))) == -1)
|
||||
|
@ -23,6 +23,7 @@ typedef struct libretrodb
|
||||
uint64_t root;
|
||||
uint64_t count;
|
||||
uint64_t first_index_offset;
|
||||
char path[1024];
|
||||
} libretrodb_t;
|
||||
|
||||
typedef struct libretrodb_index
|
||||
|
@ -55,7 +55,7 @@ static int menu_database_fetch_from_query(libretrodb_t *db,
|
||||
|
||||
if (!strcmp(key->string.buff, "description"))
|
||||
{
|
||||
menu_list_push(list, val->string.buff, "",
|
||||
menu_list_push(list, val->string.buff, db->path,
|
||||
MENU_FILE_RDB_ENTRY, 0);
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user