JosefNemec/Playnite

Playnite interfere with gamebar

Opened this issue · 4 comments

Bug Description

Playnite captures gamepad input even if it isn't currently focused, making it unusable with gamebar

To Reproduce

  1. Open Playnite fullscreen
  2. Launch gamebar with the guide button

Diagnostics ID

ea04a981-b178-452c-9f54-b10a63688a87

Screenshots

Video.senza.titolo.mp4

We will probably need to add some explicit detection of GameBar being opened, because this means that GameBar is keeping Playnite itself focused and also doesn't prevent it from processing controller input.

But it doesn't happen with games or apps (made even before gamebar was a thing)

I don't know how GameBar prevents games and app from processing input when GameBar is opened. All I can say that we are using industry standard library (SDL) to handle controller inputs so I don't think the issue is necessarily on our (or SDL's) side, but I might be wrong.

I currently don't have time to investigate this more because I have my hands full with Playnite 11. Somebody else will have to look into what's going on.

Haven't tested this but I think it can be detected like this:
Willing contribute once Playnite 11 is up.

if (Windows.Gaming.UI.GameBar.Visible) {
the game bar is visible;
}

if (Windows.Gaming.UI.GameBar.IsInputRedirected) {
the game bar has input;
}

Windows.Gaming.UI.GameBar.VisibilityChanged +=
(s, e) => { the visibility changed };
Windows.Gaming.UI.GameBar.IsInputRedirectedChanged +=
(s, e) => { the input state changed };