From 302f9aecc1c1cd9b7b634efe50d7bc3f2576ecbc Mon Sep 17 00:00:00 2001 From: Andreas Hagmann Date: Sun, 17 Nov 2013 02:02:21 +0100 Subject: fix SVDRP commands --- gamepad.c | 7 +++++-- 1 file 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"; } -- cgit v1.2.3