Sign in to follow this  

IDirectDraw.SetDisplayMode not supported at all...

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

SetDisplayMode's signiture is: int SetDisplayMode(this, int width, int height, int bpp); I can't get it to return DD_OK (0) for any value of bpp. Ie, it won't work for 32 bpp to 0 bpp; it will onlly return DDERR_UNSUPPORTED (080004001h). I'm calling SetCooperativeLevel with the corresponding parameters as well. That is, the api says the flags must be DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN. The only other parameters are width and height, which I set both to 400 pixels for testing. I want to know if the SetDisplayMode returning DD_OK is needed before you start drawing. Why I question?: I'm using the source code of a working app, and I'm following the api calls exactly. Yet the app, a simple plasma demo, works. I know, the logical thing is to try continuing even with DDERR_UNSUPPORTED, but it still bugs me, so to speak. Thanks for any reply. add: And no i'm not passing in the this pointer as is in the signiture. I'm doing this in assembly, so passing this is done explicitly, and i'm doing that correctly too. If you change the way i pass this SetDisplayM will return DDERR_INVALIDPARAMS... add0: Extra info: I'm on a laptop with a mobility radeon (don't know what model), and i've dedicated 32MB of ram to it. Is there a newer version of DirectDraw I should try? I think the DD i'm using that's in ddraw.dll is DD7.

Share this post


Link to post
Share on other sites
Wow, thx Prototype. I'll go try that now. But the thing that still bugs me is that the demo source i'm looking at uses 200 x 200 with no problem. They are even drawing the images at .... *looks at the demo source again* Duh! I see it now, the demo uses width= 320, height = 200!!!! I'm such an idiot! OGM. Note to self: never pick arbitrary display heigh/width whne testing!

Share this post


Link to post
Share on other sites

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this