]> git.cworth.org Git - vogl/blobdiff - src/voglcommon/vogl_ctypes.cpp
Fixing various issues that were showing up when trying to snapshot/restore Cube 2:
[vogl] / src / voglcommon / vogl_ctypes.cpp
index ee81b1ae8442c4e8551346ca42b3d7fb62948290..714a8853f6415283f4d9af0f4f6f3d0dfb7b3e75 100644 (file)
@@ -145,6 +145,10 @@ void vogl_ctypes::change_pointer_sizes(uint trace_ptr_size)
 //DEF_LONG_TYPE(VOGL_CURSOR);
 #undef DEF_LONG_TYPE
 
+    // Special case the XVisualInfo struct because its size differs between 32-bit and 64-bit - argh this sucks and we need a MUCH cleaner way of handling this.
+    // In practice this only fixes an assertion, because the packets always describe the exact length of objects.
+    m_vogl_ctype_descs[VOGL_XVISUALINFO].m_size = (trace_ptr_size == 8) ? 64 : 40;
+
 #if 1
     // sanity check
     for (uint ctype_iter = 0; ctype_iter < VOGL_NUM_CTYPES; ctype_iter++)