From dfa88271a2c76bfbd4dbc3fc87ee81bd0a74ec8e Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 26 Apr 2016 13:59:06 +0200 Subject: [PATCH] vp_rpi: fix indentation This also moves the p->background check into the top if (the code effectively didn't do anything when this false). --- video/out/vo_rpi.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/video/out/vo_rpi.c b/video/out/vo_rpi.c index 7ba3e8ba68..b192476e52 100644 --- a/video/out/vo_rpi.c +++ b/video/out/vo_rpi.c @@ -255,16 +255,15 @@ static int create_overlays(struct vo *vo) struct priv *p = vo->priv; destroy_overlays(vo); - if (vo->opts->fullscreen) { - // Use the whole screen. - VC_RECT_T dst = {.width = p->w, .height = p->h}; - VC_RECT_T src = {.width = 1 << 16, .height = 1 << 16}; - VC_DISPMANX_ALPHA_T alpha = { - .flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS, - .opacity = 0xFF, - }; + if (vo->opts->fullscreen && p->background) { + // Use the whole screen. + VC_RECT_T dst = {.width = p->w, .height = p->h}; + VC_RECT_T src = {.width = 1 << 16, .height = 1 << 16}; + VC_DISPMANX_ALPHA_T alpha = { + .flags = DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS, + .opacity = 0xFF, + }; - if (p->background) { p->window = vc_dispmanx_element_add(p->update, p->display, p->background_layer, &dst, 0, &src, @@ -275,7 +274,6 @@ static int create_overlays(struct vo *vo) return -1; } } - } if (p->enable_osd) { VC_RECT_T dst = {.x = p->x, .y = p->y,