diff options
Diffstat (limited to 'Ryujinx.HLE')
| -rw-r--r-- | Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs | 12 | ||||
| -rw-r--r-- | Ryujinx.HLE/Switch.cs | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs index b059200d..6c0955ec 100644 --- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs +++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs @@ -11,6 +11,7 @@ using System.Numerics; using System.Reflection; using System.Runtime.InteropServices; using SixLabors.ImageSharp.PixelFormats; +using Ryujinx.Common; namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard { @@ -65,10 +66,10 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard public SoftwareKeyboardRendererBase(IHostUiTheme uiTheme) { - string ryujinxLogoPath = "Ryujinx.Ui.Resources.Logo_Ryujinx.png"; - int ryujinxLogoSize = 32; + int ryujinxLogoSize = 32; - _ryujinxLogo = LoadResource(Assembly.GetEntryAssembly(), ryujinxLogoPath, ryujinxLogoSize, ryujinxLogoSize); + Stream logoStream = EmbeddedResources.GetStream("Ryujinx.Ui.Common/Resources/Logo_Ryujinx.png"); + _ryujinxLogo = LoadResource(logoStream, ryujinxLogoSize, ryujinxLogoSize); string padAcceptIconPath = "Ryujinx.HLE.HOS.Applets.SoftwareKeyboard.Resources.Icon_BtnA.png"; string padCancelIconPath = "Ryujinx.HLE.HOS.Applets.SoftwareKeyboard.Resources.Icon_BtnB.png"; @@ -158,6 +159,11 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard { Stream resourceStream = assembly.GetManifestResourceStream(resourcePath); + return LoadResource(resourceStream, newWidth, newHeight); + } + + private Image LoadResource(Stream resourceStream, int newWidth, int newHeight) + { Debug.Assert(resourceStream != null); var image = Image.Load(resourceStream); diff --git a/Ryujinx.HLE/Switch.cs b/Ryujinx.HLE/Switch.cs index 67559f45..8ea595e8 100644 --- a/Ryujinx.HLE/Switch.cs +++ b/Ryujinx.HLE/Switch.cs @@ -28,6 +28,8 @@ namespace Ryujinx.HLE public bool EnableDeviceVsync { get; set; } = true; + public bool IsFrameAvailable => Gpu.Window.IsFrameAvailable; + public Switch(HLEConfiguration configuration) { if (configuration.GpuRenderer == null) @@ -115,7 +117,7 @@ namespace Ryujinx.HLE return Gpu.Window.ConsumeFrameAvailable(); } - public void PresentFrame(Action swapBuffersCallback) + public void PresentFrame(Action<object> swapBuffersCallback) { Gpu.Window.Present(swapBuffersCallback); } |
