On a WM6 device why would DirectDraw and GAPI return different addresses for the screen memory.
If I use GAPI:
BYTE * pVideoMemory = (BYTE *)GXBeginDraw();
then pVideoMemory = 0x51b00000
but if I use DIRECTDRAW:
BYTE * pVideoMemory = (BYTE *)ddsd.lpSurface;
then pVideoMemory = 0x51a00000.
On a WM5 device the DIRECTDRAW method returns the same address as the GAPI method and my function used to draw to screen works.
Has it something to do with back buffers....
The below code is how Iset up my directdraw surface:
HRESULT hRet;
hRet = DirectDrawCreate(NULL, &g_pDD, NULL);
(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
ddsd.dwBackBufferCount = 1;
hRet = g_pDD->CreateSurface(&ddsd, &g_pDDSPrimary, NULL);
Thanks for any help,
Harry