1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Fix skin texture lookups not handling paths with extensions

This commit is contained in:
Salman Ahmed 2022-04-07 15:07:14 +03:00
parent 5b29ddd2ed
commit fb9fe4213d

View File

@ -443,9 +443,7 @@ namespace osu.Game.Skinning
string lookupName = name.Replace(@"@2x", string.Empty);
float ratio = 2;
string twoTimesFilename = Path.HasExtension(lookupName)
? @$"{Path.GetFileNameWithoutExtension(lookupName)}@2x{Path.GetExtension(lookupName)}"
: @$"{lookupName}@2x";
string twoTimesFilename = $"{Path.ChangeExtension(lookupName, null)}@2x{Path.GetExtension(lookupName)}";
var texture = Textures?.Get(twoTimesFilename, wrapModeS, wrapModeT);