Re: [AD] DirectDraw - create_sub_bitmap() or save_bitmap() faulty ?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I just tried downloading and compiling 4.0.3 and it works.

Good to hear :-)

> It's a valid pointer (non zero).
> 'w' and 'h' fields are correct, at least.
> What more may you want to know ?

A reproducible method to trigger the crash and some infos on your system.
I don't see it on Win98SE, either in optimized mode or in debug mode, with 
the attached testcase. Does it crash on your system?

-- 
Eric Botcazou
#include <allegro.h>

int main(void)
{
   PALETTE pal;
   BITMAP *bmp;

   allegro_init();
   install_keyboard();

   if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) < 0)
      return 0;

   clear_to_color(screen, makecol(255, 0, 0));
   readkey();

   bmp = create_sub_bitmap(screen, 0, 0, 640, 480);
   get_palette(pal);
   save_bitmap("test.pcx", bmp, pal);
   destroy_bitmap(bmp);

   return -1;
}
END_OF_MAIN()


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/