Commit a0dd23d3 authored by Ryan C. Gordon's avatar Ryan C. Gordon

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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404377
parent 3a00b48c
...@@ -184,7 +184,7 @@ GS_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, ...@@ -184,7 +184,7 @@ GS_CreateYUVOverlay(_THIS, int width, int height, Uint32 format,
/* Allocate a DMA area for pixel conversion */ /* Allocate a DMA area for pixel conversion */
bpp = this->screen->format->BytesPerPixel; 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) + hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) +
width * height * bpp + width * height * bpp +
hwdata->macroblocks * (16 * sizeof(long long)) + hwdata->macroblocks * (16 * sizeof(long long)) +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment