static void closeDisplay(void) { DPRINTF("closeDisplay\n"); closeFramebuffer(); closeKeyboard(); closeMouse(); }
void closeGL(){ closeMouse(); eglSwapBuffers(display, surface); // Release OpenGL resources eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); eglDestroySurface( display, surface ); eglDestroyContext( display, context ); eglTerminate( display ); }
int initMouse(){ closeMouse(); mouse.x = viewport.z*0.5; mouse.y = viewport.w*0.5; std::string mouseAddress = searchForDevice(MOUSE_ID); std::cout << "Mouse [" << mouseAddress << "]"<< std::endl; mouse_fd = open(mouseAddress.c_str(), O_RDONLY | O_NONBLOCK); return mouse_fd; }
// end // Closes anything that remains open in the object, and then // closes DirectInput if needed. bool diMouseClass::end() { if (!initializedDI) return false; if (initializedM) { if (!closeMouse()) return false; } initializedDI=!directInputBaseClass::end(); return !initializedDI; }
bool ThreeDMouse::stopSampling() { // Tell thread to stop polling for data and then join and wait for it to // complete if ( mThread != NULL ) { mExitFlag = true; mThread->join(); delete mThread; mThread = NULL; closeMouse(); std::cout << "stopping the ThreeDMouse.." << std::endl; } return true; }