vutle / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

Non-Exclusive input (desired functionality) #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It will be nice to have non-exclusive input for the mouse & keyboard. (This 
will allow us interact with other windows while running GameKit app. Also 
will allow us to put breakpoints (debugging...).

This is the code to add in gkWindowSystem::createMainWindow :

        #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32

        //////////////////////
        // Non-exclusive input
        params.insert(std::make_pair(std::string("w32_mouse"), 
std::string("DISCL_FOREGROUND" )));
        params.insert(std::make_pair(std::string("w32_mouse"), 
std::string("DISCL_NONEXCLUSIVE")));
        params.insert(std::make_pair(std::string("w32_keyboard"), 
std::string("DISCL_FOREGROUND")));
        params.insert(std::make_pair(std::string("w32_keyboard"), 
std::string("DISCL_NONEXCLUSIVE")));

        #else

        params.insert(std::make_pair(std::string("x11_mouse_grab"), 
std::string("false")));
        params.insert(std::make_pair(std::string("x11_mouse_hide"), 
std::string("false")));

params.insert(std::make_pair(std::string("x11_keyboard_grab"), 
std::string("false")));
        params.insert(std::make_pair(std::string("XAutoRepeatOn"), 
std::string("true")));

        #endif

Original issue reported on code.google.com by silveira.nestor@gmail.com on 16 Feb 2010 at 3:24

GoogleCodeExporter commented 9 years ago
Good Idea, Although I would prefer to add default functionality of show/hide to 
OIS
itself, so we can support blender usage of Rasterizer.showMouse() and what not 
from
scripts.

Do you know if DirectInput supports changing the exclusive settings at runtime? 
or is
it a startup thing.

Original comment by snailr...@gmail.com on 16 Feb 2010 at 4:49

GoogleCodeExporter commented 9 years ago
I agree with you in adding it to OIS...
Sorry, I dont know about DirectInput support for this functionality.

Original comment by silveira.nestor@gmail.com on 16 Feb 2010 at 4:56

GoogleCodeExporter commented 9 years ago
That's fine, I need to do some research on it anyway. Plus I cannot test Apple
support so it will have to wait a bit. 

I will add this to the code with a user prefs setting to enable / disable for 
now.
Thanks, again 

Original comment by snailr...@gmail.com on 16 Feb 2010 at 5:06