+ else if (sd.ddpfPixelFormat.dwRGBBitCount == 24) /* wine uses this for me */\r
+ {\r
+ void *dst = sd.lpSurface;\r
+ for (y = 0; y < EmuHeight; y++)\r
+ {\r
+ unsigned char *dst1 = (unsigned char *) dst;\r
+ for (x = 0; x < EmuWidth; x++, dst1 += 3)\r
+ {\r
+ int s = *ps++;\r
+ dst1[2] = (s&0xf800)>>8; dst1[1] = (s&0x07e0)>>3; dst1[0] = s<<3; // BGR\r
+ }\r
+ dst = (void *)((char *)dst + sd.lPitch);\r
+ }\r
+ }\r