# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1336035853 0 # Node ID df7ca5c4fa5bd1c3f4c99a22c04b4872efb6d9de # Parent e31c7e389b2f1d7823db7f4c15e4dac27f6fbf29 Removed some code to workaround a buggy version of GBM on OS/2. Moved the GBM debug messages into #ifdef DEBUG The version of GBM that comes with my version of eCS is very buggy. It fails to load most PNG images and once it fails to load a PNG other types start failing as well. Installing the latest version into c:\OS2\DLL corrects the issues and PNG/JPG files work fine. diff -r e31c7e389b2f -r df7ca5c4fa5b os2/dw.c --- a/os2/dw.c Thu May 03 08:31:22 2012 +0000 +++ b/os2/dw.c Thu May 03 09:04:13 2012 +0000 @@ -6770,14 +6770,16 @@ for(z=0;z 1) + if((err = _gbm_read_header(file, fd, z, &gbm, "")) == 0) break; } /* If we failed to load the header */ if(err) { +#ifdef DEBUG dw_debug("GBM: Read header type %d \"%s\" %d %s\n", z, file, err, _gbm_err(err)); +#endif _gbm_io_close(fd); return 0; } @@ -6789,7 +6791,9 @@ /* Read the palette from the file */ if((err = _gbm_read_palette(fd, z, &gbm, gbmrgb)) != 0) { +#ifdef DEBUG dw_debug("GBM: Read palette type %d \"%s\" %d %s\n", z, file, err, _gbm_err(err)); +#endif _gbm_io_close(fd); return 0; } @@ -6801,7 +6805,6 @@ *width = gbm.w; *height = gbm.h; byteswidth = (((gbm.w*gbm.bpp + 31)/32)*4); - /*dw_debug("Read header %dx%d bpp %d bytes wide %d bytes total %d \"%s\"\n", *width, *height, gbm.bpp, byteswidth, byteswidth * gbm.h, file);*/ /* Allocate a buffer to store the image */ DosAllocMem((PPVOID)&BitmapFileBegin, (ULONG)byteswidth * gbm.h, @@ -6810,7 +6813,9 @@ /* Read the data into our buffer */ if((err = _gbm_read_data(fd, z, &gbm, BitmapFileBegin)) != 0) { +#ifdef DEBUG dw_debug("GBM: Read data type %d \"%s\" %d %s\n", z, file, err, _gbm_err(err)); +#endif _gbm_io_close(fd); DosFreeMem(BitmapFileBegin); return 0;