[v0.20] Print help message when no GPU is detected to help people understand whats going on

This commit is contained in:
Dr-Noob
2021-12-21 17:02:08 +01:00
parent 3e9f72fcf0
commit a20e93f4db
6 changed files with 70 additions and 31 deletions

View File

@@ -71,6 +71,15 @@ int main(int argc, char* argv[]) {
return print_gpus_list(list);
}
if(get_num_gpus_available(list) == 0) {
printErr("No GPU was detected, or the detected GPU is not supported by gpufetch");
printf("Please, make sure that the appropiate backend is enabled:\n");
print_enabled_backends();
printf("Visit https://github.com/Dr-Noob/gpufetch#2-backends for more information\n");
return EXIT_FAILURE;
}
set_log_level(true);
printf("[WARNING]: gpufetch is in beta. The provided information may be incomplete or wrong.\n\