diff options
Diffstat (limited to 'examples/tablet.c')
| -rw-r--r-- | examples/tablet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/tablet.c b/examples/tablet.c index 8c62fc0..bbe242c 100644 --- a/examples/tablet.c +++ b/examples/tablet.c @@ -42,8 +42,9 @@ int main(int argc, char **argv) if (!strcmp(argv[i], "--smoke-test")) smoke = true; else if (!strcmp(argv[i], "--backend") && i + 1 < argc) { const char *b = argv[++i]; - if (yasl_init(!strcmp(b, "wayland") ? YASL_BACKEND_WAYLAND : - !strcmp(b, "x11") ? YASL_BACKEND_X11 : YASL_BACKEND_COCOA, NULL) < 0) return 1; + enum yasl_backend backend = !strcmp(b, "wayland") ? YASL_BACKEND_WAYLAND : + !strcmp(b, "x11") ? YASL_BACKEND_X11 : YASL_BACKEND_COCOA; + if (yasl_init(&(struct yasl_options){.backend = backend}) < 0) return 1; } else return 1; } yasl_surface *s = yasl_surface_create(&(struct yasl_surface_options){.title="YASL pen canvas — C clears, Escape exits", .width=800, .height=600}); |
