Skip to content

Commit

Permalink
Fix black backgrounds if bgs toggled after startup
Browse files Browse the repository at this point in the history
 - See #104
  • Loading branch information
drojf committed Dec 17, 2023
1 parent 57c48c4 commit d42d5cd
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Assets.Scripts.Core.Scene/Layer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,18 @@ public void ReloadTexture()
{
if (PrimaryName == string.Empty)
{
HideLayer();
// PrimaryName is set to string.Empty when Layer's texture is released -
// therefore there is no texture to reload, so do nothing here.
//
// Note: Previously there was a HideLayer() call here, which caused problems
// with backgrounds if ReloadTexture() was called just after the game had started
// running, and DrawSceneWithMask() had not yet been called. It would cause
// backgrounds to display for one frame(?), then turn black.
//
// I think may be a special layer is activated on startup, but has no texture set,
// triggering this if statement.
//
// See https://github.com/07th-mod/higurashi-assembly/issues/104 for details
}
else
{
Expand Down

0 comments on commit d42d5cd

Please sign in to comment.