겜하는데 창모드 자꾸 키기 귀찮아서 걍 직접 만들었거든?
근데 윈7~윈8에선 존나 잘되는데 xp에선 색상이 32비트로 설정되있으면 위에 사진 처럼 뜨는데 왜이럼?


게임 그래픽은 ddraw 라고 DirectDraw 이용함

CreateSurface 하는 부분 =>

if(ddsd->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)

{

      HRESULT hr;


      hr = ((_CreateSurface)((int*)Address_CreateSurface))(a1, ddsd, &g_pDDS, pUnkOuter);

      if(FAILED(hr))

      {

                   MessageBox(0, L"CreateSurFace 실패 Code : 1", 0, 0);

                  ExitProcess(0);

      }

      g_pDDS->SetClipper(g_pClipper);

      g_pClipper->SetHWnd(0, ghWnd);


      ddsd->dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_PIXELFORMAT;

      ddsd->ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;

      ddsd->dwWidth = 800;

      ddsd->dwHeight = 600;


      ddsd->ddpfPixelFormat.dwSize = sizeof( ddsd->ddpfPixelFormat );

      ddsd->ddpfPixelFormat.dwFlags = DDPF_RGB;

      ddsd->ddpfPixelFormat.dwRGBBitCount = 0x10;

      ddsd->ddpfPixelFormat.dwRBitMask = 0x0000F800;

      ddsd->ddpfPixelFormat.dwGBitMask = 0x000007E0;

      ddsd->ddpfPixelFormat.dwBBitMask = 0x0000001F;


      hr = ((_CreateSurface)((int*)Address_CreateSurface))(a1, ddsd, &g_pDDSBack, pUnkOuter);

      if(FAILED(hr))

      {

               MessageBox(0, L"CreateSurFace 실패 Code : 2", 0, 0);

               ExitProcess(0);

      }

      //ddsd->ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY;

      _lvalue_return = ((_CreateSurface)((int*)Address_CreateSurface))(a1, ddsd, lpDDS, pUnkOuter);

       if(FAILED(_lvalue_return))

      {

               MessageBox(0, L"CreateSurFace 실패 Code : 3", 0, 0);

               ExitProcess(0);

      }

//Blt, fastBlt


      Address_Blt = *(int*)(*(int*)(*(int*)lpDDS) + 0x14);

      *(int*)(*(int*)(*(int*)lpDDS) + 0x14) = (int)fBlt;


      Address_FastBlt = *(int*)(*(int*)(*(int*)lpDDS) + 0x1c);

      //*(int*)(*(int*)(*(int*)lpDDS) + 0x1c) = (int)fBltFast;

}

else

{

      if((ddsd->dwFlags & DDSD_PIXELFORMAT) == 0)

      {

               ddsd->dwFlags |= DDSD_PIXELFORMAT;

               ddsd->ddpfPixelFormat.dwSize = sizeof( ddsd->ddpfPixelFormat );

               ddsd->ddpfPixelFormat.dwFlags = DDPF_RGB;

               ddsd->ddpfPixelFormat.dwRGBBitCount = 0x10;

               ddsd->ddpfPixelFormat.dwRBitMask = 0x0000F800;

               ddsd->ddpfPixelFormat.dwGBitMask = 0x000007E0;

               ddsd->ddpfPixelFormat.dwBBitMask = 0x0000001F;

      }


_lvalue_return = ((_CreateSurface)((int*)Address_CreateSurface))(a1, ddsd, lpDDS, pUnkOuter);



RGB 565는 게임에서 저걸로 생성하길래 그대로 옵션줌