Ejemplo n.º 1
0
static void
glw_ps3_mainloop(glw_ps3_t *gp)
{
  int currentBuffer = 0;
  TRACE(TRACE_INFO, "GLW", "Entering mainloop");
#if 0
  int r = ioPadSetPortSetting(6, 0xffffffff);
  TRACE(TRACE_ERROR, "PS3PAD", "portsetting=0x%x", r);
#endif

  sysRegisterCallback(EVENT_SLOT0, eventHandle, gp);
  while(!gp->stop) {

    handle_pads(gp);
    handle_kb(gp);


    waitFlip();
    drawFrame(gp, currentBuffer, 1);
    flip(gp, currentBuffer);
    currentBuffer = !currentBuffer;
    sysCheckCallback();
  }
  waitFlip();
  drawFrame(gp, currentBuffer, 0);
  flip(gp, currentBuffer);
  currentBuffer = !currentBuffer;

  sysUnregisterCallback(EVENT_SLOT0);
}
Ejemplo n.º 2
0
static void
glw_ps3_mainloop(glw_ps3_t *gp)
{
  int currentBuffer = 0;
  TRACE(TRACE_DEBUG, "GLW", "Entering mainloop");



  sysRegisterCallback(EVENT_SLOT0, eventHandle, gp);
  while(gp->gp_stop != 10) {

    if(gp->gp_stop)
      gp->gp_stop++;

    handle_pads(gp);
    handle_kb(gp);

    waitFlip();
    drawFrame(gp, currentBuffer, 1);
    flip(gp, currentBuffer);
    currentBuffer = !currentBuffer;
    sysCheckCallback();
  }
  waitFlip();
  drawFrame(gp, currentBuffer, 0);
  flip(gp, currentBuffer);
  currentBuffer = !currentBuffer;

  sysUnregisterCallback(EVENT_SLOT0);
}