mirror of
https://github.com/ppy/osu
synced 2025-02-13 16:47:38 +00:00
Fix filename lookups on LegacySkin
s going awry when extension is specified
Due to the logic present to handle `@2x` fallback, the extension was potentially being added at the wrong point in the filename. This change ensures that the lookup filenames are always correct. Closes https://github.com/ppy/osu/issues/17690.
This commit is contained in:
parent
b7f8716de9
commit
205edb65a2
@ -443,7 +443,11 @@ namespace osu.Game.Skinning
|
||||
string lookupName = name.Replace(@"@2x", string.Empty);
|
||||
|
||||
float ratio = 2;
|
||||
var texture = Textures?.Get(@$"{lookupName}@2x", wrapModeS, wrapModeT);
|
||||
string twoTimesFilename = Path.HasExtension(lookupName)
|
||||
? @$"{Path.GetFileNameWithoutExtension(lookupName)}@2x{Path.GetExtension(lookupName)}"
|
||||
: @$"{lookupName}@2x";
|
||||
|
||||
var texture = Textures?.Get(twoTimesFilename, wrapModeS, wrapModeT);
|
||||
|
||||
if (texture == null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user