Obscure 2 window mode
![obscure 2 window mode obscure 2 window mode](https://betanews.com/wp-content/uploads/2019/05/Files-Dark-Mode-600x398.jpg)
OBSCURE 2 WINDOW MODE CODE
Virtual void acquireDIMouse(bool bAcquire)Īdd the following code to the frameStarted function of the SkyBoxFrameListener: Within the initialise() function, find and comment out the following line: Void Win32Input8::acquireDIMouse(bool bAcquire) Ogrenew\PlatformManagers\Win32\src\OgreWin32Input8.cpp Ogrenew\PlatformManagers\Win32\include\OgreWin32Input8.hĪdd the following function definition in the public section: Here's a recap of the code changes performed so far: When the mouse would be positioned back over the windowed application you'd use the function to reacquire the mouse cursor (this event might be the WM_SETCURSOR message). I think this is what Kraythe had in mind. This function could also be called when the mouse reaches one of the edges of the window, to provide a seemless release of the mouse. Using the E key does fix the problem, but this is not working as smoothly as it should. The reason the mouse input is not automatically reactivated is that I've used the variable mUseMouse to disable the mouse input while the mouse is released and this variable is not reactivated by ALT-TABbing out and back in. What does not work is releasing the mouse cursor, activating another application (giving it focus) and then returning to the windowed application (ALT-TABbing again or clicking on the window) the windowed application regains the focus but the mouse input remains disabled. While in windowed mode, the Q key releases the mouse cursor and the E key reacquires it. I've used the Demo_SkyBox as my workbench. Here's where my experiments currently stand. I already have action mapping though, not part of the lib, as I do want to try to keep non essential features either (a) a compile time option or (b) seperate from the lib - for a streamlined and small footprint based on client needs. My lib, you can set what ever DI flags for each device before the manager's creation. If the app really wants to show the actual cursur sometimes, then they should create the OIS mouse with NONEXCLUSIVE mode to begin with, and handle showing/hiding the Windows mouse with loss/gain of focus. And then they call show, it would have to effectively recreate the DI device with nonexclusive mode. If the user had created the mouse with Exclusive access. Though, methods of hide/show could be placed in the Base Mouse class.
OBSCURE 2 WINDOW MODE FREE
It is really up to the app to free the mouse. So, checking for lost/gained focus that way is a not really where I want to go. The only thing I do not want in the lib is a Win32 Message loop/pump. More work could definately go into mouse/keyboard to make it more flexible. And have done minor fixes for missing keys in CVS. I have been working on adding force feedback support.
![obscure 2 window mode obscure 2 window mode](http://www.hardcoregaming101.net/wp-content/uploads/2018/01/Imm05-300x225.png)
(especially if someone wants to contribute a Mac port) I always welcome contributions, or even team members for OIS.