comparison src/video/ps2gs/SDL_gsyuv.c @ 4309:3aab8b57cbd1 SDL-1.2

Debian patch: 216_page_size.diff
author Sam Lantinga <slouken@libsdl.org>
date Sat, 10 Oct 2009 09:59:29 +0000
parents a1b03ba2fcd0
children
comparison
equal deleted inserted replaced
4308:447fd6ae10cf 4309:3aab8b57cbd1
178 return(NULL); 178 return(NULL);
179 } 179 }
180 180
181 /* Allocate a DMA area for pixel conversion */ 181 /* Allocate a DMA area for pixel conversion */
182 bpp = this->screen->format->BytesPerPixel; 182 bpp = this->screen->format->BytesPerPixel;
183 map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); 183 map_offset = (mapped_len + (sysconf(_SC_PAGESIZE) - 1)) & ~(sysconf(_SC_PAGESIZE) - 1);
184 hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) + 184 hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
185 width * height * bpp + 185 width * height * bpp +
186 hwdata->macroblocks * (16 * sizeof(long long)) + 186 hwdata->macroblocks * (16 * sizeof(long long)) +
187 12 * sizeof(long long); 187 12 * sizeof(long long);
188 hwdata->dma_mem = mmap(0, hwdata->dma_len, PROT_READ|PROT_WRITE, 188 hwdata->dma_mem = mmap(0, hwdata->dma_len, PROT_READ|PROT_WRITE,