add dedicated stopAll()

should not change abi
This commit is contained in:
Green Sky
2025-04-11 20:46:50 +02:00
parent e25ee67e42
commit d03d2dae67
4 changed files with 27 additions and 9 deletions

View File

@@ -26,10 +26,7 @@ void g_provideInstance__internal(const char* id, const char* version, const char
} // extern C
PluginManager::~PluginManager(void) {
// destruct in reverse!
for (auto it = _plugins.rbegin(); it != _plugins.rend(); it++) {
it->stop();
}
stopAll();
}
bool PluginManager::add(const std::string& plug_path) {
@@ -48,6 +45,13 @@ bool PluginManager::add(const std::string& plug_path) {
return true;
}
void PluginManager::stopAll(void) {
// destruct in reverse!
for (auto it = _plugins.rbegin(); it != _plugins.rend(); it++) {
it->stop();
}
}
float PluginManager::tick(float delta) {
float min_interval {std::numeric_limits<float>::max()};