Move ResourceManagerInterface to its own file. Refactor Plugin interface

This commit is contained in:
morg
2025-01-07 18:12:41 +01:00
committed by Adam Honse
parent 5e08608c56
commit b3dfd3b4b0
6 changed files with 61 additions and 50 deletions

View File

@@ -12,6 +12,7 @@
#include "PluginManager.h"
#include "OpenRGBThemeManager.h"
#include "SettingsManager.h"
#include "ResourceManager.h"
#ifdef _WIN32
#include <Windows.h>
@@ -423,8 +424,6 @@ void PluginManager::LoadPlugin(OpenRGBPluginEntry* plugin_entry)
QObject* instance = plugin_entry->loader->instance();
bool dark_theme = OpenRGBThemeManager::IsDarkTheme();
if(instance)
{
OpenRGBPluginInterface* plugin = qobject_cast<OpenRGBPluginInterface*>(instance);
@@ -435,7 +434,7 @@ void PluginManager::LoadPlugin(OpenRGBPluginEntry* plugin_entry)
{
plugin_entry->plugin = plugin;
plugin->Load(dark_theme, ResourceManager::get());
plugin->Load(ResourceManager::get());
/*-------------------------------------------------*\
| Call the Add Plugin callback |