summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hagmann <andreas@macbookpro.home>2013-11-17 00:20:29 (GMT)
committerAndreas Hagmann <andreas@macbookpro.home>2013-11-17 00:20:29 (GMT)
commit00b08b4737176cf653cd70967d06149b386d9667 (patch)
treefd9b0ab5c7c985eb4e42f98086baec2aaf318462
parent4a841324500141349322e39376389c5de4bdcf6a (diff)
downloadvdr-plugin-gamepad-00b08b4737176cf653cd70967d06149b386d9667.tar.gz
vdr-plugin-gamepad-00b08b4737176cf653cd70967d06149b386d9667.tar.bz2
fix config and startup
-rwxr-xr-xgamepad.c14
-rwxr-xr-xgamepad_handler_thread.c3
2 files changed, 6 insertions, 11 deletions
diff --git a/gamepad.c b/gamepad.c
index 9b7aac9..672ab2f 100755
--- a/gamepad.c
+++ b/gamepad.c
@@ -29,7 +29,6 @@ public:
virtual void MainThreadHook(void);
virtual cString Active(void);
virtual time_t WakeupTime(void);
- //virtual const char *MainMenuEntry(void) { return MAINMENUENTRY; }
virtual cOsdObject *MainMenuAction(void);
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
@@ -40,9 +39,7 @@ public:
cPluginGamepad::cPluginGamepad(void) : processKeysThread(NULL)
{
- // Initialize any member variables here.
- // DON'T DO ANYTHING ELSE THAT MAY HAVE SIDE EFFECTS, REQUIRE GLOBAL
- // VDR OBJECTS TO EXIST OR PRODUCE ANY OUTPUT!
+
}
cPluginGamepad::~cPluginGamepad()
@@ -71,12 +68,9 @@ bool cPluginGamepad::Initialize(void)
bool cPluginGamepad::Start(void)
{
- if (processKeysThread == NULL)
- {
- bool ret;
- ret = processKeysThread->Start();
- dsyslog("[gamepad] start handler returned %d", ret);
- }
+ bool ret;
+ ret = processKeysThread->Start();
+ dsyslog("[gamepad] start handler returned %d", ret);
return true;
}
diff --git a/gamepad_handler_thread.c b/gamepad_handler_thread.c
index b43d76c..76f4eca 100755
--- a/gamepad_handler_thread.c
+++ b/gamepad_handler_thread.c
@@ -8,6 +8,7 @@
#include "gamepad_handler_thread.h"
#include <vdr/tools.h>
#include <vdr/skins.h>
+#include "gamepad_config.h"
cGamepadHandlerThread::cGamepadHandlerThread(cEventFifo *_fifo) : cThread("gamepad_handler")
{
@@ -17,7 +18,7 @@ cGamepadHandlerThread::cGamepadHandlerThread(cEventFifo *_fifo) : cThread("gamep
void cGamepadHandlerThread::Action()
{
cGamepadHandler gamepad;
- gamepad.connect("/dev/input/js2");
+ gamepad.connect(gamepadConfig.device);
if (gamepad.ready())
{