mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +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,7 +270,10 @@ namespace Artemis.Core.Services
|
||||
string? mainFile = plugin.ResolveRelativePath(plugin.Info.Main);
|
||||
if (!File.Exists(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
|
||||
plugin.PluginLoader = PluginLoader.CreateFromAssemblyFile(mainFile!, configure =>
|
||||
{
|
||||
|
||||
@ -94,7 +94,7 @@ namespace Artemis.UI.Screens.Shared
|
||||
Zoom *= 0.9;
|
||||
|
||||
// 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
|
||||
if (LimitToZero)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user