Compare commits
4 Commits
Canary-1.2
...
Canary-1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d7350fc6e | ||
|
|
b05eab21a2 | ||
|
|
ff667a5c84 | ||
|
|
2f540dc88c |
@@ -838,6 +838,7 @@ namespace Ryujinx.Graphics.Gpu.Shader
|
|||||||
TargetApi.OpenGL => TargetLanguage.Glsl,
|
TargetApi.OpenGL => TargetLanguage.Glsl,
|
||||||
TargetApi.Vulkan => GraphicsConfig.EnableSpirvCompilationOnVulkan ? TargetLanguage.Spirv : TargetLanguage.Glsl,
|
TargetApi.Vulkan => GraphicsConfig.EnableSpirvCompilationOnVulkan ? TargetLanguage.Spirv : TargetLanguage.Glsl,
|
||||||
TargetApi.Metal => TargetLanguage.Msl,
|
TargetApi.Metal => TargetLanguage.Msl,
|
||||||
|
_ => throw new NotImplementedException()
|
||||||
};
|
};
|
||||||
|
|
||||||
return new TranslationOptions(lang, api, flags);
|
return new TranslationOptions(lang, api, flags);
|
||||||
|
|||||||
@@ -1767,6 +1767,7 @@ namespace Ryujinx.Graphics.Metal
|
|||||||
Constants.StorageBuffersSetIndex => Constants.StorageBuffersIndex,
|
Constants.StorageBuffersSetIndex => Constants.StorageBuffersIndex,
|
||||||
Constants.TexturesSetIndex => Constants.TexturesIndex,
|
Constants.TexturesSetIndex => Constants.TexturesIndex,
|
||||||
Constants.ImagesSetIndex => Constants.ImagesIndex,
|
Constants.ImagesSetIndex => Constants.ImagesIndex,
|
||||||
|
_ => throw new NotImplementedException()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,12 @@ namespace Ryujinx.Graphics.Metal
|
|||||||
private Pipeline _pipeline;
|
private Pipeline _pipeline;
|
||||||
private Window _window;
|
private Window _window;
|
||||||
|
|
||||||
public uint ProgramCount { get; set; } = 0;
|
public uint ProgramCount { get; set; }
|
||||||
|
|
||||||
|
#pragma warning disable CS0067 // The event is never used
|
||||||
public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
|
public event EventHandler<ScreenCaptureImageInfo> ScreenCaptured;
|
||||||
|
#pragma warning restore CS0067
|
||||||
|
|
||||||
public bool PreferThreading => true;
|
public bool PreferThreading => true;
|
||||||
public IPipeline Pipeline => _pipeline;
|
public IPipeline Pipeline => _pipeline;
|
||||||
public IWindow Window => _window;
|
public IWindow Window => _window;
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
|||||||
Instruction.Add => "PreciseFAdd",
|
Instruction.Add => "PreciseFAdd",
|
||||||
Instruction.Subtract => "PreciseFSub",
|
Instruction.Subtract => "PreciseFSub",
|
||||||
Instruction.Multiply => "PreciseFMul",
|
Instruction.Multiply => "PreciseFMul",
|
||||||
|
_ => throw new NotImplementedException()
|
||||||
};
|
};
|
||||||
|
|
||||||
return $"{func}({expr[0]}, {expr[1]})";
|
return $"{func}({expr[0]}, {expr[1]})";
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ namespace Ryujinx.Ava
|
|||||||
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>()
|
||||||
.MainWindow.Cast<MainWindow>();
|
.MainWindow.Cast<MainWindow>();
|
||||||
|
|
||||||
|
public static IClassicDesktopStyleApplicationLifetime DesktopLifetime => Current!
|
||||||
|
.ApplicationLifetime.Cast<IClassicDesktopStyleApplicationLifetime>();
|
||||||
|
|
||||||
public static void SetTaskbarProgress(TaskBarProgressBarState state) => MainWindow.PlatformFeatures.SetTaskBarProgressBarState(state);
|
public static void SetTaskbarProgress(TaskBarProgressBarState state) => MainWindow.PlatformFeatures.SetTaskBarProgressBarState(state);
|
||||||
public static void SetTaskbarProgressValue(ulong current, ulong total) => MainWindow.PlatformFeatures.SetTaskBarProgressBarValue(current, total);
|
public static void SetTaskbarProgressValue(ulong current, ulong total) => MainWindow.PlatformFeatures.SetTaskBarProgressBarValue(current, total);
|
||||||
public static void SetTaskbarProgressValue(long current, long total) => SetTaskbarProgressValue(Convert.ToUInt64(current), Convert.ToUInt64(total));
|
public static void SetTaskbarProgressValue(long current, long total) => SetTaskbarProgressValue(Convert.ToUInt64(current), Convert.ToUInt64(total));
|
||||||
|
|||||||
@@ -917,7 +917,7 @@ namespace Ryujinx.Ava
|
|||||||
|
|
||||||
if (ShouldInitMetal)
|
if (ShouldInitMetal)
|
||||||
{
|
{
|
||||||
#pragma warning disable CA1416 This call site is reachable on all platforms
|
#pragma warning disable CA1416 // This call site is reachable on all platforms
|
||||||
// The condition does a check for Mac, on top of checking if it's an ARM Mac. This isn't a problem.
|
// The condition does a check for Mac, on top of checking if it's an ARM Mac. This isn't a problem.
|
||||||
renderer = new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal)!.CreateSurface);
|
renderer = new MetalRenderer((RendererHost.EmbeddedWindow as EmbeddedWindowMetal)!.CreateSurface);
|
||||||
#pragma warning restore CA1416
|
#pragma warning restore CA1416
|
||||||
|
|||||||
@@ -101,11 +101,21 @@
|
|||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Orientation="Vertical"
|
Orientation="Vertical"
|
||||||
Spacing="5">
|
Spacing="5">
|
||||||
<TextBlock
|
<Button
|
||||||
HorizontalAlignment="Stretch"
|
Click="IdString_OnClick"
|
||||||
Text="{Binding IdString}"
|
HorizontalContentAlignment="Left"
|
||||||
TextAlignment="Start"
|
VerticalAlignment="Center"
|
||||||
TextWrapping="Wrap" />
|
Background="{DynamicResource AppListBackgroundColor}"
|
||||||
|
Margin="-1, 0, 0, 0"
|
||||||
|
Padding="0" >
|
||||||
|
<TextBlock
|
||||||
|
Margin="1.5"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
Text="{Binding IdString}"
|
||||||
|
Tag="{Binding Id}"
|
||||||
|
TextAlignment="Start"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Button>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Text="{Binding FileExtension}"
|
Text="{Binding FileExtension}"
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Notifications;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
|
using FluentAvalonia.UI.Controls;
|
||||||
using Ryujinx.Ava.UI.Helpers;
|
using Ryujinx.Ava.UI.Helpers;
|
||||||
using Ryujinx.Ava.UI.ViewModels;
|
using Ryujinx.Ava.UI.ViewModels;
|
||||||
using Ryujinx.UI.App.Common;
|
using Ryujinx.UI.App.Common;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Ryujinx.Ava.UI.Controls
|
namespace Ryujinx.Ava.UI.Controls
|
||||||
{
|
{
|
||||||
@@ -32,5 +35,25 @@ namespace Ryujinx.Ava.UI.Controls
|
|||||||
if (DataContext is MainWindowViewModel viewModel && sender is ListBox { SelectedItem: ApplicationData selected })
|
if (DataContext is MainWindowViewModel viewModel && sender is ListBox { SelectedItem: ApplicationData selected })
|
||||||
viewModel.ListSelectedApplication = selected;
|
viewModel.ListSelectedApplication = selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void IdString_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (DataContext is not MainWindowViewModel mwvm)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (sender is not Button { Content: TextBlock idText })
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (App.MainWindow.Clipboard is { } clipboard)
|
||||||
|
{
|
||||||
|
var appData = mwvm.Applications.FirstOrDefault(it => it.IdString == idText.Text);
|
||||||
|
if (appData is null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
await clipboard.SetTextAsync(appData.IdString);
|
||||||
|
|
||||||
|
NotificationHelper.Show("Copied Title ID", $"{appData.Name} ({appData.IdString})", NotificationType.Information);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,11 +62,6 @@ namespace Ryujinx.Ava.UI.Renderer
|
|||||||
KnownGreatMetalTitles.ContainsIgnoreCase(titleId)
|
KnownGreatMetalTitles.ContainsIgnoreCase(titleId)
|
||||||
? new EmbeddedWindowMetal()
|
? new EmbeddedWindowMetal()
|
||||||
: new EmbeddedWindowVulkan();
|
: new EmbeddedWindowVulkan();
|
||||||
|
|
||||||
string backendText = EmbeddedWindow is EmbeddedWindowVulkan ? "Vulkan" : "Metal";
|
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.Gpu, $"Auto: Using {backendText}");
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case GraphicsBackend.OpenGl:
|
case GraphicsBackend.OpenGl:
|
||||||
EmbeddedWindow = new EmbeddedWindowOpenGL();
|
EmbeddedWindow = new EmbeddedWindowOpenGL();
|
||||||
@@ -79,6 +74,16 @@ namespace Ryujinx.Ava.UI.Renderer
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string backendText = EmbeddedWindow switch
|
||||||
|
{
|
||||||
|
EmbeddedWindowVulkan => "Vulkan",
|
||||||
|
EmbeddedWindowOpenGL => "OpenGL",
|
||||||
|
EmbeddedWindowMetal => "Metal",
|
||||||
|
_ => throw new NotImplementedException()
|
||||||
|
};
|
||||||
|
|
||||||
|
Logger.Info?.PrintMsg(LogClass.Gpu, $"Backend ({ConfigurationState.Instance.Graphics.GraphicsBackend.Value}): {backendText}");
|
||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ namespace Ryujinx.Ava.UI.Windows
|
|||||||
StatusBarHeight = StatusBarView.StatusBar.MinHeight;
|
StatusBarHeight = StatusBarView.StatusBar.MinHeight;
|
||||||
MenuBarHeight = MenuBar.MinHeight;
|
MenuBarHeight = MenuBar.MinHeight;
|
||||||
|
|
||||||
|
ApplicationList.DataContext = DataContext;
|
||||||
|
ApplicationGrid.DataContext = DataContext;
|
||||||
|
|
||||||
SetWindowSizePosition();
|
SetWindowSizePosition();
|
||||||
|
|
||||||
if (Program.PreviewerDetached)
|
if (Program.PreviewerDetached)
|
||||||
|
|||||||
Reference in New Issue
Block a user