From 2adffb5a21a7189465e6bc8c734372ebaa54f14e Mon Sep 17 00:00:00 2001 From: Roman Boykov Date: Thu, 2 Apr 2026 14:32:17 +0300 Subject: [PATCH] Turn on logging to file --- okemu.log | 3 +++ src/main.go | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 okemu.log diff --git a/okemu.log b/okemu.log new file mode 100644 index 0000000..df5fd91 --- /dev/null +++ b/okemu.log @@ -0,0 +1,3 @@ +2026-04-02T14:27:10[I][zrcp.go:117]: Ready for debugger connections on localhost:10001 +2026-04-02T14:29:15[I][zrcp.go:117]: Ready for debugger connections on localhost:10001 +2026-04-02T14:30:16[I][zrcp.go:117]: Ready for debugger connections on localhost:10001 diff --git a/src/main.go b/src/main.go index a841d8d..d2230f4 100644 --- a/src/main.go +++ b/src/main.go @@ -55,7 +55,8 @@ func main() { conf := config.GetConfig() // Reconfigure logging by config values - // logger.ReconfigureLogging(conf) + logger.ReconfigureLogging(conf) + if runtime.GOOS == "windows" { cpuClkPeriod.Store(windowsCpuClkPeriod) timerClkPeriod.Store(windowsTimerClkPeriod) @@ -86,6 +87,7 @@ func main() { (*w).ShowAndRun() computer.AutoSaveFloppy() + logger.CloseLogs() } func screen(ctx context.Context, computer *okean240.ComputerType, raster *canvas.Raster, label *widget.Label) { @@ -158,8 +160,8 @@ func calcDelta(currentFreq float64, destFreq float64) int64 { delta := int64(math.Round(math.Abs(destFreq-currentFreq) * 100)) if delta < 1 { return 1 - } else if delta > 10 { - return 10 + } else if delta > 8 { + return 8 } return delta }