示例#1
0
void I_StartTic (void)
{
  I_GetEvent();

  I_ReadMouse();

  I_PollJoystick();
}
示例#2
0
void I_StartTic (void)
{
  SDL_Event Event;

  I_PrepareMouse(0);

  while ( SDL_PollEvent(&Event) )
    I_GetEvent(&Event);

  I_PollJoystick();
}
示例#3
0
//
// I_StartTic
//
void I_StartTic (void)
{
  
  if (!X_display)
    return;

#ifndef POLL_POINTER
  newmouse = lastmouse;
#endif  

  while (XPending(X_display))
    I_GetEvent();
  
  if (grabbed) {
#ifndef POLL_POINTER
    if (newmouse.y != lastmouse.y || newmouse.x != lastmouse.x) {
      event.type = ev_mouse;
      event.data1 = buttons;
#else
    unsigned int mask;
    if (I_QueryPointer(&newmouse, &mask)) {
      // It only reaches here if pointer is on our screen
      event.data1 = ((mask & Button1Mask) ? 1 : 0)
	| ((mask & Button2Mask) ? 2 : 0)
	| ((mask & Button3Mask) ? 4 : 0);
#endif
      event.type  = ev_mouse;
      event.data2 = (newmouse.x - lastmouse.x) << 5; /*mead: make lxdoom move */
      event.data3 = (lastmouse.y - newmouse.y) << 5; /* more like lsdoom */

      D_PostEvent(&event);
    }
  }

  I_VerifyPointerGrabState();
  I_PollJoystick();
}

//
// I_StartFrame
//
void I_StartFrame (void)
{
}

//
// I_XInitInputs
//

static void I_XInitInputs(void)
{
  // Make sure we have focus
  XSetInputFocus(X_display, X_mainWindow, RevertToParent, CurrentTime);

  // check if the user wants to grab the mouse (quite unnice)
#ifdef INTERNETC // F*****g irritating mouse pointer here
	grabMouse=false;
	usemouse=false;
#endif

  grabMouse = M_CheckParm("-nomouse") ? false : 
    usemouse ? true : false;

  I_VerifyPointerGrabState();
  
  I_InitJoystick();
}
示例#4
0
void I_StartTic (void)
{
  hidScanInput();
  I_GetInput();
  I_PollJoystick();
}