mirror of https://github.com/nothings/stb-imv
fix mis-blocked stbi_only
This commit is contained in:
parent
2003c0d64a
commit
f7468cec5c
19
imv.c
19
imv.c
|
@ -41,7 +41,7 @@ typedef int Bool;
|
||||||
// general configuration options
|
// general configuration options
|
||||||
|
|
||||||
#define USE_GDIPLUS
|
#define USE_GDIPLUS
|
||||||
#define USE_FREEIMAGE
|
//#define USE_FREEIMAGE
|
||||||
|
|
||||||
// size of border in pixels
|
// size of border in pixels
|
||||||
#define FRAME 3
|
#define FRAME 3
|
||||||
|
@ -3360,16 +3360,15 @@ static Bool LoadGdiplus(void)
|
||||||
GdipBitmapLockBits = (GdipBitmapLockBitsProc)GpFunc("GdipBitmapLockBits");
|
GdipBitmapLockBits = (GdipBitmapLockBitsProc)GpFunc("GdipBitmapLockBits");
|
||||||
GdipBitmapUnlockBits = (GdipBitmapUnlockBitsProc)GpFunc("GdipBitmapUnlockBits");
|
GdipBitmapUnlockBits = (GdipBitmapUnlockBitsProc)GpFunc("GdipBitmapUnlockBits");
|
||||||
if (!GdiplusPresent) {
|
if (!GdiplusPresent) {
|
||||||
if (!only_stbi) {
|
if (!only_stbi)
|
||||||
error("Invalid GdiPlus.dll; disabling GDI+ support.");
|
error("Invalid GdiPlus.dll; disabling GDI+ support.");
|
||||||
} else {
|
} else {
|
||||||
ULONG token;
|
ULONG token;
|
||||||
GdiplusStartupInput gpStartupInput = { 1, NULL, FALSE, FALSE };
|
GdiplusStartupInput gpStartupInput = { 1, NULL, FALSE, FALSE };
|
||||||
if (GdiplusStartup(&token, &gpStartupInput, &gpStartupOutput) != GpOk) {
|
if (GdiplusStartup(&token, &gpStartupInput, &gpStartupOutput) != GpOk) {
|
||||||
GdiplusPresent = FALSE;
|
GdiplusPresent = FALSE;
|
||||||
if (!only_stbi)
|
if (!only_stbi)
|
||||||
error("Failed to initialize GdiPlus.dll; disabling GDI+ support.");
|
error("Failed to initialize GdiPlus.dll; disabling GDI+ support.");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue