From acecae86dc8d4e59d373c73fb6abbdc276a98896 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 18 Feb 2014 20:34:55 +0100 Subject: Fix windows build error in splash screen commit. --- source/blender/windowmanager/intern/wm_operators.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source') diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index a7d8cba4d20..b0e04894599 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1769,22 +1769,11 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar extern char datatoc_splash_2x_png[]; extern int datatoc_splash_2x_png_size; - ImBuf *ibuf; - - if (U.pixelsize == 2) { - ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_2x_png, - datatoc_splash_2x_png_size, IB_rect, NULL, ""); - } - else { - ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png, - datatoc_splash_png_size, IB_rect, NULL, ""); - } #else ImBuf *ibuf = NULL; #endif - #ifdef WITH_BUILDINFO int label_delta = 0; int hash_width, date_width; @@ -1802,6 +1791,17 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar date_width = (int)BLF_width(style->widgetlabel.uifont_id, date_buf, sizeof(date_buf)) + U.widget_unit; #endif /* WITH_BUILDINFO */ +#ifndef WITH_HEADLESS + if (U.pixelsize == 2) { + ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_2x_png, + datatoc_splash_2x_png_size, IB_rect, NULL, ""); + } + else { + ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png, + datatoc_splash_png_size, IB_rect, NULL, ""); + } +#endif + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); /* note on UI_BLOCK_NO_WIN_CLIP, the window size is not always synchronized -- cgit v1.2.3