From fed1b5aa14b211bb2e098fe66fd01c00574eb28e Mon Sep 17 00:00:00 2001 From: Jordan Halase Date: Wed, 14 Oct 2020 15:00:20 -0500 Subject: Fix missing default size in pugl_print_events --- examples/pugl_print_events.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/pugl_print_events.c b/examples/pugl_print_events.c index 08a4a86..f9786fe 100644 --- a/examples/pugl_print_events.c +++ b/examples/pugl_print_events.c @@ -27,6 +27,9 @@ #include #include +static const int defaultWidth = 512; +static const int defaultHeight = 512; + typedef struct { PuglWorld* world; @@ -59,12 +62,14 @@ main(void) puglSetClassName(app.world, "Pugl Print Events"); puglSetWindowTitle(app.view, "Pugl Event Printer"); + puglSetDefaultSize(app.view, defaultWidth, defaultHeight); puglSetBackend(app.view, puglStubBackend()); puglSetHandle(app.view, &app); puglSetEventFunc(app.view, onEvent); - if (puglRealize(app.view)) { - return logError("Failed to create window\n"); + PuglStatus st; + if ((st = puglRealize(app.view))) { + return logError("Failed to create window: %s\n", puglStrerror(st)); } puglShowWindow(app.view); -- cgit v1.2.1