Currently working on a game at work, i have a problem with direct input ( or maybe directx as a whole ).
When the framerate is quite low ( <30 fps) i have a lag on the controls ( tested on joysticks and keyboard) : ie when I push the left key, the main character moves 0.7 s later. I measured it with a simple test : flash on screen on a regular basis and i press a key when i see it , then i substract the time the frame took (in order not to be distracted by the rendering time )
Results : 0.2s more at low fps ( 10-15) than at 30
Due to the game engine, i can not use multithreading and so the polling is done on every frame.
I already tried to put a sleep(1) at the end of the game loop and to use win32 api instead of dinput but it seems to have no effect...
Hope someone can help !