diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-10 20:59:47 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-10 20:59:47 -0500 |
| commit | be2456e815e078e54131b53afc3f11eb3ec7e4cc (patch) | |
| tree | e5ca763cc6d16f928c145d43458a4918807e85e4 /src/plugincontainer.cpp | |
| parent | 849a8bd6b92d5dfb080d2218a0c5532f13fb25e5 (diff) | |
detectGame() must be called before init()
Diffstat (limited to 'src/plugincontainer.cpp')
| -rw-r--r-- | src/plugincontainer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugincontainer.cpp b/src/plugincontainer.cpp index dd4ccbb1..5992f28d 100644 --- a/src/plugincontainer.cpp +++ b/src/plugincontainer.cpp @@ -265,9 +265,13 @@ bool PluginContainer::registerPlugin(QObject *plugin, const QString &fileName) }
{ // game plugin
IPluginGame *game = qobject_cast<IPluginGame*>(plugin);
+
+ if (game) {
+ game->detectGame();
+ }
+
if (initPlugin(game)) {
bf::at_key<IPluginGame>(m_Plugins).push_back(game);
- game->detectGame();
registerGame(game);
return true;
}
|
