mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-16 22:01:11 +00:00
Short command to load configuration file
This commit is contained in:
+9
-4
@@ -252,10 +252,15 @@ void config_parse(int argc, char* argv[], PCONFIGURATION config) {
|
|||||||
config->inputsCount = 0;
|
config->inputsCount = 0;
|
||||||
config->mapping = get_path("mappings/default.conf");
|
config->mapping = get_path("mappings/default.conf");
|
||||||
|
|
||||||
int option_index = 0;
|
if (argc == 2 && access(argv[1], F_OK) == 0) {
|
||||||
int c;
|
config->action = "stream";
|
||||||
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:lm:no:p:q:", long_options, &option_index)) != -1) {
|
config_file_parse(argv[1], config);
|
||||||
parse_argument(c, optarg, config);
|
} else {
|
||||||
|
int option_index = 0;
|
||||||
|
int c;
|
||||||
|
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:lm:no:p:q:", long_options, &option_index)) != -1) {
|
||||||
|
parse_argument(c, optarg, config);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config->config_file != NULL)
|
if (config->config_file != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user