diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/notepad.c | 2 | ||||
| -rw-r--r-- | examples/tablet.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/notepad.c b/examples/notepad.c index d0b38b9..470d976 100644 --- a/examples/notepad.c +++ b/examples/notepad.c @@ -1696,7 +1696,7 @@ int main(int argc, char **argv) } } - if (yasl_init(YASL_BACKEND_AUTO, "org.yasl.notepad") < 0 || !editor_init(&ed)) { + if (yasl_init(&(struct yasl_options){.app_id = "org.yasl.notepad"}) < 0 || !editor_init(&ed)) { fprintf(stderr, "Could not initialize YASL Notepad\n"); editor_shutdown(&ed); yasl_shutdown(); 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}); |
