Keyboard.GetState() is only working first time I start the application

77 views Asked by At

We have just ported our application from XNA to MonoGame since we don't wanne be stuck with .NET 4.0 Almost everything worked fine, was some issue with fullscreen where I found a soloution too.

However, during the Update we check if there has been any input. I use:

KeyboardState keyboardState = Keyboard.GetState();

First time it reacts and I get the result. This works until i do Game.Exit(). Then I start the game again by same command:

Game d = new Game();
d.Run();

After that is Keyboard.GetState() always empty. It won't recoginze any inputs from my keyboard. Mouse and touch is working the entire time. What's wrong? Read a post about restating my PC but didn't help.

0

There are 0 answers