mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-01 10:13:30 +00:00
Plugins - Check main entry DLL casing to avoid weird namespace issues
Editor - Removed limit on zooming with mouseswheel, closes #528
This commit is contained in:
parent
45bf7e7c82
commit
25dcb16964
@ -270,6 +270,9 @@ namespace Artemis.Core.Services
|
|||||||
string? mainFile = plugin.ResolveRelativePath(plugin.Info.Main);
|
string? mainFile = plugin.ResolveRelativePath(plugin.Info.Main);
|
||||||
if (!File.Exists(mainFile))
|
if (!File.Exists(mainFile))
|
||||||
throw new ArtemisPluginException(plugin, "Couldn't find the plugins main entry at " + mainFile);
|
throw new ArtemisPluginException(plugin, "Couldn't find the plugins main entry at " + mainFile);
|
||||||
|
FileInfo[] fileInfos = directory.GetFiles();
|
||||||
|
if (!fileInfos.Any(f => string.Equals(f.Name, plugin.Info.Main, StringComparison.InvariantCulture)))
|
||||||
|
throw new ArtemisPluginException(plugin, "Plugin main entry casing mismatch at " + plugin.Info.Main);
|
||||||
|
|
||||||
// Load the plugin, all types implementing Plugin and register them with DI
|
// Load the plugin, all types implementing Plugin and register them with DI
|
||||||
plugin.PluginLoader = PluginLoader.CreateFromAssemblyFile(mainFile!, configure =>
|
plugin.PluginLoader = PluginLoader.CreateFromAssemblyFile(mainFile!, configure =>
|
||||||
|
|||||||
@ -94,7 +94,7 @@ namespace Artemis.UI.Screens.Shared
|
|||||||
Zoom *= 0.9;
|
Zoom *= 0.9;
|
||||||
|
|
||||||
// Limit to a min of 0.1 and a max of 2.5 (10% - 250% in the view)
|
// Limit to a min of 0.1 and a max of 2.5 (10% - 250% in the view)
|
||||||
Zoom = Math.Max(0.1, Math.Min(2.5, Zoom));
|
Zoom = Math.Max(0.1, Zoom);
|
||||||
|
|
||||||
// Update the PanX/Y to enable zooming relative to cursor
|
// Update the PanX/Y to enable zooming relative to cursor
|
||||||
if (LimitToZero)
|
if (LimitToZero)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user