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

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


I recently upgraded from 4.0.0 to the newest WIP, and it introduced
a bug in my program when taking screenshots.

The screenshot code is basically the following:
(pseudo code, error checking and some other stuff removed/changed
for the purpose of clarity)

-----------------------------------------------------------------
PALETTE pal;
BITMAP *bmp = create_sub_bitmap(screen, 0, 0, res_x, res_y);
get_palette(pal);
save_bitmap("test.pcx", bmp, pal);
destroy_bitmap(bmp);
-----------------------------------------------------------------

I'm using 8-bit video mode.
This code works in DOS mode (VESA, VGA, etc...) and in Windowed
GDI, but crash with any DirectX driver.

Crashing location is in save_bitmap().
save_bitmap() call save_pcx() in my case, which only potentially
faulty access (I think) to the bitmap is by calling getpixel().

Then, I don't know what's going on with the vtable or driver
(I'm not familiar with Allegro internals) but there's a problem
somewhere. May it be the sub_bitmap creation ?

Can anyone else reproduce the bug as is ?
Any idea, question, suggestion, potential fix ?

Thank you very much,
-Omar





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