tags:

views:

16

answers:

1

I am using Ogre3D and sometimes when there is a break (or an exception) and it breaks into visual studio, my mouse cursor fails to appear. This is very annoying as most of the time I have to restart the game because I cannot watch any variables when it breaks. Everything else works, just the mouse disappears and stays that way until I press Shift+F5 to end debugging OR I remove the break and hit continue, then exit out of the game normally (in the case of exceptions, I have no choice but to end debugging).

I think this problem is not due to Ogre3D itself. In any case, I hope somebody has a solution to this very annoying problem.

A: 

I have found the solution (not by myself, but with help :)

A direct link to the discussion of the issue: Ogre3D Forum

In case that link ever goes down, here is the quick answer which I hope will help somebody in the future with the same problem.

OIS locks the mouse exclusively for the app and if you want it to appear, set the mouse to non-exclusive mode. - syedhs

To set it to non-exclusive (partial code, if you ran into this problem then you know where this goes)

  paramList.insert(std::make_pair(std::string("w32_mouse"), 
    std::string("DISCL_FOREGROUND" )));
  paramList.insert(std::make_pair(std::string("w32_mouse"), 
    std::string("DISCL_NONEXCLUSIVE")));

You can change DISCL_FOREGROUND to DISCL_BACKGROUND depending on whether your application requires background access or not MORE INFO

Samaursa