Fix circular `--config` for SDL port.
When using the command line options, we had a circular issue: - using `LoadConfig()` before `ReadOpts()` would mean the `--config` is ignored. - using `ReadOpts()` before `LoadConfig()` would mean the command line options were ignored in favor of the default ones. If we want to use a custom `vbam.ini`, we need to load it with `--config`. Now we only consider params order on command line.
This commit is contained in:
parent
1aa8afb4dc
commit
806dd7daa6
|
@ -898,6 +898,7 @@ int ReadOpts(int argc, char ** argv)
|
||||||
preferences = NULL;
|
preferences = NULL;
|
||||||
OpenPreferences(optarg);
|
OpenPreferences(optarg);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
LoadConfig();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
|
|
|
@ -1538,8 +1538,8 @@ int main(int argc, char** argv)
|
||||||
gb_effects_config.surround = false;
|
gb_effects_config.surround = false;
|
||||||
gb_effects_config.enabled = false;
|
gb_effects_config.enabled = false;
|
||||||
|
|
||||||
ReadOpts(argc, argv);
|
|
||||||
LoadConfig(); // Parse command line arguments (overrides ini)
|
LoadConfig(); // Parse command line arguments (overrides ini)
|
||||||
|
ReadOpts(argc, argv);
|
||||||
|
|
||||||
inputSetKeymap(PAD_1, KEY_LEFT, ReadPrefHex("Joy0_Left"));
|
inputSetKeymap(PAD_1, KEY_LEFT, ReadPrefHex("Joy0_Left"));
|
||||||
inputSetKeymap(PAD_1, KEY_RIGHT, ReadPrefHex("Joy0_Right"));
|
inputSetKeymap(PAD_1, KEY_RIGHT, ReadPrefHex("Joy0_Right"));
|
||||||
|
|
Loading…
Reference in New Issue