From f7468cec5cdb214a377c3cae73841685c0c50eb1 Mon Sep 17 00:00:00 2001 From: "nothings.org" Date: Tue, 31 Jul 2007 05:34:56 +0000 Subject: [PATCH] fix mis-blocked stbi_only --- imv.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/imv.c b/imv.c index a382468..18d4de5 100644 --- a/imv.c +++ b/imv.c @@ -41,7 +41,7 @@ typedef int Bool; // general configuration options #define USE_GDIPLUS -#define USE_FREEIMAGE +//#define USE_FREEIMAGE // size of border in pixels #define FRAME 3 @@ -3360,16 +3360,15 @@ static Bool LoadGdiplus(void) GdipBitmapLockBits = (GdipBitmapLockBitsProc)GpFunc("GdipBitmapLockBits"); GdipBitmapUnlockBits = (GdipBitmapUnlockBitsProc)GpFunc("GdipBitmapUnlockBits"); if (!GdiplusPresent) { - if (!only_stbi) { + if (!only_stbi) error("Invalid GdiPlus.dll; disabling GDI+ support."); - } else { - ULONG token; - GdiplusStartupInput gpStartupInput = { 1, NULL, FALSE, FALSE }; - if (GdiplusStartup(&token, &gpStartupInput, &gpStartupOutput) != GpOk) { - GdiplusPresent = FALSE; - if (!only_stbi) - error("Failed to initialize GdiPlus.dll; disabling GDI+ support."); - } + } else { + ULONG token; + GdiplusStartupInput gpStartupInput = { 1, NULL, FALSE, FALSE }; + if (GdiplusStartup(&token, &gpStartupInput, &gpStartupOutput) != GpOk) { + GdiplusPresent = FALSE; + if (!only_stbi) + error("Failed to initialize GdiPlus.dll; disabling GDI+ support."); } }