mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-10-31 15:20:13 +00:00
Return bool from checkNvidia()
This commit is contained in:
parent
56099d1035
commit
f559730d2f
@ -9,5 +9,5 @@ extern nvmlDevice_t nvidiaDevice;
|
||||
extern struct nvmlUtilization_st nvidiaUtilization;
|
||||
extern bool nvmlSuccess;
|
||||
|
||||
void checkNvidia(void);
|
||||
bool checkNvidia(void);
|
||||
void getNvidiaInfo(void);
|
@ -9,17 +9,19 @@ bool nvmlSuccess = false;
|
||||
unsigned int nvidiaTemp;
|
||||
struct nvmlUtilization_st nvidiaUtilization;
|
||||
|
||||
void checkNvidia(){
|
||||
bool checkNvidia(){
|
||||
if (nvml.IsLoaded()){
|
||||
result = nvml.nvmlInit();
|
||||
if (NVML_SUCCESS != result) {
|
||||
printf("MANGOHUD: Nvidia module not loaded\n");
|
||||
} else {
|
||||
nvmlSuccess = true;
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
printf("Failed to load NVML!\n");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void getNvidiaInfo(){
|
||||
|
Loading…
Reference in New Issue
Block a user