Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Loss of MouseButton input after closing and reopening game.

4: Adsense

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   

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,




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.