Config: Parse from command line options on top of config file

Any options that are not arrays (ie. RTP paths) specified
as command line options will override entries in mkxp.conf.

The syntax is: --<option>=<value>
This commit is contained in:
Jonas Kulla 2014-01-10 20:16:34 +01:00
parent b8fc5e25b9
commit 20e323c699
3 changed files with 17 additions and 8 deletions

View file

@ -224,7 +224,7 @@ int rgssThreadFun(void *userdata)
return 0;
}
int main(int, char *argv[])
int main(int argc, char *argv[])
{
/* initialize SDL first */
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0)
@ -253,7 +253,7 @@ int main(int, char *argv[])
/* now we load the config */
Config conf;
conf.read();
conf.read(argc, argv);
conf.readGameINI();
int imgFlags = IMG_INIT_PNG | IMG_INIT_JPG;