Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » [Android] Backbuffer sub-bitmap crash

This thread is locked; no one can reply to it. rss feed Print
[Android] Backbuffer sub-bitmap crash
kenmasters1976
Member #8,794
July 2007

I've tried to isolate the problem so I modified ex_android to include the following code right before al_flip_display():

// temp_bmp declaration and initialized to NULL at the top of the file
if (!temp_bmp) {
  ALLEGRO_BITMAP *t = al_create_sub_bitmap(al_get_backbuffer(dpy), 100, 100, 100, 100);
  temp_bmp = al_clone_bitmap(t);
  al_destroy_bitmap(t);
}
al_draw_bitmap(temp_bmp, 0, 0, 0);

This code seems to crash on the Android emulator at al_destroy_bitmap() since otherwise, after commenting that line, it works fine.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: