diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2020-04-20 19:47:50 +0200 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2020-04-20 19:47:50 +0200 |
commit | 767d383f068f17bde9fe4b910de817c15a015daa (patch) | |
tree | 3ee05ab20964abc9b4e5aa0b294f0f48c4054207 | |
parent | b2b07f097d7273da7271007732b496c71047b630 (diff) | |
download | patchmatrix-767d383f068f17bde9fe4b910de817c15a015daa.tar.xz |
Squashed 'subprojects/nk_pugl/' changes from 11c5b054..ef4cddce
ef4cddce add config option for X11 threads.
git-subtree-dir: subprojects/nk_pugl
git-subtree-split: ef4cddce7be3868ba015258b3bec7712137652c6
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | example/example.c | 1 | ||||
-rw-r--r-- | nk_pugl/nk_pugl.h | 5 |
3 files changed, 6 insertions, 2 deletions
@@ -1 +1 @@ -0.1.135 +0.1.139 diff --git a/example/example.c b/example/example.c index 8efb947..1c505da 100644 --- a/example/example.c +++ b/example/example.c @@ -57,6 +57,7 @@ main(int argc __attribute__((unused)), char **argv __attribute__((unused))) cfg->height = 720; cfg->resizable = true; cfg->parent = 0; + cfg->threads = false; cfg->ignore = false; cfg->class = "nk_pugl_example"; cfg->title = "Nk Pugl Example"; diff --git a/nk_pugl/nk_pugl.h b/nk_pugl/nk_pugl.h index 9c7eb05..bd8b7bc 100644 --- a/nk_pugl/nk_pugl.h +++ b/nk_pugl/nk_pugl.h @@ -96,6 +96,7 @@ struct _nk_pugl_config_t { } font; intptr_t parent; + bool threads; LV2UI_Resize *host_resize; @@ -1050,7 +1051,9 @@ nk_pugl_init(nk_pugl_window_t *win) cfg->min_height *= win->scale; // init pugl - win->world = puglNewWorld(cfg->parent ? PUGL_MODULE : PUGL_PROGRAM, 0); + win->world = puglNewWorld(cfg->parent ? PUGL_MODULE : PUGL_PROGRAM, + cfg->threads ? PUGL_WORLD_THREADS : 0); + fprintf(stderr, "threads: %i\n", cfg->threads); #if defined(__APPLE__) || defined(_WIN32) uint8_t bytes [0x10]; |