Advertisement

Obtaining a DirectDraw4 Interface

Started by March 02, 2003 08:45 PM
11 comments, last by Peon 21 years, 8 months ago
quote:
...this time it is with SetDisplayMode (currently returning DDERR_UNSUPPORTED...


That would more than likely be because your video driver doesn't know how to build the requested mode and DirectDraw is telling you it's unsupported. 800x640 isn't a standard video mode.

I'd suggest trying 800x600

i.e. SetDisplayMode(800,600,32,0,0)

[edited by - Fingolfin on March 5, 2003 9:24:59 AM]
BTW, of course

LPDIRECTDRAW4 lpdd4;

works with the DirectX 9.0 SDK. Right in ddraw.h you can find:

typedef struct IDirectDraw              FAR *LPDIRECTDRAW;typedef struct IDirectDraw2             FAR *LPDIRECTDRAW2;typedef struct IDirectDraw4             FAR *LPDIRECTDRAW4;typedef struct IDirectDraw7             FAR *LPDIRECTDRAW7; 


Why not use LPDIRECTDRAW7 lpdd7. That''s been around since DirectX 7.
Advertisement
Fingolfin: Well, I have been using iDirectDraw4 simply because LaMothe does in the version of the book I have, and it makes it easier to follow if I do the same. I''m not really familiar with DirectX, so I figure I need to understand why his code works, before I can write my own, original code.

And yep, that did it alright; I had a weird video size I think what happened is that I got mixed up with the _40x480 mode. In my original test, I put 780, instead of 768, the _80 part coming from the smaller 480 mode. Wheeee, how stupid of me Not only did I use a weird size, but I did it TWICE. Thanks a bunch!

Peon
Peon

This topic is closed to new replies.

Advertisement