summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgamepad.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gamepad.c b/gamepad.c
index 672ab2f..7432e09 100755
--- a/gamepad.c
+++ b/gamepad.c
@@ -44,7 +44,10 @@ cPluginGamepad::cPluginGamepad(void) : processKeysThread(NULL)
cPluginGamepad::~cPluginGamepad()
{
- // Clean up after yourself!
+ if (processKeysThread != NULL)
+ {
+ delete processKeysThread;
+ }
}
const char *cPluginGamepad::CommandLineHelp(void)
@@ -78,7 +81,6 @@ void cPluginGamepad::Stop(void)
{
if (processKeysThread) {
processKeysThread->Cancel(10);
- processKeysThread = NULL;
}
}
@@ -147,6 +149,7 @@ cString cPluginGamepad::SVDRPCommand(const char *Command, const char *Option, in
{
if (strcasecmp(Command, "ENABLE") == 0)
{
+ Start();
ReplyCode = 900;
return "Enabled";
}