OSDN Git Service

Changed to do additional cleanup in hook_quit: nuke the terminals and set to nil...
authorEric Branlund <ebranlund@fastmail.com>
Wed, 26 Feb 2020 08:51:54 +0000 (00:51 -0800)
committerEric Branlund <ebranlund@fastmail.com>
Wed, 26 Feb 2020 08:51:54 +0000 (00:51 -0800)
src/main-cocoa.m

index da66f78..0200372 100644 (file)
@@ -3899,6 +3899,13 @@ static void hook_plog(const char * str)
  */
 static void hook_quit(const char * str)
 {
+    for (int i = ANGBAND_TERM_MAX - 1; i >= 0; --i) {
+       if (angband_term[i]) {
+           term_nuke(angband_term[i]);
+       }
+    }
+    [AngbandSoundCatalog clearSharedSounds];
+    [AngbandContext setDefaultFont:nil];
     plog(str);
     exit(0);
 }