Make sure GetConfig returns a valid stub SMXConfig if the DLL isn't present.
This commit is contained in:
parent
00271c3e15
commit
0184e46022
@ -487,11 +487,10 @@ namespace SMX
|
|||||||
public static bool GetConfig(int pad, out SMXConfig config)
|
public static bool GetConfig(int pad, out SMXConfig config)
|
||||||
{
|
{
|
||||||
if(!DLLAvailable()) {
|
if(!DLLAvailable()) {
|
||||||
config = new SMXConfig();
|
config = SMXConfig.Create();
|
||||||
config.enabledSensors = new Byte[5];
|
|
||||||
config.stepColor = new Byte[3*9];
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return SMX_GetConfig(pad, out config);
|
return SMX_GetConfig(pad, out config);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user