Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing graphics preset during 07th-mod logo screen (before reaching main menu) causes strange graphical bugs #104

Open
drojf opened this issue Jan 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@drojf
Copy link
Contributor

drojf commented Jan 18, 2023

I noticed if you change the graphics preset via the F10 menu during 07th-mod logo screen (before reaching main menu), it causes the background image to turn black shortly after being displayed, and some other odd glitches.

This happens even on older versions of the DLL I think.

Restarting the game seems to fix it, so it's probably not setting any state which is good.

Stopping the user pressing the F10 key before reaching the menu is probably the easiest way to fix this.

@drojf
Copy link
Contributor Author

drojf commented Dec 10, 2023

I investigated this issue today. I think it has to do with this part of the code (which only exists in our mod I think):

public void ReloadTexture()
{
if (PrimaryName == string.Empty)
{
HideLayer();
}
else
{

On startup, there seems to exist a Layer which has PrimaryName set to String.Empty (normally PrimaryName is the texture name). However I think this layer disappears, or has its PrimaryName set, after the first time you call DrawSceneWithMask().

So if ReloadTexture() was called just after the game had started
running, and DrawSceneWithMask() had not yet been called, it would cause the above HideLayer() call to run, which I assume causes this weird behavior where the background will turn black one frame after being displayed (although I'm not sure why).

I tested removing the HideLayer() call and it seems to fix the issue. I'm pretty confident it won't break anything, since ReloadAllImages() (which calls ReloadTexture()) is only ever called when you change our graphics related mod options. So if you never change any graphics mod options, ReloadAllImages() is never called.

Worst case the user can restart their game to fix an issue (if this removal of HideLayer() causes an issue)

I have put the fix on the https://github.com/07th-mod/higurashi-assembly/compare/f-fix-corrupt-graphics branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant