Closed Bitwolfies closed 2 years ago
I'm not 100% sure I understand the issue — is it that the mouse is still confined to the game window when Alt+Tab is pressed? If so, that doesn't happen on my system (where Psychonauts runs perfectly under sdl12-compat/kwin_wayland).
On my systems, Alt+Tab mouse behaviour is exactly the same between:
SDL_VIDEODRIVER=wayland
)All under KWin/KDE, with the game in windowed mode, in-game (i.e., not in the menu) with the Psychonauts window now inactive with another active window partially overlapping it. The mouse input is only passed through to the game if the mouse is directly over the game window.
In general, I've not noticed any issues whatsoever with Psychonauts under sdl12-compat/wayland versus SDL1.2/X11, or indeed any of the combinations above. Even sdl12-compat with SDL_VIDEODRIVER=kmsdrm
works fine with neither wayland nor X!
I suspect that any issue you're seeing is more likely to be with either SDL2 or your window manager/Wayland compositor than it is with sdl12-compat or the game.
(Alternatively, if the issue you're referring to is that shaking the mouse a lot can cause the mouse to "escape", particularly at low framerates, that's generally considered a bug, not a feature, and should be fixed in SDL 2 under Wayland.)
I'm closing this as WORKSFORME, but we can revisit if we can reproduce it later.
As I'm sure is well documented, the psychonauts linux port has many issues related to sdl1, mainly those of being unable to alt tab, and input being forced in. Now on x11 while alt tabbing works fine with the compat layer, mouse escape does not in windowed mode (Meaning you can remove input from the game by moving the mouse away from it)
Now on wayland things change, as wayland has guarantees about always being able to alt tab, and indeed when using the real sdl1.2, you can alt tab on wayland. And when using real sdl1 on wayland, you can escape mouse control in windowed mode by shaking your mouse out, however when using the compat layer, mouse input is 100% locked unless you alt tab.
Sorry if this is poorly worded or not even an issue, but I felt it was worth noting as technicality on Wayland, its better to NOT run the layer.