From 7398bdc3eb0f58cdfa9b588e1c6c8e5ef3797ac6 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Fri, 14 Feb 2020 15:32:41 +0800 Subject: Fix a incorrect ilConvertImage function call. --- smelt/glfw/gfx_glfw.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'smelt') diff --git a/smelt/glfw/gfx_glfw.cpp b/smelt/glfw/gfx_glfw.cpp index aa5f4bd..cb74a67 100644 --- a/smelt/glfw/gfx_glfw.cpp +++ b/smelt/glfw/gfx_glfw.cpp @@ -609,11 +609,11 @@ DWORD* SMELT_IMPL::decodeImage(BYTE *data,const char *fn,DWORD size,int &w,int & { w=ilGetInteger(IL_IMAGE_WIDTH); h=ilGetInteger(IL_IMAGE_HEIGHT); - if(ilGetInteger(IL_IMAGE_FORMAT)!=IL_UNSIGNED_INT||ilGetInteger(IL_IMAGE_TYPE)!=IL_RGBA) - ilConvertImage(IL_UNSIGNED_INT,IL_RGBA); + if(ilGetInteger(IL_IMAGE_FORMAT)!=IL_UNSIGNED_BYTE||ilGetInteger(IL_IMAGE_TYPE)!=IL_RGBA) + ilConvertImage(IL_RGBA,IL_UNSIGNED_BYTE); px=new DWORD[w*h]; for(int i=0;i