--- a/imgui/backends/imgui_impl_allegro5.cpp
+++ b/imgui/backends/imgui_impl_allegro5.cpp
@@ -233,7 +233,7 @@
         return false;
 
     // Store our identifier
-    io.Fonts->SetTexID((void*)cloned_img);
+    io.Fonts->SetTexID((ImTextureID)(intptr_t)cloned_img);
     bd->Texture = cloned_img;
 
     // Create an invisible mouse cursor
