I think I understand what u mean.
I remember the old days when I was doing a simple "snake" game in pascal.
Back then I was able to do something like
.......move snake in one direction.....
..... process input key and change dirrection....
or something like it... The thing was that the snake was moving ( implemented in the loop ) and when an arrow key was pressed the direction would heve been changed. Ok, the only problem is that i don't know any standard C function that would do the samething thing as keypressed in pascal. The only alternative I can think about is having another thread that listens to user input, push the event in a global queue and have the "game running" thread process the event queue with user input. This is a more general approach, but I'm still wondering if C has any function like keypressed() :) . So if anybody can enlighten me... :)