summaryrefslogtreecommitdiff
path: root/romdb.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2015-11-04 22:48:27 -0800
committerMichael Pavone <pavone@retrodev.com>2015-11-04 22:48:27 -0800
commit3324456c65b747ab56158e9c7683be302761ed7a (patch)
treea135a98bb14a76d2507108e2ceb248401b41e44f /romdb.c
parente26893e5625ceffa1214024ed3191b155d56de6f (diff)
Load config file and rom.db from appropriate locations on Android
Diffstat (limited to 'romdb.c')
-rw-r--r--romdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/romdb.c b/romdb.c
index 53a8fde..bf89f88 100644
--- a/romdb.c
+++ b/romdb.c
@@ -384,6 +384,9 @@ uint8_t read_eeprom_i2c_b(uint32_t address, void * context)
tern_node *load_rom_db()
{
+#ifdef __ANDROID__
+ tern_node *db = parse_config_file_assets("rom.db");
+#else
char *exe_dir = get_exe_dir();
if (!exe_dir) {
fatal_error("Failed to find executable path\n");
@@ -391,6 +394,7 @@ tern_node *load_rom_db()
char *path = alloc_concat(exe_dir, "/rom.db");
tern_node *db = parse_config_file(path);
free(path);
+#endif
if (!db) {
fatal_error("Failed to load ROM DB\n");
}