I'm making a game with the SFML libraries and i'm using it's RenderWindow class to capture the player's keystrokes. However, I believe it is what is eating up CPU while my program is running.
For example, the following code, when in the while loop, uses my entire core.
1 2 3 4 5 6 7 8 9
if(Event.Key.Code == sf::Key::Escape)
I was considering putting a pause in between capturing keystrokes, but i'm afraid that i may miss input that way. Does anyone know a way where i can accurately record keystrokes while still remaining conservative in my CPU usage?