mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-27 02:49:05 -04:00
Don't try to call AMD ADL calls if DLL did not load
This commit is contained in:
1 parent
12fbed760a
commit
3a32b4064f
1 file changed
+10
-9
@@ -181,16 +181,17 @@ void i2c_smbus_amdadl_detect(std::vector<i2c_smbus_interface*> &busses)
|
||||
int gpu_count = 0;
|
||||
ADL_CONTEXT_HANDLE context;
|
||||
|
||||
LoadLibraries();
|
||||
|
||||
if (ADL_OK != ADL2_Main_Control_Create(::ADL_Main_Memory_Alloc, 1, &context))
|
||||
if(ADL_OK == LoadLibraries())
|
||||
{
|
||||
printf("Cannot get handle!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
i2c_smbus_amdadl * adl_bus = new i2c_smbus_amdadl(context);
|
||||
busses.push_back(adl_bus);
|
||||
if (ADL_OK != ADL2_Main_Control_Create(::ADL_Main_Memory_Alloc, 1, &context))
|
||||
{
|
||||
printf("Cannot get handle!\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
i2c_smbus_amdadl * adl_bus = new i2c_smbus_amdadl(context);
|
||||
busses.push_back(adl_bus);
|
||||
}
|
||||
}
|
||||
} /* DetectAMDADLI2CBusses() */
|
||||
|
||||
|
||||
Reference in new issue
Block a user