diff --git a/sdk/SMX.h b/sdk/SMX.h index 7ca2efd..cbff240 100644 --- a/sdk/SMX.h +++ b/sdk/SMX.h @@ -79,7 +79,10 @@ extern "C" SMX_API void SMX_SetLights(const char lightsData[864]); extern "C" SMX_API void SMX_ReenableAutoLights(); // Get the current controller's configuration. -extern "C" SMX_API void SMX_GetConfig(int pad, SMXConfig *config); +// +// Return true if a configuration is available. If false is returned, no panel is connected +// and no data will be set. +extern "C" SMX_API bool SMX_GetConfig(int pad, SMXConfig *config); // Update the current controller's configuration. This doesn't block, and the new configuration will // be sent in the background. SMX_GetConfig will return the new configuration as soon as this call diff --git a/sdk/Windows/SMX.cpp b/sdk/Windows/SMX.cpp index dd35a6f..0fd7e43 100644 --- a/sdk/Windows/SMX.cpp +++ b/sdk/Windows/SMX.cpp @@ -53,7 +53,7 @@ SMX_API void SMX_SetLogCallback(SMXLogCallback callback) }); } -SMX_API void SMX_GetConfig(int pad, SMXConfig *config) { g_pSMX->GetDevice(pad)->GetConfig(*config); } +SMX_API bool SMX_GetConfig(int pad, SMXConfig *config) { return g_pSMX->GetDevice(pad)->GetConfig(*config); } SMX_API void SMX_SetConfig(int pad, const SMXConfig *config) { g_pSMX->GetDevice(pad)->SetConfig(*config); } SMX_API void SMX_GetInfo(int pad, SMXInfo *info) { g_pSMX->GetDevice(pad)->GetInfo(*info); } SMX_API uint16_t SMX_GetInputState(int pad) { return g_pSMX->GetDevice(pad)->GetInputState(); }