Archived

This topic is now archived and is closed to further replies.

DirectX 7 and Win32 API

This topic is 5333 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

Hi, people. If I use DirectDraw in exclusive mode, can I still use (for example) WM_LBUTTONDOWN to determine mouse''s coordinates? Or do I HAVE to use DirectInput?

Share this post


Link to post
Share on other sites
Yes, DirectDraw exclusive mode won''t affect almost all Windows messages.

The only two things you might experience on certain buggy drivers (i.e. not the fault of DirectDraw and fixed by other drivers) are:

- Input lagging a few seconds behind what''s being rendered. This is the classic "display driver buffers tons more frames than WHQL permits so that non-interactive benchmarks and demos show better results". In Pac-Man:AIT (used DD7 & D3D7) we included an advanced user option for such drivers which serialised the frames with a lock on a surface that had been used in that frame.

- A few of the "special"/system key sequences like Alt-Tab not working (IIRC certain drivers (*cough* Voodoo *cough*) were doing interfering with those keys (and the Windows keys) because a few games weren''t getting their lost surface handling right).




--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Thanks for the help, Simon. I managed to get it working and saw the lag you mentioned. Hopefully it won''t matter much in my turn based game, as I''m trying to make it as simple as possible.

Share this post


Link to post
Share on other sites
Simon,

In a turnbased (nonrendering intensive) game like flamewill is making, would it be viable to add a Sleep(1) to the render loop to make sure windows messages get processed? Would this even help?

Share this post


Link to post
Share on other sites