Skip to content

Commit

Permalink
Merge pull request #1100 from andy840119/fix-release-build-not-get-th…
Browse files Browse the repository at this point in the history
…e-skin-resource

Seems internal skin is not loaded well in release build.
  • Loading branch information
andy840119 authored Feb 5, 2022
2 parents a24a901 + bf78415 commit 03fc9e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ private class InternalSkinStorageResourceProvider : IStorageResourceProvider
{
public InternalSkinStorageResourceProvider(string skinName)
{
Files = Resources = new NamespacedResourceStore<byte[]>(new DllResourceStore(GetType().Assembly), $"Resources/Skin/{skinName}");
var store = new KaraokeRuleset().CreateResourceStore();
Files = Resources = new NamespacedResourceStore<byte[]>(store, $"Skin/{skinName}");
}

public IResourceStore<TextureUpload> CreateTextureLoaderStore(IResourceStore<byte[]> underlyingStore)
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Karaoke/Utils/AssemblyUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ namespace osu.Game.Rulesets.Karaoke.Utils
{
public static class AssemblyUtils
{
public static Assembly GetAssemblyByName(string partialName)
public static Assembly GetAssemblyByName(string name)
{
var defaultAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.FullName.Contains(partialName));
var defaultAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.GetName().Name == name);

if (defaultAssembly != null)
return defaultAssembly;
Expand Down

0 comments on commit 03fc9e0

Please sign in to comment.