aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-03-15 18:30:24 +0100
committerDavid Robillard <d@drobilla.net>2020-03-15 20:53:37 +0100
commitefc053fe5a38a4928fbfd3780f5665dd43bc7f95 (patch)
treec3e28366d5b57592e82c004ab59a3e364d4ef57f /test/test_utils.h
parent3b9e8287fd4c1096a2d6244aa07bc28cacb4da8d (diff)
Unify event loop functions as puglUpdate()
The previous separation between polling and dispatching was a lie, especially on MacOS where it is impossible to only poll for events without dispatching anything. Providing such an API is misleading, and problematic in various other ways. So, merge them into a single puglUpdate() function which can do the right thing on all platforms. This also adds the behaviour of actually processing all events in the given time interval, which is almost always what clients actually want to do when using a positive timeout (naively doing this before caused terrible input lag).
Diffstat (limited to 'test/test_utils.h')
-rw-r--r--test/test_utils.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_utils.h b/test/test_utils.h
index 7dc6e6e..3e62714 100644
--- a/test/test_utils.h
+++ b/test/test_utils.h
@@ -1,5 +1,5 @@
/*
- Copyright 2012-2019 David Robillard <http://drobilla.net>
+ Copyright 2012-2020 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -140,6 +140,8 @@ printEvent(const PuglEvent* event, const char* prefix, const bool verbose)
return fprintf(stderr, "%sMap\n", prefix);
case PUGL_UNMAP:
return fprintf(stderr, "%sUnmap\n", prefix);
+ case PUGL_UPDATE:
+ return fprintf(stderr, "%sUpdate\n", prefix);
case PUGL_CONFIGURE:
return PRINT("%sConfigure " PFMT " " PFMT "\n",
prefix,