Hi,

If I set DirectInput cooperativelevel with DISCL_BACKGROUND and DISCL_NONEXCLUSIVE flags. Everything works perfect BUT!

If I'm running in windowed mode and DISCL_BACKGROUND is implemented, then application receives input even it's not active. And when my window is not active I'm not updating the scene. So this causes a little problem.

If I set cooperative flag DISCL_FOREGROUND among with DISCL_NONEXCLUSIVE then everything works fine until window loses its focus. And when it's activated again, DirectInput doesn't get keyboard state anymore?!?

I'm aware that GetDeviceState returns DIERR_INPUTLOST if it cannot get device state, but even if I try to re-acquire device it doesn't help, UNTIL I set cooperativelevel again with DISCL_BACKGROUND flag, which gaves me same result if I use it in the first place (when initializing).

So, what to do? I tried to set window to topmost before re-acquiring, but that didn't help either. Please, help ObiWan Kenobi. You are my only hope.