9 static int sLogAfterNumberOfEvents = -1;
10 static int sEventCount = 0;
14 while (!(event.isDefined() &&
event.isKeyboardEvent())) {
17 printf(
"Finished processing %d events\n", sEventCount);
23 if (sEventCount++ > sLogAfterNumberOfEvents && sLogAfterNumberOfEvents >= 0) {
25 sprintf(filename,
"event%d.png", sEventCount);
28 printf(
"Event %d is %s\n", sEventCount, event.name());
37 printf(
"Current event index: %d\n", sEventCount);
41 sLogAfterNumberOfEvents = numberOfEvents;
Event getEvent(int *timeout)
void logAfter(int numberOfEvents)
void writeFrameBufferToFile(const char *filename)
void dumpEventCount(int i)
constexpr Event Termination