diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-25 19:53:21 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-05-25 19:54:15 +0200 |
| commit | cf1bbdd13e0db8856df672c367d3ec1610f6c556 (patch) | |
| tree | 461a6b7623a186502f00b07df689ffebfea620b0 /src/organizercore.cpp | |
| parent | a721347fd130fcab19f2709892093f087bfac19e (diff) | |
Switch to using the ModDataContent feature from the game plugin.
Diffstat (limited to 'src/organizercore.cpp')
| -rw-r--r-- | src/organizercore.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 6e4b3fbf..45fe5220 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -135,6 +135,16 @@ OrganizerCore::OrganizerCore(Settings &settings) connect(this, SIGNAL(managedGameChanged(MOBase::IPluginGame const *)), &m_PluginList, SLOT(managedGameChanged(MOBase::IPluginGame const *))); + connect(this, &OrganizerCore::managedGameChanged, [this](IPluginGame const* gamePlugin) { + ModDataContent* contentFeature = gamePlugin->feature<ModDataContent>(); + if (contentFeature) { + m_Contents = contentFeature->getAllContents(); + } + else { + m_Contents = {}; + } + }); + connect(&m_PluginList, &PluginList::writePluginsList, &m_PluginListsWriter, &DelayedFileWriterBase::write); |
