Fixed get_info calls for windows and other systems

This commit is contained in:
TheDarkBug 2021-12-23 16:27:43 +01:00
parent 94c6be83b5
commit 475ff4a8d6

View file

@ -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