1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 20:25:47 +00:00
This commit is contained in:
aliaspider 2016-01-23 04:26:19 +01:00
parent 964f0f7926
commit 1fe10855e9
2 changed files with 80 additions and 80 deletions

View File

@ -12,12 +12,12 @@ endif
LUA_CONVERTER_C = \
rmsgpack.c \
rmsgpack_dom.c \
lua_common.c \
libretrodb.c \
bintree.c \
query.c \
lua_converter.c \
rmsgpack_dom.c \
lua_common.c \
libretrodb.c \
bintree.c \
query.c \
lua_converter.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
@ -28,10 +28,10 @@ PLAIN_CONVERTER_C = \
lexer.c \
parser.c \
rmsgpack.c \
rmsgpack_dom.c \
libretrodb.c \
bintree.c \
query.c \
rmsgpack_dom.c \
libretrodb.c \
bintree.c \
query.c \
plain_converter.c \
$(LIBRETRO_COMMON_DIR)/hash/rhash.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
@ -42,10 +42,10 @@ PLAIN_CONVERTER_OBJS := $(PLAIN_CONVERTER_C:.c=.o)
C_CONVERTER_C = \
rmsgpack.c \
rmsgpack_dom.c \
libretrodb.c \
bintree.c \
query.c \
rmsgpack_dom.c \
libretrodb.c \
bintree.c \
query.c \
c_converter.c \
$(LIBRETRO_COMMON_DIR)/hash/rhash.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
@ -55,28 +55,28 @@ C_CONVERTER_C = \
C_CONVERTER_OBJS := $(C_CONVERTER_C:.c=.o)
RARCHDB_TOOL_C = \
rmsgpack.c \
rmsgpack_dom.c \
libretrodb_tool.c \
bintree.c \
query.c \
libretrodb.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
rmsgpack.c \
rmsgpack_dom.c \
libretrodb_tool.c \
bintree.c \
query.c \
libretrodb.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
RARCHDB_TOOL_OBJS := $(RARCHDB_TOOL_C:.c=.o)
TESTLIB_C = \
testlib.c \
query.c \
libretrodb.c \
bintree.c \
rmsgpack.c \
rmsgpack_dom.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
testlib.c \
query.c \
libretrodb.c \
bintree.c \
rmsgpack.c \
rmsgpack_dom.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_fnmatch.c \
$(LIBRETRO_COMMON_DIR)/file/retro_file.c \
$(LIBRETRO_COMMON_DIR)/compat/compat_strl.c
TESTLIB_OBJS := $(TESTLIB_C:.c=.o)

View File

@ -95,59 +95,59 @@ set_nil:
lua_pop(L, 1);
}
#if 1
/* re-order to avoid random output each run */
struct rmsgpack_dom_pair* ordered_pairs = calloc(out->val.map.len, sizeof(struct rmsgpack_dom_pair));
struct rmsgpack_dom_pair* ordered_pairs_outp = ordered_pairs;
const char* ordered_keys[] =
/* re-order to avoid random output each run */
struct rmsgpack_dom_pair* ordered_pairs = calloc(out->val.map.len, sizeof(struct rmsgpack_dom_pair));
struct rmsgpack_dom_pair* ordered_pairs_outp = ordered_pairs;
const char* ordered_keys[] =
{
"name",
"description",
"rom_name",
"size",
"users",
"releasemonth",
"releaseyear",
"rumble",
"analog",
"famitsu_rating",
"edge_rating",
"edge_issue",
"edge_review",
"enhancement_hw",
"barcode",
"esrb_rating",
"elspa_rating",
"pegi_rating",
"cero_rating",
"franchise",
"developer",
"publisher",
"origin",
"crc",
"md5",
"sha1",
"serial"
};
for(i = 0; i < (sizeof(ordered_keys)/sizeof(char*)); i++)
{
int j;
for(j = 0; j < out->val.map.len; j++)
{
"name",
"description",
"rom_name",
"size",
"users",
"releasemonth",
"releaseyear",
"rumble",
"analog",
"famitsu_rating",
"edge_rating",
"edge_issue",
"edge_review",
"enhancement_hw",
"barcode",
"esrb_rating",
"elspa_rating",
"pegi_rating",
"cero_rating",
"franchise",
"developer",
"publisher",
"origin",
"crc",
"md5",
"sha1",
"serial"
};
for(i = 0; i < (sizeof(ordered_keys)/sizeof(char*)); i++)
{
int j;
for(j = 0; j < out->val.map.len; j++)
if(!strcmp(ordered_keys[i], out->val.map.items[j].key.val.string.buff))
{
if(!strcmp(ordered_keys[i], out->val.map.items[j].key.val.string.buff))
{
*ordered_pairs_outp++ = out->val.map.items[j];
break;
}
*ordered_pairs_outp++ = out->val.map.items[j];
break;
}
}
}
free(out->val.map.items);
out->val.map.items = ordered_pairs;
out->val.map.len = ordered_pairs_outp - ordered_pairs;
free(out->val.map.items);
out->val.map.items = ordered_pairs;
out->val.map.len = ordered_pairs_outp - ordered_pairs;
#endif
rv = 0;