bool ThreeDMouse::startSampling() { bool started(false); if ( mThread == NULL ) { openMouse(mPortName); void sampleMouse(void*); mExitFlag = false; try { mThread = new vpr::Thread(boost::bind(&ThreeDMouse::controlLoop, this)); started = true; } catch (vpr::Exception& ex) { vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL) << clrOutBOLD(clrRED, "ERROR") << ": Failed to spawn thread for Logitech 3D mouse driver!\n" << vprDEBUG_FLUSH; vprDEBUG_NEXT(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL) << ex.what() << std::endl << vprDEBUG_FLUSH; } } return started; }
static void openDisplay(void) { DPRINTF("openDisplay\n"); openMouse(); openKeyboard(); openFramebuffer(); // init mouse after setting graf mode on tty avoids packets being // snarfed by gpm ms->init(ms); }