diff --git a/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs b/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs index e78af3121..8ae7534c1 100644 --- a/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs +++ b/src/Ryujinx.UI.Common/App/ApplicationLibrary.cs @@ -10,6 +10,7 @@ using LibHac.Ns; using LibHac.Tools.Fs; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.NcaUtils; +using Ryujinx.Common; using Ryujinx.Common.Configuration; using Ryujinx.Common.Configuration.Multiplayer; using Ryujinx.Common.Logging; @@ -76,21 +77,11 @@ namespace Ryujinx.UI.App.Common TitleUpdates = _titleUpdates.AsObservableCache(); DownloadableContents = _downloadableContents.AsObservableCache(); - _nspIcon = GetResourceBytes("Ryujinx.UI.Common.Resources.Icon_NSP.png"); - _xciIcon = GetResourceBytes("Ryujinx.UI.Common.Resources.Icon_XCI.png"); - _ncaIcon = GetResourceBytes("Ryujinx.UI.Common.Resources.Icon_NCA.png"); - _nroIcon = GetResourceBytes("Ryujinx.UI.Common.Resources.Icon_NRO.png"); - _nsoIcon = GetResourceBytes("Ryujinx.UI.Common.Resources.Icon_NSO.png"); - } - - private static byte[] GetResourceBytes(string resourceName) - { - Stream resourceStream = Assembly.GetCallingAssembly().GetManifestResourceStream(resourceName)!; - byte[] resourceByteArray = new byte[resourceStream.Length]; - - resourceStream.ReadExactly(resourceByteArray); - - return resourceByteArray; + _nspIcon = EmbeddedResources.Read("Ryujinx.Assets.UIImages.Icon_NSP.png"); + _xciIcon = EmbeddedResources.Read("Ryujinx.Assets.UIImages.Icon_XCI.png"); + _ncaIcon = EmbeddedResources.Read("Ryujinx.Assets.UIImages.Icon_NCA.png"); + _nroIcon = EmbeddedResources.Read("Ryujinx.Assets.UIImages.Icon_NRO.png"); + _nsoIcon = EmbeddedResources.Read("Ryujinx.Assets.UIImages.Icon_NSO.png"); } /// The npdm file doesn't contain valid data. diff --git a/src/Ryujinx.UI.Common/Resources/Controller_JoyConLeft.svg b/src/Ryujinx.UI.Common/Resources/Controller_JoyConLeft.svg deleted file mode 100644 index 03585e656..000000000 --- a/src/Ryujinx.UI.Common/Resources/Controller_JoyConLeft.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Ryujinx.UI.Common/Resources/Controller_JoyConPair.svg b/src/Ryujinx.UI.Common/Resources/Controller_JoyConPair.svg deleted file mode 100644 index c073c9c0c..000000000 --- a/src/Ryujinx.UI.Common/Resources/Controller_JoyConPair.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Ryujinx.UI.Common/Resources/Controller_JoyConRight.svg b/src/Ryujinx.UI.Common/Resources/Controller_JoyConRight.svg deleted file mode 100644 index f4f125148..000000000 --- a/src/Ryujinx.UI.Common/Resources/Controller_JoyConRight.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Ryujinx.UI.Common/Resources/Controller_ProCon.svg b/src/Ryujinx.UI.Common/Resources/Controller_ProCon.svg deleted file mode 100644 index f5380f3ad..000000000 --- a/src/Ryujinx.UI.Common/Resources/Controller_ProCon.svg +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A - - - - X - - - - Y - - - - B - - - - - - - - - - ZL - - - - - ZR - - - - R - - - - - L - - - diff --git a/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj b/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj index 1ee9a4aa0..9a487b55a 100644 --- a/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj +++ b/src/Ryujinx.UI.Common/Ryujinx.UI.Common.csproj @@ -21,25 +21,6 @@ - - - - - - - - - - - - - - - - - - - @@ -61,4 +42,8 @@ + + + + diff --git a/src/Ryujinx.UI.Common/Resources/Icon_Blank.png b/src/Ryujinx/Assets/UIImages/Icon_Blank.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Icon_Blank.png rename to src/Ryujinx/Assets/UIImages/Icon_Blank.png diff --git a/src/Ryujinx.UI.Common/Resources/Icon_NCA.png b/src/Ryujinx/Assets/UIImages/Icon_NCA.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Icon_NCA.png rename to src/Ryujinx/Assets/UIImages/Icon_NCA.png diff --git a/src/Ryujinx.UI.Common/Resources/Icon_NRO.png b/src/Ryujinx/Assets/UIImages/Icon_NRO.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Icon_NRO.png rename to src/Ryujinx/Assets/UIImages/Icon_NRO.png diff --git a/src/Ryujinx.UI.Common/Resources/Icon_NSO.png b/src/Ryujinx/Assets/UIImages/Icon_NSO.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Icon_NSO.png rename to src/Ryujinx/Assets/UIImages/Icon_NSO.png diff --git a/src/Ryujinx.UI.Common/Resources/Icon_NSP.png b/src/Ryujinx/Assets/UIImages/Icon_NSP.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Icon_NSP.png rename to src/Ryujinx/Assets/UIImages/Icon_NSP.png diff --git a/src/Ryujinx.UI.Common/Resources/Icon_XCI.png b/src/Ryujinx/Assets/UIImages/Icon_XCI.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Icon_XCI.png rename to src/Ryujinx/Assets/UIImages/Icon_XCI.png diff --git a/src/Ryujinx.UI.Common/Resources/Logo_Amiibo.png b/src/Ryujinx/Assets/UIImages/Logo_Amiibo.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Logo_Amiibo.png rename to src/Ryujinx/Assets/UIImages/Logo_Amiibo.png diff --git a/src/Ryujinx.UI.Common/Resources/Logo_Discord_Dark.png b/src/Ryujinx/Assets/UIImages/Logo_Discord_Dark.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Logo_Discord_Dark.png rename to src/Ryujinx/Assets/UIImages/Logo_Discord_Dark.png diff --git a/src/Ryujinx.UI.Common/Resources/Logo_Discord_Light.png b/src/Ryujinx/Assets/UIImages/Logo_Discord_Light.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Logo_Discord_Light.png rename to src/Ryujinx/Assets/UIImages/Logo_Discord_Light.png diff --git a/src/Ryujinx.UI.Common/Resources/Logo_GitHub_Dark.png b/src/Ryujinx/Assets/UIImages/Logo_GitHub_Dark.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Logo_GitHub_Dark.png rename to src/Ryujinx/Assets/UIImages/Logo_GitHub_Dark.png diff --git a/src/Ryujinx.UI.Common/Resources/Logo_GitHub_Light.png b/src/Ryujinx/Assets/UIImages/Logo_GitHub_Light.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Logo_GitHub_Light.png rename to src/Ryujinx/Assets/UIImages/Logo_GitHub_Light.png diff --git a/src/Ryujinx.UI.Common/Resources/Logo_Ryujinx.png b/src/Ryujinx/Assets/UIImages/Logo_Ryujinx.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Logo_Ryujinx.png rename to src/Ryujinx/Assets/UIImages/Logo_Ryujinx.png diff --git a/src/Ryujinx.UI.Common/Resources/Logo_Ryujinx_AntiAlias.png b/src/Ryujinx/Assets/UIImages/Logo_Ryujinx_AntiAlias.png similarity index 100% rename from src/Ryujinx.UI.Common/Resources/Logo_Ryujinx_AntiAlias.png rename to src/Ryujinx/Assets/UIImages/Logo_Ryujinx_AntiAlias.png diff --git a/src/Ryujinx.UI.Common/DiscordIntegrationModule.cs b/src/Ryujinx/DiscordIntegrationModule.cs similarity index 99% rename from src/Ryujinx.UI.Common/DiscordIntegrationModule.cs rename to src/Ryujinx/DiscordIntegrationModule.cs index efeeb2586..92c8e2aa6 100644 --- a/src/Ryujinx.UI.Common/DiscordIntegrationModule.cs +++ b/src/Ryujinx/DiscordIntegrationModule.cs @@ -8,7 +8,7 @@ using Ryujinx.UI.App.Common; using Ryujinx.UI.Common.Configuration; using System.Text; -namespace Ryujinx.UI.Common +namespace Ryujinx.Ava { public static class DiscordIntegrationModule { diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj index 5e5adf2a0..998257dff 100644 --- a/src/Ryujinx/Ryujinx.csproj +++ b/src/Ryujinx/Ryujinx.csproj @@ -134,15 +134,21 @@ + + + + + + + + + + + + - - - SettingsHacksView.axaml - Code - - \ No newline at end of file diff --git a/src/Ryujinx/UI/Applet/ErrorAppletWindow.axaml b/src/Ryujinx/UI/Applet/ErrorAppletWindow.axaml index c7aa56fb8..22c2851e1 100644 --- a/src/Ryujinx/UI/Applet/ErrorAppletWindow.axaml +++ b/src/Ryujinx/UI/Applet/ErrorAppletWindow.axaml @@ -25,7 +25,7 @@ Height="80" MinWidth="50" Margin="5,10,20,10" - Source="resm:Ryujinx.UI.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.UI.Common" /> + Source="resm:Ryujinx.Assets.UIImages.Logo_Ryujinx.png?assembly=Ryujinx" /> + Source="resm:Ryujinx.Assets.UIImages.Logo_Ryujinx.png?assembly=Ryujinx" /> + Source="resm:Ryujinx.Assets.UIImages.Logo_Ryujinx.png?assembly=Ryujinx" /> new(Avalonia.Platform.AssetLoader.Open(new Uri(uri))); diff --git a/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs index ab08ce385..468a7c269 100644 --- a/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/AmiiboWindowViewModel.cs @@ -68,7 +68,7 @@ namespace Ryujinx.Ava.UI.ViewModels _amiiboSeries = new ObservableCollection(); _amiibos = new AvaloniaList(); - _amiiboLogoBytes = EmbeddedResources.Read("Ryujinx.UI.Common/Resources/Logo_Amiibo.png"); + _amiiboLogoBytes = EmbeddedResources.Read("Ryujinx/Assets/UIImages/Logo_Amiibo.png"); _ = LoadContentAsync(); } diff --git a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs index 493e6659d..79daab701 100644 --- a/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/Input/InputViewModel.cs @@ -35,10 +35,10 @@ namespace Ryujinx.Ava.UI.ViewModels.Input public class InputViewModel : BaseModel, IDisposable { private const string Disabled = "disabled"; - private const string ProControllerResource = "Ryujinx.UI.Common/Resources/Controller_ProCon.svg"; - private const string JoyConPairResource = "Ryujinx.UI.Common/Resources/Controller_JoyConPair.svg"; - private const string JoyConLeftResource = "Ryujinx.UI.Common/Resources/Controller_JoyConLeft.svg"; - private const string JoyConRightResource = "Ryujinx.UI.Common/Resources/Controller_JoyConRight.svg"; + private const string ProControllerResource = "Ryujinx/Assets/Icons/Controller_ProCon.svg"; + private const string JoyConPairResource = "Ryujinx/Assets/Icons/Controller_JoyConPair.svg"; + private const string JoyConLeftResource = "Ryujinx/Assets/Icons/Controller_JoyConLeft.svg"; + private const string JoyConRightResource = "Ryujinx/Assets/Icons/Controller_JoyConRight.svg"; private const string KeyboardString = "keyboard"; private const string ControllerString = "controller"; private readonly MainWindow _mainWindow; diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 6e014fedc..c5f9f57ec 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -134,7 +134,7 @@ namespace Ryujinx.Ava.UI.ViewModels // For an example of this, download canary 1.2.95, then open the settings menu, and look at the icon in the top-left. // The border gets reduced to colored pixels in the 4 corners. public static readonly Bitmap IconBitmap = - new(Assembly.GetAssembly(typeof(ConfigurationState))!.GetManifestResourceStream("Ryujinx.UI.Common.Resources.Logo_Ryujinx_AntiAlias.png")!); + new(Assembly.GetAssembly(typeof(MainWindowViewModel))!.GetManifestResourceStream("Ryujinx.Assets.UIImages.Logo_Ryujinx_AntiAlias.png")!); public MainWindow Window { get; init; } diff --git a/src/Ryujinx/UI/Windows/AboutWindow.axaml b/src/Ryujinx/UI/Windows/AboutWindow.axaml index c5abb0241..1b00ad23c 100644 --- a/src/Ryujinx/UI/Windows/AboutWindow.axaml +++ b/src/Ryujinx/UI/Windows/AboutWindow.axaml @@ -38,7 +38,7 @@