al_destroy_display
void al_destroy_display(ALLEGRO_DISPLAY *display)
Introduced in 5.0.0
Destroy a display.
If the target bitmap of the calling thread is tied to the display, then it implies a call to "al_set_target_bitmap(NULL);" before the display is destroyed.
That special case notwithstanding, you should make sure no threads are currently targeting a bitmap which is tied to the display before you destroy it.
See also: al_set_target_bitmap
Examples: ex_blend_bench, ex_display_options, ex_drawpixels, ex_dualies, ex_fs_resize, ex_fs_window, ex_mouse_focus, ex_multiwin, ex_noframe, ex_resize2, ex_threads, ex_threads2, ex_warp_mouse, ex_windows, ex_winfull
Most helpful discussions:
- Is Allegro5 compatibale with Chrome OS
- ALLEGRO_EVENT_DISPLAY_SWITCH_OUT
- Segfault in al_show_native_file_dialog()
- Program locks on exit (linux only)
- Keyboard Modifiers flag on Windows?
- Multiple threads/displays, Event handling question
- Mipmap causing texture bleeding
- Crasehs when use primitive functions
- Difficulty compiling on Windows
- Screen is cleared and a new one appears Allegro5 in C?
Other recent discussions:
- Allegro Access Violation while Drawing
- A little bit of fun for family and friends
- KrampusHack 2020: Odd Results With Color Mapping Functions
- Mouse Addon causing program crash
- Problem solved: memory bitmaps not being converted
- Performance plummets after changing screen mode
- Allegro 5 crashes when using al_draw_bitmap inside a list container
- Rendering A Hot Air Balloon
- In full screen mode, the display stretches to full screen
- Game Crashing and I'm not sure why?