From f7361b26bf32f0b40d4db59aad35be3e6758f8b4 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 7 Dec 2019 15:24:46 +0200 Subject: [PATCH] Don't enable serial log input by default. --- od-win32/serial_win32.cpp | 4 ++-- od-win32/win32.cpp | 4 ++++ od-win32/writelog.cpp | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/od-win32/serial_win32.cpp b/od-win32/serial_win32.cpp index 20822e99..2a10eb65 100644 --- a/od-win32/serial_win32.cpp +++ b/od-win32/serial_win32.cpp @@ -483,7 +483,7 @@ static void serdatcopy(void) if (seriallog > 0 || (consoleopen && seriallog < 0)) { gotlogwrite = true; - if (seriallog_lf && seriallog > 1) { + if (seriallog_lf && seriallog > 2) { TCHAR *ts = write_log_get_ts(); if (ts) write_logx(_T("%s:"), ts); @@ -556,7 +556,7 @@ void serial_hsynchandler (void) serial_check_irq(); } } - if (seriallog > 0 && !data_in_serdatr && gotlogwrite) { + if (seriallog > 1 && !data_in_serdatr && gotlogwrite) { int ch = read_log(); if (ch > 0) { serdatr = ch | 0x100; diff --git a/od-win32/win32.cpp b/od-win32/win32.cpp index 0db5ee89..02616fb8 100644 --- a/od-win32/win32.cpp +++ b/od-win32/win32.cpp @@ -6394,6 +6394,10 @@ static int parseargs(const TCHAR *argx, const TCHAR *np, const TCHAR *np2) log_sercon = 2; return 1; } + if (!_tcscmp(arg, _T("serlog3"))) { + log_sercon = 3; + return 1; + } if (!_tcscmp(arg, _T("a2065log"))) { log_a2065 = 1; return 1; diff --git a/od-win32/writelog.cpp b/od-win32/writelog.cpp index 5f10f429..0ff3395e 100644 --- a/od-win32/writelog.cpp +++ b/od-win32/writelog.cpp @@ -68,7 +68,6 @@ int console_logging = 0; static int debugger_type = -1; extern BOOL debuggerinitializing; extern int lof_store; -extern int seriallog; static int console_input_linemode = -1; int always_flush_log = 0; -- 2.47.3