Explorar el Código

win32: better error reporting in the GDI+ loader, based on a patch by ponce.

legacy
Sam Hocevar sam hace 12 años
padre
commit
6eb41c04ff
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. +10
    -0
      src/image/codec/gdiplus-image.cpp

+ 10
- 0
src/image/codec/gdiplus-image.cpp Ver fichero

@@ -81,6 +81,16 @@ bool GdiPlusImageData::Open(char const *path)
return false;
}

if (bitmap->GetLastStatus() != Gdiplus::Ok)
{
#if !LOL_RELEASE
Log::Error("error %d loading %s\n",
(unsigned)bitmap->GetLastStatus(), path);
#endif
delete bitmap;
return false;
}

size = ivec2(bitmap->GetWidth(), bitmap->GetHeight());
format = Image::FORMAT_RGBA;



Cargando…
Cancelar
Guardar