IllusionMods / KKS_VR

VR plugin for Koikatsu Sunshine (main game and studio)
MIT License
50 stars 11 forks source link

In-world Koikatsu window appears as a white rectangle on Linux #14

Closed vickyorlo closed 1 year ago

vickyorlo commented 2 years ago

As in the title, when running the game through Proton on Linux, the Koikatsu window spawned in VR by the menu tool appears as a white rectangle. In the actual Koikatsu VR, the UI displays just fine, with the same environment and settings. Blindly clicking on the white rectancle causes no effects. I've looked over the code in the repository and I cannot find anything direcly related, but I'm assuming in one way or another the plugin uses winapi stuff that isn't supported by Wine yet. Not sure if this is at all fixable without a major rework, but I might as well report this for anyone's interest.

ManlyMarco commented 1 year ago

I'm unable to reproduce the issue. If it's only the menu panel that is broken then it's unlikely to be related to winapi. v1.2 has some changes related to the menu tool, so it might be worth checking if I didn't fix this on accident.

vickyorlo commented 1 year ago

Huh, quite interesting. I have since rather lost the way to check, but I will set Koikatsu up when I have free time and test with newer Proton and such.

Jakemoom760 commented 1 year ago

Now I'm having this same issue on Linux. Even with the latest version (v1.2). I'm going to tinker around and see if it has to do with a wine api or something

Jakemoom760 commented 1 year ago

So I've taken a look inside the output log for the game and I'm getting the repeated error:

void VRGIN.Core.VRGUI.CatchCanvas() void VRGIN.Core.VRGUI.OnUpdate() void VRGIN.Core.ProtectedBehavior.SafelyCall(Action) [Error : VRLog] [0069] [ProtectedBehavior.SafelyCall] System.NullReferenceException: Object reference not set to an instance of an object

ManlyMarco commented 1 year ago

@Jakemoom760 Can you test this build and send the resulting log? VRGIN_OpenXR_debug.zip

Also test this build and see if there's any change VRGIN_OpenXR_debug2.zip

vickyorlo commented 1 year ago

Tested, white screen on 1.1 and 1.2, both in studio and game. Same with the dll above. Using Proton Experimental and SteamVR Beta for what that's worth.

ManlyMarco commented 1 year ago

Send the output_log.txt.

vickyorlo commented 1 year ago

output_log.txt

ManlyMarco commented 1 year ago

@vickyorlo This is the cause https://github.com/ManlyMarco/VRGIN_OpenXR/blob/57f57ab57adb3e997652c7d67139821214d65641/VRGIN/Native/WindowManager.cs#L19-L41 Looks like whatever compatibility layer or window manager is used doesn't want to give window handles, I'd guess it's just unimplemented.

Try this build, it might work but will probably have issues with cursor position debig+bin.zip

ManlyMarco commented 1 year ago

Hopefully the build I posted above fixes this issue, I made a commit with the fix and will include it in the next release. https://github.com/ManlyMarco/VRGIN_OpenXR/commit/9fe5140c6381335d68d2f1948be6c332b369bf6c

vickyorlo commented 1 year ago

Sorry for the slow replies, my VR setup is a massive hassle to set up right now. I tested the new dlls in the debig+bin file, but the result is still the same. Checked on Wayland and Xorg.

ManlyMarco commented 1 year ago

Send the output log.

Keelhauled commented 1 year ago

The windows work now yay. :tada: But the vr controller cursor seems to be a bit missaligned which isn't a huge issue since I can just use my real mouse instead.

ManlyMarco commented 1 year ago

Yeah, to be expected since it has to guess where the cursor is. A proper fix would be to figure out how to make the WindowManager class work properly under Linux.