mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2024-11-25 13:21:04 +00:00
Added Marcus's patch to align surfcache_t structs for 64-bit platforms.
This commit is contained in:
parent
69168b6695
commit
57def3e264
1 changed files with 3 additions and 1 deletions
|
@ -139,7 +139,9 @@ surfcache_t *D_SCAlloc (int width, int size)
|
||||||
Sys_Error ("D_SCAlloc: bad cache size %d\n", size);
|
Sys_Error ("D_SCAlloc: bad cache size %d\n", size);
|
||||||
|
|
||||||
size = (int)&((surfcache_t *)0)->data[size];
|
size = (int)&((surfcache_t *)0)->data[size];
|
||||||
size = (size + 3) & ~3;
|
#define SIZE_ALIGN (sizeof(surfcache_t*)-1)
|
||||||
|
size = (size + SIZE_ALIGN) & ~SIZE_ALIGN;
|
||||||
|
#undef SIZE_ALIGN
|
||||||
if (size > sc_size)
|
if (size > sc_size)
|
||||||
Sys_Error ("D_SCAlloc: %i > cache size",size);
|
Sys_Error ("D_SCAlloc: %i > cache size",size);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue