Specify first argument as path to config for android

This commit is contained in:
RadialApps 2017-08-11 14:17:17 +05:30
parent eef8e2c24c
commit d7c9dfe2de

View file

@ -146,7 +146,7 @@ typedef std::vector<std::string> StringVec;
namespace po = boost::program_options; namespace po = boost::program_options;
#ifdef __ANDROID__ #ifdef __ANDROID__
#define CONF_FILE FULL_MKXP_PATH #define CONF_FILE ""
#else #else
#define CONF_FILE "mkxp.conf" #define CONF_FILE "mkxp.conf"
#endif #endif
@ -221,7 +221,11 @@ void Config::read(int argc, char *argv[])
} }
/* Parse configuration file */ /* Parse configuration file */
#ifdef __ANDROID__
SDLRWStream confFile(argv[1], "r");
#else
SDLRWStream confFile(CONF_FILE, "r"); SDLRWStream confFile(CONF_FILE, "r");
#endif
if (confFile) if (confFile)
{ {