Skip to content

Commit

Permalink
Fix issue #46
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-spataru committed Jan 18, 2017
1 parent 1f95699 commit 5d79337
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
11 changes: 0 additions & 11 deletions lib/QJoysticks/src/QJoysticks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/

#include <QDebug>
#include <QThread>
#include <QSettings>
#include <QJoysticks.h>
#include <QJoysticks/SDL_Joysticks.h>
Expand All @@ -33,14 +32,6 @@ QJoysticks::QJoysticks()
m_sdlJoysticks = new SDL_Joysticks;
m_virtualJoystick = new VirtualJoystick;

/* Move SDL handler to another thread */
m_thread = new QThread;
m_thread->start (QThread::NormalPriority);
m_sdlJoysticks->moveToThread (m_thread);

/* Destroy the thread when it quits */
connect (m_thread, SIGNAL (finished()), m_thread, SLOT (deleteLater()));

/* Configure SDL joysticks */
connect (sdlJoysticks(), &SDL_Joysticks::POVEvent,
this, &QJoysticks::POVEvent);
Expand Down Expand Up @@ -80,8 +71,6 @@ QJoysticks::~QJoysticks()
delete m_settings;
delete m_sdlJoysticks;
delete m_virtualJoystick;

m_thread->exit();
}

/**
Expand Down
1 change: 0 additions & 1 deletion lib/QJoysticks/src/QJoysticks.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ private slots:
private:
bool m_sortJoyticks;

QThread* m_thread;
QSettings* m_settings;
SDL_Joysticks* m_sdlJoysticks;
VirtualJoystick* m_virtualJoystick;
Expand Down

0 comments on commit 5d79337

Please sign in to comment.