]> granicus.if.org Git - nethack/commitdiff
Qt4: Save message history to dumplog
authorPasi Kallinen <paxed@alt.org>
Tue, 10 Oct 2017 22:06:07 +0000 (01:06 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 10 Oct 2017 22:06:07 +0000 (01:06 +0300)
win/Qt4/qt4bind.cpp

index 0adc0234644ae56d968b2d02ae23978bcbe510a8..dee38e8c33c76654f09dda9e71053e494a603871 100644 (file)
@@ -641,11 +641,18 @@ void NetHackQtBind::qt_putmsghistory(const char *msg, BOOLEAN_P is_restoring)
     if (msg) {
         //raw_printf("msg='%s'", msg);
         window->PutStr(ATR_NONE, QString::fromLatin1(msg));
+#ifdef DUMPLOG
+        dumplogmsg(msg);
+#endif
     } else if (msgs_saved) {
         /* restore strings */
         int i;
-        for (i = 0; i < msgs_strings->size(); i++)
+        for (i = 0; i < msgs_strings->size(); i++) {
             window->PutStr(ATR_NONE, msgs_strings->at((i)));
+#ifdef DUMPLOG
+            dumplogmsg(msgs_strings->at(i).toLatin1().constData());
+#endif
+        }
         delete msgs_strings;
         msgs_initd = false;
     }