OSDN Git Service

Changed so that font changes on the main window while playing do a better job of...
authorEric Branlund <ebranlund@fastmail.com>
Mon, 27 Jan 2020 15:37:40 +0000 (07:37 -0800)
committerEric Branlund <ebranlund@fastmail.com>
Mon, 27 Jan 2020 15:37:40 +0000 (07:37 -0800)
src/main-cocoa.m

index e04975c..aa67e01 100644 (file)
@@ -1112,9 +1112,6 @@ static int compare_advances(const void *ap, const void *bp)
 
     /* Update our image */
     [self updateImage];
-    
-    /* Get redrawn */
-    [self requestRedraw];
 }
 
 - (id)init
@@ -3989,6 +3986,14 @@ static void hook_quit(const char * str)
     [(id)angbandContext setSelectionFont:newFont adjustTerminal: YES];
     
     NSEnableScreenUpdates();
+
+    if (mainTerm == 0 && game_in_progress) {
+       /* Mimics the logic in setGraphicsMode(). */
+       do_cmd_redraw();
+       wakeup_event_loop();
+    } else {
+       [(id)angbandContext requestRedraw];
+    }
 }
 
 - (IBAction)openGame:sender