diff --git a/src/main.c b/src/main.c index 007eb76..2716665 100644 --- a/src/main.c +++ b/src/main.c @@ -300,18 +300,18 @@ int main(int argc, char *argv[]) { // Buffer to store the NVML GPU name char nvmlGpuName[256]; - // Buffer to store the NVAPI GPU name - NvAPI_ShortString nvapiGpuName; - // Retrieve the NVML GPU name - NVML_CALL(nvmlDeviceGetName(nvmlDevices[i], nvmlGpuName, sizeof(gpuName)), errored); - - // Retrieve the NVAPI GPU name - NVAPI_CALL(NvAPI_GPU_GetFullName(nvapiDevices[i], nvapiGpuName), errored) + NVML_CALL(nvmlDeviceGetName(nvmlDevices[i], nvmlGpuName, sizeof(nvmlGpuName)), errored); // Print the managed GPU details printf("(NVML) %u. %s (GPU id = %u)\n", managedGPUs, nvmlGpuName, i); + // Buffer to store the NVAPI GPU name + NvAPI_ShortString nvapiGpuName; + + // Retrieve the NVAPI GPU name + NVAPI_CALL(NvAPI_GPU_GetFullName(nvapiDevices[i], nvapiGpuName), errored); + // Print the managed GPU details printf("(NVAPI) %u. %s (GPU id = %u)\n", managedGPUs, nvapiGpuName, i);