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

master
Glenn Maynard 6 years ago
parent 00271c3e15
commit 0184e46022
  1. 5
      smx-config/SMX.cs

@ -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…
Cancel
Save