Merged r5016:5017 from branches/SDL-1.2: PS2 DMA mapping fix.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 10 Jan 2010 06:32:41 +0000
changeset 3626 596468a8459e
parent 3625 83910f4c373f
child 3627 631173ffd68f
Merged r5016:5017 from branches/SDL-1.2: PS2 DMA mapping fix. I assume this video target is slated for removal in 1.3, but I merged this, just in case.
src/video/ps2gs/SDL_gsyuv.c
--- a/src/video/ps2gs/SDL_gsyuv.c	Sun Jan 10 06:18:39 2010 +0000
+++ b/src/video/ps2gs/SDL_gsyuv.c	Sun Jan 10 06:32:41 2010 +0000
@@ -184,7 +184,7 @@
 
     /* Allocate a DMA area for pixel conversion */
     bpp = this->screen->format->BytesPerPixel;
-    map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
+    map_offset = (mapped_len + (sysconf(_SC_PAGESIZE) - 1)) & ~(sysconf(_SC_PAGESIZE) - 1);
     hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
         width * height * bpp +
         hwdata->macroblocks * (16 * sizeof(long long)) +