Re: [AD] Logic in al_load_bitmap |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Logic in al_load_bitmap
- From: "Trent Gamblin" <trent@xxxxxxxxxx>
- Date: Tue, 26 Feb 2008 16:32:55 -0700 (MST)
On Tue, February 26, 2008 2:34 pm, Peter Hull said:
> I've got a question about this one too. In these lines:
> /* If it's a display bitmap */
> if (!(al_get_new_bitmap_flags() & ALLEGRO_MEMORY_BITMAP) &&
> bitmap) {
> bitmap->vt->upload_bitmap(bitmap, 0, 0, bitmap->w, bitmap->h);
> }
> would it be better to test bitmap->flags rather than
> al_get_new_bitmap_flags? It doesn't matter except if a display
> driver
> doesn't support any accelerated bitmaps and returns a memory bitmap
> instead. Then the upload_bitmap vtable function is NULL and it
> crashes.
>
> Pete
Yes, I think you're right again. Good eye.
Trent