CreateSurface crashing
im working on just initializing DirectDraw, and i can get up to the point where i have a valid LPDIRECTDRAW7 object, i have the coop level for fullscreen, and have it in a 640 by 480 by 8 full screen mode. but when i try to create the primary surface...
ZeroMemory(&ddsd, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
ddresult = lpdd->CreateSurface( &ddsd, &lpddsprimary, NULL)
if(ddresult != DD_OK)
return(ddresult);
i dont get past here, my program crashes. it goes back to regular display, and quits. i just cant get it to work, even though ive doubled check everything!
NOTHING->is impossible if you know it to be true
You might want to make sure you are using a LPDIRECTDRAWSURFACE7 object. That might be the problem. If you are still stumped, check out the Gauntlet Style Project core code located on this site under the game projects sections. It contains full code for Windowed/Exclusive mode graphics.
Jim Adams
Jim Adams
You will also want to check that is a DDSURFACEDESC2 and not a DDSURFACEDESC.
------------------------------
#pragma twice
------------------------------
#pragma twice
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement