I am writing a program and I want to check for messages (keypresses etc...). I need to use GetKeyState() for it. So The mainloop of my program looks something like this :
Code:
while(!done){
check_for_events();
handle_events();
draw();
}
- check_for_events() uses GetKeyState() to check if a key or mouse button is pressed or released.
- handle_events() : the code that handles those events
- draw() : the drawing code
So my question is : Will the keyboard (and mouse etc...) be responsive enough when handle_events() and draw() take alot of time ? If not, is there a better solution ?
Thanks in advance