mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-03 00:27:12 +02:00
UI - Scale end framebuffer blit (#3342)
* Scale end framebuffer blit * fix * fix * apply changes to avalonia
This commit is contained in:
parent
806aebc2c2
commit
34e982f088
5 changed files with 18 additions and 20 deletions
|
@ -177,7 +177,7 @@ namespace Ryujinx.Ava
|
|||
{
|
||||
if (_renderer != null)
|
||||
{
|
||||
double scale = Program.WindowScaleFactor;
|
||||
double scale = _parent.PlatformImpl.RenderScaling;
|
||||
_renderer.Window.SetSize((int)(size.Width * scale), (int)(size.Height * scale));
|
||||
}
|
||||
}
|
||||
|
@ -809,7 +809,7 @@ namespace Ryujinx.Ava
|
|||
Width = (int)Renderer.Bounds.Width;
|
||||
Height = (int)Renderer.Bounds.Height;
|
||||
|
||||
_renderer.Window.SetSize((int)(Width * Program.WindowScaleFactor), (int)(Height * Program.WindowScaleFactor));
|
||||
_renderer.Window.SetSize((int)(Width * _parent.PlatformImpl.RenderScaling), (int)(Height * _parent.PlatformImpl.RenderScaling));
|
||||
|
||||
Device.Gpu.Renderer.RunLoop(() =>
|
||||
{
|
||||
|
|
|
@ -73,10 +73,13 @@ namespace Ryujinx.Ava.Ui.Controls
|
|||
{
|
||||
SizeChanged?.Invoke(this, rect.Size);
|
||||
|
||||
RenderSize = rect.Size * Program.WindowScaleFactor;
|
||||
if (!rect.IsEmpty)
|
||||
{
|
||||
RenderSize = rect.Size * VisualRoot.RenderScaling;
|
||||
|
||||
_glDrawOperation?.Dispose();
|
||||
_glDrawOperation = new GlDrawOperation(this);
|
||||
_glDrawOperation?.Dispose();
|
||||
_glDrawOperation = new GlDrawOperation(this);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Render(DrawingContext context)
|
||||
|
|
|
@ -123,10 +123,6 @@ namespace Ryujinx.Ava.Ui.Windows
|
|||
CheckLaunchState();
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsLinux())
|
||||
{
|
||||
Program.WindowScaleFactor = this.PlatformImpl.RenderScaling;
|
||||
}
|
||||
_rendererWaitEvent = new AutoResetEvent(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue