mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-29 23:42:14 +00:00
Merge pull request #2395 from heuripedes/master
Database lookup performance improvements
This commit is contained in:
commit
72b90e0d6c
@ -132,7 +132,7 @@ RFILE *retro_fopen(const char *path, unsigned mode, ssize_t len)
|
||||
#endif
|
||||
stream->hints &= ~RFILE_HINT_MMAP;
|
||||
|
||||
switch (mode)
|
||||
switch (mode & 0xff)
|
||||
{
|
||||
case RFILE_MODE_READ:
|
||||
#if defined(VITA) || defined(PSP)
|
||||
|
@ -12,7 +12,7 @@ LUA_CONVERTER_C = \
|
||||
lua_converter.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
|
||||
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat.c
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
|
||||
|
||||
LUA_CONVERTER_C_OBJS := $(LUA_CONVERTER_C:.c=.o)
|
||||
|
||||
@ -28,7 +28,7 @@ PLAIN_CONVERTER_C = \
|
||||
$(LIBRETRO_COMMON_DIR)/hash/rhash.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
|
||||
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat.c
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
|
||||
|
||||
PLAIN_CONVERTER_C_OBJS := $(PLAIN_CONVERTER_C:.c=.o)
|
||||
|
||||
@ -41,7 +41,7 @@ RARCHDB_TOOL_C = \
|
||||
libretrodb.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
|
||||
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat.c
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
|
||||
|
||||
RARCHDB_TOOL_OBJS := $(RARCHDB_TOOL_C:.c=.o)
|
||||
|
||||
@ -54,7 +54,7 @@ TESTLIB_C = \
|
||||
rmsgpack_dom.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
|
||||
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat.c
|
||||
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
|
||||
|
||||
TESTLIB_OBJS := $(TESTLIB_C:.c=.o)
|
||||
|
||||
|
@ -308,6 +308,11 @@ static int database_info_list_iterate_found_match(
|
||||
|
||||
content_playlist_write_file(playlist);
|
||||
content_playlist_free(playlist);
|
||||
|
||||
database_info_list_free(db_state->info);
|
||||
db_state->info = NULL;
|
||||
db_state->crc = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -354,7 +359,7 @@ static int database_info_iterate_crc_lookup(
|
||||
db_state->crc, db_info_entry->crc32, db_info_entry->name);
|
||||
#endif
|
||||
if (db_state->crc == db_info_entry->crc32)
|
||||
database_info_list_iterate_found_match(db_state, db, zip_entry);
|
||||
return database_info_list_iterate_found_match(db_state, db, zip_entry);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user