Jump to content

  • Log In with Google      Sign In   
  • Create Account


Loss of MouseButton input after closing and reopening game.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 drelidan7   Members   -  Reputation: 108

Like
0Likes
Like

Posted 28 June 2012 - 08:20 AM

Hello. I am currently working on a very small scale game engine and am running into an issue when I close and reopen my game from my primary application.

My InputManager initialization code:


public InputManager(Game game)
: base(game)
{

Device.RegisterDevice(UsagePage.Generic, UsageId.Mouse, DeviceFlags.None, game.Form.Handle);

Device.MouseInput += new EventHandler<MouseInputEventArgs>(Device_MouseInput);
}



The first time my InputManager is instantiated, everything works fine. The second (and I would imagine subsequent, though I haven't checked) time the InputManager is instantiated, the Device.MouseInput event never gets fired on button clicks, and the ButtonState is always marked as None.

I am running the game in a slightly odd environment. The primary application is a C#/WPF application, but one of our screens was suffering from a severe performance bottleneck, so we decided to implement it using SlimDX. My Game will be created and destroyed several times throughout the day, while the host application will remain running for eight to ten hours [working in a clinical environment]. It's not reasonable to ask our users to restart the application between game sessions.

Has anyone encountered anything like this before? Or does anyone know where I could look for help?

Thanks,

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS