Make sure GetConfig returns a valid stub SMXConfig if the DLL isn't present.

This commit is contained in:
Glenn Maynard 2019-04-16 22:22:12 -05:00
parent 00271c3e15
commit 0184e46022

View File

@ -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);
} }