07th-mod / higurashi-assembly

9 stars 8 forks source link

Fix Unity killing window managers with insane window sizes #93

Closed TellowKrinkle closed 1 year ago

TellowKrinkle commented 1 year ago

Unity versions ≤ 5.5.3p3 have a broken window resize function that sends uninitialized stack data to XSetWMNormalHints, which tends to not be appreciated by window managers.

Patch the function to immediately return, and reimplement it ourselves.

drojf commented 1 year ago

sorry I took so long to see this, I don't seem to get email notifications for PR on this repo? I'm going to try to figure out how to turn it on....

drojf commented 1 year ago

OK, tested this fix on Meakashi ep5 on my Manjaro, and it works fine now.

Looking at the unity versions, am I correct in thinking chapters 1,2,3,4,5,6 are the only ones which can have this problem?

Chapters which I've double checked where the fix works (and doesn't cause any other problems):

Fix Tested Chapter Store Unmodded Crashes
Yes 1 Steam No
Yes 2 Steam No
Yes 3 Steam Yes
Yes 4 Steam Yes
Yes 5 Steam Yes
Yes 6 Steam Yes

I'll go ahead and test on the other chapters as well, unless you think it's not necessary for the type of changes you made.

drojf commented 1 year ago

I noticed these minor issues which probably aren't related to this issue, but might be. I've seen some of them before but didn't note them down anywhere. I'll raise another issue later with these items once this PR is closed.

drojf commented 1 year ago

I tested on chapters 1-6 with no issues, you can merge if you're ready

TellowKrinkle commented 1 year ago

Looking at the unity versions, am I correct in thinking chapters 1,2,3,4,5,6 are the only ones which can have this problem?

Correct. Ch 7 uses 5.6.7f1, which has a new function for setting resolutions. I can't say anything for whether it's broken or not, but you'd hope that if they rewrote it they didn't replace it with another broken one.

drojf commented 1 year ago

I tested vanilla ch7 and ch8 just now and they work fine.

From previous testing, ch9 (Rei) also works fine, so I think we're all good now.