Skip to content

duke3d/src/game.cpp: Further reduce input lag in main game loop.

Mitchell Richters requested to merge (removed):Duke3D_MainLoopChanges into master

From my testing, this further reduces input latency and also simplifies the code by removing checks that can just be done by a single while loop.

This goes nicely with the PR #1 and together along with other significant input improvements as of late create a lagless and tearless experience on Windows when using r_vsync '1'.

I've included this separately as some of the code I've removed around 'frameJustDrawn', etc is quite recent and there might be valid reasoning for it to be there that I just don't understand.

  • Continuously get input within same loop as G_DoMoveThings().
  • Replace if statement and 2x do/while statements with single while statement.
  • Remove conditions that would cause the loop to break prematurely.

Merge request reports