mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 01:20:55 +01:00
Examples: Allegro 5: Properly destroy all globals on shutdown. (#2262)
This commit is contained in:
parent
6777544855
commit
4483320f0a
@ -74,6 +74,7 @@ Other Changes:
|
|||||||
- Demo: Added a few more things under "Child windows" (changing ImGuiCol_ChildBg, positioning child, using IsItemHovered after a child).
|
- Demo: Added a few more things under "Child windows" (changing ImGuiCol_ChildBg, positioning child, using IsItemHovered after a child).
|
||||||
- Examples: DirectX10/11/12: Made imgui_impl_dx10/dx11/dx12.cpp link d3dcompiler.lib from the .cpp file
|
- Examples: DirectX10/11/12: Made imgui_impl_dx10/dx11/dx12.cpp link d3dcompiler.lib from the .cpp file
|
||||||
to ease integration.
|
to ease integration.
|
||||||
|
- Examples: Allegro 5: Properly destroy globals on shutdown to allow for restart. (#2262) [@DomRe]
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
@ -280,9 +280,14 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
|
|||||||
void ImGui_ImplAllegro5_Shutdown()
|
void ImGui_ImplAllegro5_Shutdown()
|
||||||
{
|
{
|
||||||
ImGui_ImplAllegro5_InvalidateDeviceObjects();
|
ImGui_ImplAllegro5_InvalidateDeviceObjects();
|
||||||
g_Display = NULL;
|
|
||||||
|
|
||||||
// Destroy last known clipboard data
|
g_Display = NULL;
|
||||||
|
g_Time = 0.0;
|
||||||
|
|
||||||
|
if (g_VertexDecl)
|
||||||
|
al_destroy_vertex_decl(g_VertexDecl);
|
||||||
|
g_VertexDecl = NULL;
|
||||||
|
|
||||||
if (g_ClipboardTextData)
|
if (g_ClipboardTextData)
|
||||||
al_free(g_ClipboardTextData);
|
al_free(g_ClipboardTextData);
|
||||||
g_ClipboardTextData = NULL;
|
g_ClipboardTextData = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user