Re: [PATCH 7/9] wined3d: Make device palettes dynamically allocated.
25 Mar
2008
25 Mar
'08
10:57 a.m.
Alexander Dorofeyev <alexd4(a)inbox.lv> writes:
+ if (PaletteNumber >= This->NumberOfPalettes) { + NewSize = This->NumberOfPalettes; + do { + NewSize *= 2; + } while(PaletteNumber >= NewSize); + palettes = HeapReAlloc(GetProcessHeap(), 0, This->palettes, sizeof(PALETTEENTRY[256]) * NewSize);
You should be using an array of pointers, not a single array for all palettes, so that you don't need to move around the whole data on each realloc. -- Alexandre Julliard julliard(a)winehq.org
6478
Age (days ago)
6478
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard