mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-10 01:10:27 +00:00
[Win32] Check adl and nvapi if either works
This commit is contained in:
parent
8bc64efa25
commit
2273cd30a4
@ -192,6 +192,7 @@ int initializeADL()
|
|||||||
// Get the AdapterInfo structure for all adapters in the system
|
// Get the AdapterInfo structure for all adapters in the system
|
||||||
ADL_Adapter_AdapterInfo_Get(lpAdapterInfo, sizeof(AdapterInfo)* iNumberAdapters);
|
ADL_Adapter_AdapterInfo_Get(lpAdapterInfo, sizeof(AdapterInfo)* iNumberAdapters);
|
||||||
}
|
}
|
||||||
|
printf("num adapters: %i", iNumberAdapters);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,11 +29,12 @@ struct gpuInfo{
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern struct gpuInfo gpu_info;
|
extern struct gpuInfo gpu_info;
|
||||||
|
extern bool init_adl;
|
||||||
// Nvidia linux
|
// Nvidia linux
|
||||||
void getNvidiaGpuInfo(void);
|
void getNvidiaGpuInfo(void);
|
||||||
void getAmdGpuInfo(void);
|
void getAmdGpuInfo(void);
|
||||||
|
|
||||||
// Amd windows
|
// Amd windows
|
||||||
int query_adl(void);
|
int query_adl(void);
|
||||||
uint32_t adl_vendorid(void);
|
uint32_t adl_vendorid(void);
|
||||||
|
int initializeADL(void);
|
@ -6,6 +6,7 @@ extern nvmlDevice_t nvidiaDevice;
|
|||||||
extern struct nvmlUtilization_st nvidiaUtilization;
|
extern struct nvmlUtilization_st nvidiaUtilization;
|
||||||
extern struct nvmlMemory_st nvidiaMemory;
|
extern struct nvmlMemory_st nvidiaMemory;
|
||||||
extern bool nvmlSuccess;
|
extern bool nvmlSuccess;
|
||||||
|
extern bool init_nvapi_bool;
|
||||||
|
|
||||||
bool checkNVML(const char* pciBusId);
|
bool checkNVML(const char* pciBusId);
|
||||||
bool checkNVAPI(void);
|
bool checkNVAPI(void);
|
||||||
|
@ -808,6 +808,13 @@ void init_gpu_stats(uint32_t& vendorID, overlay_params& params)
|
|||||||
// NVIDIA or Intel but maybe has Optimus
|
// NVIDIA or Intel but maybe has Optimus
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
bool nvSuccess = (checkNVML(nullptr) && getNVMLInfo());
|
bool nvSuccess = (checkNVML(nullptr) && getNVMLInfo());
|
||||||
|
init_adl = initializeADL();
|
||||||
|
init_nvapi_bool = checkNVAPI();
|
||||||
|
if(init_adl)
|
||||||
|
vendorID == 0x1002;
|
||||||
|
if(init_nvapi_bool)
|
||||||
|
vendorID == 0x10de;
|
||||||
|
printf("amd : %i", init_adl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __gnu_linux__
|
#ifdef __gnu_linux__
|
||||||
|
Loading…
Reference in New Issue
Block a user