浏览代码

Backends: Allegro5: fixed use of obsolete IM_OFFSETOF().

ocornut 1 月之前
父节点
当前提交
e2a662eed8
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      backends/imgui_impl_allegro5.cpp

+ 3 - 3
backends/imgui_impl_allegro5.cpp

@@ -526,9 +526,9 @@ void ImGui_ImplAllegro5_SetDisplay(ALLEGRO_DISPLAY* display)
         // We still use a custom declaration to use 'ALLEGRO_PRIM_TEX_COORD' instead of 'ALLEGRO_PRIM_TEX_COORD_PIXEL' else we can't do a reliable conversion.
         ALLEGRO_VERTEX_ELEMENT elems[] =
         {
-            { ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, pos) },
-            { ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, uv) },
-            { ALLEGRO_PRIM_COLOR_ATTR, 0, IM_OFFSETOF(ImDrawVertAllegro, col) },
+            { ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, pos) },
+            { ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, uv) },
+            { ALLEGRO_PRIM_COLOR_ATTR, 0, offsetof(ImDrawVertAllegro, col) },
             { 0, 0, 0 }
         };
         bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));