Ejemplo n.º 1
0
static void closeDisplay(void)
{
  DPRINTF("closeDisplay\n");
  closeFramebuffer();
  closeKeyboard();
  closeMouse();
}
Ejemplo n.º 2
0
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 );
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
// 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;
}
Ejemplo n.º 5
0
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;
}