mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-10-28 05:48:52 +01:00
bugfixes
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@347 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
471711c0ac
commit
278922b838
2 changed files with 18 additions and 4 deletions
|
|
@ -58,7 +58,7 @@ static int DirectDrawInit()
|
|||
|
||||
// Create the backbuffer surface
|
||||
ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE;
|
||||
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
|
||||
ddsd.dwWidth = EmuWidth;
|
||||
ddsd.dwHeight = EmuHeight;
|
||||
|
||||
|
|
@ -110,6 +110,20 @@ static int DirectScreenDDraw()
|
|||
dst = (int *)((char *)dst + sd.lPitch);
|
||||
}
|
||||
}
|
||||
else if (sd.ddpfPixelFormat.dwRGBBitCount == 24) /* wine uses this for me */
|
||||
{
|
||||
void *dst = sd.lpSurface;
|
||||
for (y = 0; y < EmuHeight; y++)
|
||||
{
|
||||
unsigned char *dst1 = (unsigned char *) dst;
|
||||
for (x = 0; x < EmuWidth; x++, dst1 += 3)
|
||||
{
|
||||
int s = *ps++;
|
||||
dst1[2] = (s&0xf800)>>8; dst1[1] = (s&0x07e0)>>3; dst1[0] = s<<3; // BGR
|
||||
}
|
||||
dst = (void *)((char *)dst + sd.lPitch);
|
||||
}
|
||||
}
|
||||
else if (sd.ddpfPixelFormat.dwRGBBitCount == 16)
|
||||
{
|
||||
unsigned short *dst = (unsigned short *)sd.lpSurface;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue