- EventDispatcher.dispatchEvents()
- dirty = self.draw(pygame.display.get_surface())
- pygame.display.update(dirty)
-
- self.kinectRgb.update()
- rgbImg = self.kinectRgb.capture()
- self.kinectRgbSur.blit(rgbImg, (0, 0))
- screen = pygame.display.get_surface()
- screen.blit(pygame.transform.flip(self.kinectRgbSur, True, False), (0, 0))
- pygame.display.flip()
-
- clock.tick(FRAMERATE)
+ try :
+ EventDispatcher.dispatchEvents()
+ self.kinectRgb.update()
+ dirty = self.draw(pygame.display.get_surface())
+ pygame.display.update(dirty)
+ clock.tick(FRAMERATE)
+ except KeyboardInterrupt :
+ self.stop()
+ raise