[Scummvm-git-logs] scummvm master -> 034ce1678e88bcb438dad5ed202974cb9524e07b
lephilousophe
lephilousophe at users.noreply.github.com
Sat May 15 10:53:00 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
610fdfade8 BASE: Unload plugins when exiting after processing arguments
66cf874a6a BASE: When replacing a duplicate plugin unload it first
034ce1678e AMIGAOS: Fix miniGL link when building with plugins
Commit: 610fdfade8106a7b4885ef2436adfcc9a8c9cde8
https://github.com/scummvm/scummvm/commit/610fdfade8106a7b4885ef2436adfcc9a8c9cde8
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-05-15T12:50:52+02:00
Commit Message:
BASE: Unload plugins when exiting after processing arguments
When not displaying the GUI, plugins are not unloaded.
This can cause problems on AmigaOS where plugins must be unloaded before
exiting. Else, some plugins with global destructors cause crashes being
destroyed too late.
Changed paths:
base/main.cpp
diff --git a/base/main.cpp b/base/main.cpp
index bc97df25e2..8130c1fe64 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -457,6 +457,11 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
if (Base::processSettings(command, settings, res)) {
if (res.getCode() != Common::kNoError)
warning("%s", res.getDesc().c_str());
+
+ PluginManager::instance().unloadDetectionPlugin();
+ PluginManager::instance().unloadAllPlugins();
+ PluginManager::destroy();
+
return res.getCode();
}
Commit: 66cf874a6a2fbdbd85fd358410fc4247d364aaaa
https://github.com/scummvm/scummvm/commit/66cf874a6a2fbdbd85fd358410fc4247d364aaaa
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-05-15T12:52:22+02:00
Commit Message:
BASE: When replacing a duplicate plugin unload it first
This avoids having plugins loaded twice for nothing and avoids crashes
on AmigaOS at exit.
Changed paths:
base/plugins.cpp
diff --git a/base/plugins.cpp b/base/plugins.cpp
index 37daf1e766..6226945ac5 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -640,6 +640,7 @@ void PluginManager::addToPluginsInMemList(Plugin *plugin) {
if (!strcmp(plugin->getName(), (*pl)->getName())) {
// Found a duplicated module. Replace the old one.
found = true;
+ (*pl)->unloadPlugin();
delete *pl;
*pl = plugin;
debug(1, "Replaced the duplicated plugin: '%s'", plugin->getName());
Commit: 034ce1678e88bcb438dad5ed202974cb9524e07b
https://github.com/scummvm/scummvm/commit/034ce1678e88bcb438dad5ed202974cb9524e07b
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-05-15T12:52:22+02:00
Commit Message:
AMIGAOS: Fix miniGL link when building with plugins
On AmigaOS miniGL is a static library and linking against it in plugins
prevents to have a shared context. By linking only in main executable,
this forces plugins to use the only context available in scummvm binary.
Changed paths:
configure
diff --git a/configure b/configure
index d9afdcc180..2836dc78b9 100755
--- a/configure
+++ b/configure
@@ -5468,6 +5468,19 @@ define_in_config_if_yes "$_opengl_game_classic" "USE_OPENGL_GAME"
define_in_config_if_yes "$_opengl_game_shaders" "USE_OPENGL_SHADERS"
define_in_config_if_yes "$_opengl_game_es2" "USE_GLES2"
+if test "$_dynamic_modules" = yes ; then
+ case $_host_os in
+ amigaos*)
+ # miniGL on AmigaOS is a static library so don't link with it in plugins
+ # instead link against it and include all symbols
+ append_var LIBS "-Wl,-whole-archive $LIBS_3D -Wl,-no-whole-archive"
+ LIBS_3D=
+ ;;
+ *)
+ ;;
+ esac
+fi
+
# If we have OpenGL libraries, then add them to plugins
# so they could link
if test -n "$LIBS_3D" ; then
More information about the Scummvm-git-logs
mailing list