[Scummvm-git-logs] scummvm master -> e7fa1613861556bdae2195351a1189f0df6c1e8f
bluegr
noreply at scummvm.org
Wed Jun 21 05:27:07 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e7fa161386 AMIGAOS: Cleanup and free signals via atexit()
Commit: e7fa1613861556bdae2195351a1189f0df6c1e8f
https://github.com/scummvm/scummvm/commit/e7fa1613861556bdae2195351a1189f0df6c1e8f
Author: PushmePullyu (127053144+PushmePullyu at users.noreply.github.com)
Date: 2023-06-21T08:27:04+03:00
Commit Message:
AMIGAOS: Cleanup and free signals via atexit()
Fixes #6956 "ScummVM returned with unfreed signals (AmigaOS4)"
Changed paths:
backends/platform/sdl/amigaos/amigaos-main.cpp
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index 7a5dddf6772..71a63177113 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -28,6 +28,10 @@
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
+static void cleanup() {
+ g_system->destroy();
+}
+
int main(int argc, char *argv[]) {
// Update support (AmiUpdate):
@@ -63,6 +67,9 @@ int main(int argc, char *argv[]) {
g_system = new OSystem_AmigaOS();
assert(g_system);
+ // Register cleanup function to avoid unfreed signals
+ atexit(cleanup);
+
// Pre-initialize the backend.
g_system->init();
@@ -74,7 +81,8 @@ int main(int argc, char *argv[]) {
int res = scummvm_main(argc, argv);
// Free OSystem.
- g_system->destroy();
+ // This is now handled by cleanup() via atexit()
+ //g_system->destroy();
return res;
}
More information about the Scummvm-git-logs
mailing list