diff options
Diffstat (limited to 'overlay/overlay.c')
-rw-r--r-- | overlay/overlay.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/overlay/overlay.c b/overlay/overlay.c index 1cf0eab3..a1d21df0 100644 --- a/overlay/overlay.c +++ b/overlay/overlay.c @@ -760,10 +760,14 @@ int main(int argc, char **argv) ctx.width = 640; ctx.height = 236; - ctx.surface = x11_overlay_create(&config, &ctx.width, &ctx.height); + ctx.surface = NULL; + if (ctx.surface == NULL) + ctx.surface = x11_overlay_create(&config, &ctx.width, &ctx.height); if (ctx.surface == NULL) ctx.surface = x11_window_create(&config, &ctx.width, &ctx.height); if (ctx.surface == NULL) + ctx.surface = kms_overlay_create(&config, &ctx.width, &ctx.height); + if (ctx.surface == NULL) return ENOMEM; signal(SIGUSR1, signal_snapshot); |