mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Fix incorrect fallback logic
The recently-modified skin texture fallback logic was very subtly incorrect. If at the end of the first loop no texture was found, it would be checked for null to avoid setting scale adjust on a null texture, but then returned anyway, bypassing the fallback logic for subsequent possible paths entirely. Invert the check and explicitly continue to the next fallback path if neither a 2x, nor 1x texture with the given name is found in the store.
This commit is contained in:
parent
65db64e13e
commit
f5f0b94944
@ -293,9 +293,10 @@ namespace osu.Game.Skinning
|
||||
texture = Textures?.Get(name);
|
||||
}
|
||||
|
||||
if (texture != null)
|
||||
texture.ScaleAdjust = ratio;
|
||||
if (texture == null)
|
||||
continue;
|
||||
|
||||
texture.ScaleAdjust = ratio;
|
||||
return texture;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user