fixed minimap mode switching

This commit is contained in:
Boki 2026-02-15 10:51:15 -05:00
parent 3e49a96caa
commit d7948fd4a7
2 changed files with 29 additions and 7 deletions

View file

@ -37,8 +37,9 @@ public class MinimapCapture : IFrameConsumer, IDisposable
var detected = DetectMinimapMode(screen);
if (detected != _detectedMode)
{
var oldMode = _detectedMode;
_detectedMode = detected;
Log.Information("Minimap mode switched to {Mode}", _detectedMode);
Log.Information("MODE SWITCH: {Old} → {New}", oldMode, _detectedMode);
ResetAdaptation();
ModeChanged?.Invoke(_detectedMode);
}
@ -55,6 +56,11 @@ public class MinimapCapture : IFrameConsumer, IDisposable
var frame = ProcessBgr(bgr);
if (frame == null) return;
Log.Debug("Process: mode={Mode} cropSize={W}x{H} classifiedSize={CW}x{CH} wallSize={WW}x{WH}",
_detectedMode, bgr.Width, bgr.Height,
frame.ClassifiedMat.Width, frame.ClassifiedMat.Height,
frame.WallMask.Width, frame.WallMask.Height);
var old = Interlocked.Exchange(ref _lastFrame, frame);
old?.Dispose();
}