misc: Remove RendererHost AXAML

This commit is contained in:
Evan Husted 2025-01-01 01:12:00 -06:00
parent 37c165e9fc
commit fd2b5a7fc1
2 changed files with 6 additions and 19 deletions

View file

@ -1,12 +0,0 @@
<UserControl
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignWidth="800"
d:DesignHeight="450"
x:Class="Ryujinx.Ava.UI.Renderer.RendererHost"
FlowDirection="LeftToRight"
Focusable="True">
</UserControl>

View file

@ -1,16 +1,15 @@
using Avalonia; using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
using Gommon; using Avalonia.Media;
using Ryujinx.Ava.Utilities.Configuration; using Ryujinx.Ava.Utilities.Configuration;
using Ryujinx.Common; using Ryujinx.Common;
using Ryujinx.Common.Configuration; using Ryujinx.Common.Configuration;
using Ryujinx.Common.Logging; using Ryujinx.Common.Logging;
using System; using System;
using System.Runtime.InteropServices;
namespace Ryujinx.Ava.UI.Renderer namespace Ryujinx.Ava.UI.Renderer
{ {
public partial class RendererHost : UserControl, IDisposable public class RendererHost : UserControl, IDisposable
{ {
public readonly EmbeddedWindow EmbeddedWindow; public readonly EmbeddedWindow EmbeddedWindow;
@ -19,7 +18,8 @@ namespace Ryujinx.Ava.UI.Renderer
public RendererHost() public RendererHost()
{ {
InitializeComponent(); Focusable = true;
FlowDirection = FlowDirection.LeftToRight;
EmbeddedWindow = ConfigurationState.Instance.Graphics.GraphicsBackend.Value switch EmbeddedWindow = ConfigurationState.Instance.Graphics.GraphicsBackend.Value switch
{ {
@ -43,8 +43,6 @@ namespace Ryujinx.Ava.UI.Renderer
public RendererHost(string titleId) public RendererHost(string titleId)
{ {
InitializeComponent();
switch (TitleIDs.SelectGraphicsBackend(titleId, ConfigurationState.Instance.Graphics.GraphicsBackend)) switch (TitleIDs.SelectGraphicsBackend(titleId, ConfigurationState.Instance.Graphics.GraphicsBackend))
{ {
case GraphicsBackend.OpenGl: case GraphicsBackend.OpenGl:
@ -109,3 +107,4 @@ namespace Ryujinx.Ava.UI.Renderer
} }
} }
} }