Jump to content
  • Advertisement

Archived

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

SunBug

DirectInput 7.0a Lag

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

When I used Direct3D and DirectInput together, I get long and unusual amounts of lag. By barely tapping a key, it won''t be until 0.5 - 1.0 seconds later that the input will be registered as if the key had been held down for the whole 0.5 - 1.0 seconds; i.e. input response comes in bursts. Framerates are high (~200), removing that possibility. The behaviour seems to be system and video card dependent; when tested on a Voodoo3 3000, the lag occured (though much longer) and on another video card (which I cannot remember the chipset) there was no lag evident. I had at first thought it may have been a driver issue--ATI isn''t renowned for their Windows drivers, but the fact that the lag occurs on a totally different processor and video card leads me to belive the problem lies somewhere else. The DirectDraw device is being created in windowed mode (normal), as well as the DirectInputDevice. Creating DirectDraw fullscreen/exclusive and DirectInputDevice exclusive made no difference whatsoever. Using the same DirectInput configuration and OpenGL yields no input lag (bursts of input) as does the D3D renderer. I''ve searched high and low for any sort of information or solutions on various websites (including MS'') in vain. Any help is greatly appreciated. -Jacob

Share this post


Link to post
Share on other sites
Advertisement
Mose likely it''s caused by the driver buffering large amounts of frames. Driver writers do this on purpose, because it gives then better scores on benchmarks

Add this code at the end of each frame, and see if it fixes the problem...

while( DDERR_WASSTILLDRAWING==FrontBuffer->GetBltStatus
(DDGBS_ISBLTDONE))
{
Sleep(0);
}

It will proably cause a slowdown in FPS, but thats probably better than the input lag...

Share this post


Link to post
Share on other sites
I remeber reading about directinput lag in a half life readme file about known bugs, I think it said how to fix it, I dont have half life anymore so I cant check

Anyways Im Bored
--Bordem

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!