summaryrefslogtreecommitdiff
path: root/pugl_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-05-13 15:30:36 +0000
committerDavid Robillard <d@drobilla.net>2014-05-13 15:30:36 +0000
commita739e6116f026e2fe334f447082616712a1cfd78 (patch)
tree8b6b3fb3bcfb9cd41dae872d5789a54fc5a4c3c5 /pugl_test.c
parente86043f765dd18a51cb2450f45d1d204fd4cb4d9 (diff)
Fix non-extensible puglInit API.
Fix memory leak.
Diffstat (limited to 'pugl_test.c')
-rw-r--r--pugl_test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pugl_test.c b/pugl_test.c
index b9a54f5..9282420 100644
--- a/pugl_test.c
+++ b/pugl_test.c
@@ -173,7 +173,10 @@ main(int argc, char** argv)
}
}
- PuglView* view = puglCreate(0, "Pugl Test", 512, 512, resizable, true);
+ PuglView* view = puglInit(NULL, NULL);
+ puglInitWindowSize(view, 512, 512);
+ puglInitResizable(view, resizable);
+
puglIgnoreKeyRepeat(view, ignoreKeyRepeat);
puglSetKeyboardFunc(view, onKeyboard);
puglSetMotionFunc(view, onMotion);
@@ -184,6 +187,9 @@ main(int argc, char** argv)
puglSetReshapeFunc(view, onReshape);
puglSetCloseFunc(view, onClose);
+ puglCreateWindow(view, "Pugl Test");
+ puglShowWindow(view);
+
while (!quit) {
puglProcessEvents(view);
}