I have an application that communicates (using primarily UDP sockets) with a variety of sensors, and with the user via button pushes, etc. It has been working fine. Now the users want to add a USB joystick to it.
I did the requisite Google searches, and found joypick. https://code.google.com/p/joypick/. I copied much of the code from joypick into my application, making changes as necessary to fit my windowing approach, etc.
Although joypick compiles and executes just fine, when I use its qjoystick.cpp (without changes) in my code, it hangs up at a line
Qt Code:
SDL_Event event; SDL_PollEvent(&event);To copy to clipboard, switch view to plain text mode
joypick doesn't do this. My suspicion is that the SDL event loop is somehow getting robbed of events by the qt event loop, but I dont know how to prevent it. joypick doesn't seem do anything special along these lines. Any ideas? I detect and initialize the joystick just fine, can count its buttons and axes, etc, but the event poll never returns
Thanks in advance
I guess I should have indicated that I am using Windows 7, QT 4.7.4 with mingw, and SDL 1.2.15
Bookmarks