Do Proper cleanup in usb_read_thread.cpp
This commit is contained in:
parent
8cca647951
commit
cf481429a2
2 changed files with 5 additions and 8 deletions
8
TODO
8
TODO
|
@ -20,14 +20,6 @@ Stuff to do before 0.5 release:
|
|||
|
||||
* figure out a way to make userspace force feedback driver not become dead processes
|
||||
|
||||
* try out soft realtime scheduling: http://www.ddj.com/linux-open-source/184402031
|
||||
to fix missed events on some controller
|
||||
|
||||
setting timeout = 0 fixes missing issues, but breaks relativeaxis and autofire
|
||||
other alternative would be to go multithreaded
|
||||
|
||||
Write usb_thread.?pp thing to read usb data with timeout=0
|
||||
|
||||
* add a --mimic-xpad option that behaves exactly like xpad
|
||||
|
||||
* better keyboard emulation via analog sticks: axis must not be
|
||||
|
|
|
@ -33,6 +33,11 @@ USBReadThread::USBReadThread(struct usb_dev_handle* handle, int endpoint, int le
|
|||
|
||||
USBReadThread::~USBReadThread()
|
||||
{
|
||||
if (!m_stop)
|
||||
stop_thread();
|
||||
|
||||
for(std::list<Paket>::iterator i = m_read_buffer.begin(); i != m_read_buffer.end(); ++i)
|
||||
delete[] i->data;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Add table
Reference in a new issue