al_set_target_bitmap problem
Addison Elliott

I received a ASSERT output in my program once I turned on the debugging. I am pretty sure this is a small bug that wouldn't hurt to fix.
I have seperate threads that load bitmaps and so I have to call al_set_target_bitmap to set the display backbuffer as the target.
al_set_target_bitmap has this line of code(which caused the program to quit):
I looked into it, and that function returns false if al_get_current_display returns false. So, I am calling the function to set the current display, and it requests for the current display, causing an ASSERT. Kinda ironic :P

Peter Wang

That seems right. al_get_current_display returns NULL, then al_is_bitmap_draw_held returns false, which means the assertion is true.

Edgar Reynaldo

If it is failing that assert, then al_is_bitmap_drawing_held() is returning true, so somewhere you have failed to release deferred bitmap drawing...

Thread #607999. Printed from