1
0
Fork 0

Move config dir detection earlier

Setting up configuration file location is a dependency for:

$ dosbox -printconf
$ dosbox -editconf vim
$ dosbox -eraseconf

Wee need to have cache initialized before these parameters are handled.
This commit is contained in:
Patryk Obara 2020-04-27 18:22:24 +02:00 committed by Patryk Obara
parent 1bd770b5b4
commit 83e1a3a944

View file

@ -3089,6 +3089,8 @@ int main(int argc, char* argv[]) {
Disable_OS_Scaling(); //Do this early on, maybe override it through some parameter.
OverrideWMClass(); // Before SDL2 video subsystem is initialized
CROSS_DetermineConfigPaths();
CommandLine com_line(argc,argv);
Config myconf(&com_line);
control=&myconf;
@ -3156,8 +3158,6 @@ int main(int argc, char* argv[]) {
sdl.laltstate = SDL_KEYUP;
sdl.raltstate = SDL_KEYUP;
CROSS_DetermineConfigPaths();
/* Parse configuration files */
std::string config_file, config_path, config_combined;
Cross::GetPlatformConfigDir(config_path);