Commit 6bf3a80f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: add vout_display_IsWindowed() helper

parent 4bf20dd9
...@@ -405,6 +405,25 @@ static inline void vout_display_DeleteWindow(vout_display_t *vd, ...@@ -405,6 +405,25 @@ static inline void vout_display_DeleteWindow(vout_display_t *vd,
vd->owner.window_del(vd, window); vd->owner.window_del(vd, window);
} }
static inline bool vout_display_IsWindowed(vout_display_t *vd)
{
#ifndef __cplusplus
vout_window_cfg_t cfg = {
.width = vd->cfg->display.width,
.height = vd->cfg->display.height,
};
#else
vout_window_cfg_t cfg;
memset(&cfg, 0, sizeof (cfg));
cfg.width = vd->cfg->display.width;
cfg.height = vd->cfg->display.height;
#endif
vout_window_t *window = vout_display_NewWindow(vd, &cfg);
if (window != NULL)
vout_display_DeleteWindow(vd, window);
return window != NULL;
}
/** /**
* Computes the default display size given the source and * Computes the default display size given the source and
* the display configuration. * the display configuration.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment