small fixes to input thread
Proper seperate game and render loops