DirectInput 7.0a Lag

Started by
1 comment, last by SunBug 23 years, 10 months ago
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
-Jacob
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...

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

Im Always Bored--Bordem ICQ: 76947930

This topic is closed to new replies.

Advertisement