diff --git a/src/adl.cpp b/src/adl.cpp index 6d4888a..971809c 100644 --- a/src/adl.cpp +++ b/src/adl.cpp @@ -192,6 +192,7 @@ int initializeADL() // Get the AdapterInfo structure for all adapters in the system ADL_Adapter_AdapterInfo_Get(lpAdapterInfo, sizeof(AdapterInfo)* iNumberAdapters); } + printf("num adapters: %i", iNumberAdapters); return TRUE; } diff --git a/src/gpu.h b/src/gpu.h index eca706e..66453f5 100644 --- a/src/gpu.h +++ b/src/gpu.h @@ -29,11 +29,12 @@ struct gpuInfo{ }; extern struct gpuInfo gpu_info; - +extern bool init_adl; // Nvidia linux void getNvidiaGpuInfo(void); void getAmdGpuInfo(void); // Amd windows int query_adl(void); -uint32_t adl_vendorid(void); \ No newline at end of file +uint32_t adl_vendorid(void); +int initializeADL(void); \ No newline at end of file diff --git a/src/nvidia_info.h b/src/nvidia_info.h index c59cdc2..ca9a34d 100644 --- a/src/nvidia_info.h +++ b/src/nvidia_info.h @@ -6,6 +6,7 @@ extern nvmlDevice_t nvidiaDevice; extern struct nvmlUtilization_st nvidiaUtilization; extern struct nvmlMemory_st nvidiaMemory; extern bool nvmlSuccess; +extern bool init_nvapi_bool; bool checkNVML(const char* pciBusId); bool checkNVAPI(void); diff --git a/src/overlay.cpp b/src/overlay.cpp index 20ab90e..53edc2d 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -808,6 +808,13 @@ void init_gpu_stats(uint32_t& vendorID, overlay_params& params) // NVIDIA or Intel but maybe has Optimus #ifdef _WIN32 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 #ifdef __gnu_linux__