mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
UI - Rename each OS assembly to Artemis 2
UI - Added auto-run UI - Added auto-update
This commit is contained in:
1 parent
20af5e9c21
commit
faf5302975
30 files changed
+1568
-192
No files matched your search
@@ -67,6 +67,7 @@
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=plugins_005Cprofiling/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=plugins_005Cscriptingproviders_005Cscripts/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=plugins_005Csettings/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=providers_005Cinterfaces/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=rgb_002Enet/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=services_005Ccolorquantizer/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=services_005Ccolorquantizer_005Cinterfaces/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using Artemis.Core.SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Providers;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a class that can provide one or more graphics <see cref="IManagedGraphicsContext" /> instances by name.
|
||||
/// </summary>
|
||||
public interface IGraphicsContextProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name of the graphics context.
|
||||
/// </summary>
|
||||
string GraphicsContextName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates an instance of the managed graphics context this provider provides.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// An instance of the resulting managed graphics context if successfully created; otherwise
|
||||
/// <see langword="null" />.
|
||||
/// </returns>
|
||||
IManagedGraphicsContext? GetGraphicsContext();
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using Artemis.Core.SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a class that can provide one or more graphics <see cref="IManagedGraphicsContext"/> instances by name.
|
||||
/// </summary>
|
||||
public interface IGraphicsContextProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a read only collection containing the names of all the graphics contexts supported by this provider.
|
||||
/// </summary>
|
||||
IReadOnlyCollection<string> GraphicsContextNames { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a managed graphics context by name.
|
||||
/// </summary>
|
||||
/// <param name="name">The name of the graphics context.</param>
|
||||
/// <returns>If found, an instance of the managed graphics context with the given <paramref name="name"/>; otherwise <see langword="null"/>.</returns>
|
||||
IManagedGraphicsContext? GetGraphicsContext(string name);
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Artemis.Core.DeviceProviders;
|
||||
using Artemis.Core.Providers;
|
||||
using Artemis.Core.Services.Models;
|
||||
using Artemis.Core.SkiaSharp;
|
||||
using Artemis.Storage.Entities.Surface;
|
||||
@@ -363,15 +364,15 @@ namespace Artemis.Core.Services
|
||||
return;
|
||||
}
|
||||
|
||||
IGraphicsContextProvider? provider = _kernel.TryGet<IGraphicsContextProvider>();
|
||||
if (provider == null)
|
||||
List<IGraphicsContextProvider> providers = _kernel.Get<List<IGraphicsContextProvider>>();
|
||||
if (!providers.Any())
|
||||
{
|
||||
_logger.Warning("No graphics context provider found, defaulting to software rendering");
|
||||
UpdateGraphicsContext(null);
|
||||
return;
|
||||
}
|
||||
|
||||
IManagedGraphicsContext? context = provider.GetGraphicsContext(_preferredGraphicsContext.Value);
|
||||
IManagedGraphicsContext? context = providers.FirstOrDefault(p => p.GraphicsContextName == _preferredGraphicsContext.Value)?.GetGraphicsContext();
|
||||
if (context == null)
|
||||
{
|
||||
_logger.Warning("No graphics context named '{Context}' found, defaulting to software rendering", _preferredGraphicsContext.Value);
|
||||
|
||||
Reference in new issue
Block a user