Hi !
I need some way to wait in a easy console app for some key for example left arrow to be pressed.
I have tried things like this:
but this code if( GetAsyncKeyState( VK_LEFT ) checks for pressed key only when its called, and to check all the time i need to loop it.It works, however when i loop it, its lagging my pc (100% usage, do you know a way that will just wait for the input and if there is a other button pressed then just go back to a function ?
Like:
[code]
void waiting()
{
I need some way to wait in a easy console app for some key for example left arrow to be pressed.
I have tried things like this:
if( GetAsyncKeyState( VK_LEFT ) & 0x8000 )
but this code if( GetAsyncKeyState( VK_LEFT ) checks for pressed key only when its called, and to check all the time i need to loop it.It works, however when i loop it, its lagging my pc (100% usage, do you know a way that will just wait for the input and if there is a other button pressed then just go back to a function ?
Like:
[code]
void waiting()
{