diff options
author | David Robillard <d@drobilla.net> | 2019-07-22 17:21:52 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-09-03 08:32:16 +0200 |
commit | dacaaa5f328ac2598123aa1f0744ddd68c87e9cc (patch) | |
tree | 31bdcb5effdff7d84f946a577cd77d6462dd6083 /test/pugl_test.c | |
parent | 61476f5de49b20a6836186a82082bc2b7c70e971 (diff) | |
download | pugl-dacaaa5f328ac2598123aa1f0744ddd68c87e9cc.tar.gz pugl-dacaaa5f328ac2598123aa1f0744ddd68c87e9cc.tar.bz2 pugl-dacaaa5f328ac2598123aa1f0744ddd68c87e9cc.zip |
Move puglGetTime() to PuglWorld
Diffstat (limited to 'test/pugl_test.c')
-rw-r--r-- | test/pugl_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pugl_test.c b/test/pugl_test.c index b012868..c4df272 100644 --- a/test/pugl_test.c +++ b/test/pugl_test.c @@ -70,7 +70,7 @@ onDisplay(PuglView* view) { PuglTestApp* app = (PuglTestApp*)puglGetHandle(view); - const double thisTime = puglGetTime(view); + const double thisTime = puglGetTime(app->world); if (app->continuous) { const double dTime = thisTime - app->lastDrawTime; app->xAngle = fmodf((float)(app->xAngle + dTime * 100.0f), 360.0f); @@ -204,10 +204,10 @@ main(int argc, char** argv) puglShowWindow(view); - PuglFpsPrinter fpsPrinter = { puglGetTime(view) }; + PuglFpsPrinter fpsPrinter = { puglGetTime(app.world) }; bool requestedAttention = false; while (!app.quit) { - const double thisTime = puglGetTime(view); + const double thisTime = puglGetTime(app.world); if (app.continuous) { puglPostRedisplay(view); @@ -223,7 +223,7 @@ main(int argc, char** argv) } if (app.continuous) { - puglPrintFps(view, &fpsPrinter, &app.framesDrawn); + puglPrintFps(app.world, &fpsPrinter, &app.framesDrawn); } } |