Faic
June 29, 2015, 9:57am
1
Hello,
I have a WPF window and start a Monogame instance from it. I need monogame just for rendering into a Rendertarget2D. But as soon as I start Monogame it consumes my keyboard input and I can’t use text input in my WPF window anymore.
So how can I prevent Monogame from consuming/blocking the keyboard keys?
I think it is related to my post (first post is related to second where they are looking into it):
Thanks for the feedback!
Love that you can come back on a monday morning and learn new stuff directly!
The thread which call startDemo() is closed when the game end. I have verified that in VS2013 by looking on which threads that are running from the application.
I have done Content.Unload(), but dosn’t make any difference. In my eyes its the same as when the thread closes (if the GC know what to do).
Yeah I got that feeling as well. Normaly you just create a game with the “menu” inside the …
opened 08:00AM - 25 Jun 15 UTC
Hi everyone,
Detection:
Problem occured when ported from XNA to Monogame
Back… ground:
We recently ported our application from XNA to Monogame to be able to leave .NET4.0 and continue use the latest released (.NEt4.5). We have a WinForm application where you can start a XNA/Monogame where we have an animation that just illustrate a flow.
XNA implementation:
When the animation was done we exit the application pressing 'Esc' and two code of lines was used:
this.Dispose()
this.Exit()
Monogame implementation:
I can't use same implementation as for XNA since the line "this.Dispose()" make it crash later.
I only use "this.Exit()". The game is started from an using statement:
using (Demo d = new Demo())
d.Run()
Error:
If I try to start Monogame the second time and so on, Keyboard.GetState() is always empty and the memory is increasing for each time i start it. I think the problem is that objects/resources arn't disposed correctly, even when its started from an using statement. This will make the application grow until it crash and the user can't use keyboard inputs after the first time.
I made a small .sln project to demostrate the problem:
http://s000.tinyupload.com/download.php?file_id=05943256822998486463&t=0594325682299848646326883