Fixed get_info calls for windows and other systems
This commit is contained in:
parent
94c6be83b5
commit
475ff4a8d6
1 changed files with 10 additions and 1 deletions
|
@ -1260,7 +1260,11 @@ int main(int argc, char* argv[]) {
|
||||||
if (cache_enabled) {
|
if (cache_enabled) {
|
||||||
// if no cache file found write to it
|
// if no cache file found write to it
|
||||||
if (!read_cache(&user_info)) {
|
if (!read_cache(&user_info)) {
|
||||||
|
#ifdef _WIN32
|
||||||
user_info = get_info(&config_flags);
|
user_info = get_info(&config_flags);
|
||||||
|
#else
|
||||||
|
user_info = get_info();
|
||||||
|
#endif
|
||||||
write_cache(&user_info);
|
write_cache(&user_info);
|
||||||
}
|
}
|
||||||
config_flags = parse_config(&user_info); // reading the config
|
config_flags = parse_config(&user_info); // reading the config
|
||||||
|
@ -1284,7 +1288,12 @@ int main(int argc, char* argv[]) {
|
||||||
{"image", optional_argument, NULL, 'i'},
|
{"image", optional_argument, NULL, 'i'},
|
||||||
{"list", no_argument, NULL, 'l'},
|
{"list", no_argument, NULL, 'l'},
|
||||||
{NULL, 0, NULL, 0}};
|
{NULL, 0, NULL, 0}};
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
user_info = get_info(&config_flags); // get the info to modify it with cmdline options
|
user_info = get_info(&config_flags); // get the info to modify it with cmdline options
|
||||||
|
#else
|
||||||
|
user_info = get_info();
|
||||||
|
#endif
|
||||||
config_flags = parse_config(&user_info); // same as user_info
|
config_flags = parse_config(&user_info); // same as user_info
|
||||||
|
|
||||||
// reading cmdline options
|
// reading cmdline options
|
||||||
|
|
Loading…
Reference in a new issue