diff options
Diffstat (limited to 'pugl_test.c')
-rw-r--r-- | pugl_test.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pugl_test.c b/pugl_test.c index 8425611..6520b07 100644 --- a/pugl_test.c +++ b/pugl_test.c @@ -297,7 +297,8 @@ main(int argc, char** argv) puglShowWindow(view); - float lastReportTime = (float)puglGetTime(view); + float lastReportTime = (float)puglGetTime(view); + bool requestedAttention = false; while (!quit) { const float thisTime = (float)puglGetTime(view); @@ -309,6 +310,11 @@ main(int argc, char** argv) puglProcessEvents(view); + if (!requestedAttention && thisTime > 5) { + puglRequestAttention(view); + requestedAttention = true; + } + if (continuous && thisTime > lastReportTime + 5) { const double fps = framesDrawn / (thisTime - lastReportTime); fprintf(stderr, |