diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -126,14 +126,13 @@ A: You can find it by opening up "About ## Advanced Settings -The settings file has several advanced options that are not available in the interface. Some of these are for debugging, while others are useful for improving the speed of finding the pigment lab interface. The settings file is found in AppData\Local\DesertPaintLab\settings on Windows, and in ~/.local/share/DesertPaintLab/settings on macOS. +The settings file has several advanced options that are not available in the interface. Some of these are for debugging, while others are useful for improving the speed of finding the pigment lab interface. The settings file is found in AppData\Local\DesertPaintCodex\settings on Windows, and in ~/.local/share/DesertPaintCodex/settings on macOS. * _scanarea.min.x_ sets the starting horizontal offset when searching for the pigment lab. This is useful in multi-screen setups to skip any leftmost displays. For example, a dual-screen setup with two side-by-side 3840x2160 displays where the game runs on the right screen would set this to 3840 to bypass scanning the left display. * _scanarea.min.y_ Like scanarea.min.x, but skips the upper section of display * _scanarea.max.x_ defines the rightmost edge of the area to scan * _scanarea.max.y_ defines the bottom edge of the area to scan -* _enabledebugmenu_ enables debug tool menu to help track down problems. This also causes DPL to write debug log files during scanning and recipe generation. This can slow down scanning and recipe searching. -* _debugscreenshot_ automatically saves out a screenshot when searching for the pigment lab to help in debugging +* _debug.screenshot_ automatically saves out a screenshot when searching for the pigment lab to help in debugging * _logging.verbosity_ sets the verbosity of the logging between 0 and 3. The higher the value, the more detail is included in the log file. ## For Developers diff --git a/Services/ReactionScannerService.cs b/Services/ReactionScannerService.cs --- a/Services/ReactionScannerService.cs +++ b/Services/ReactionScannerService.cs @@ -396,8 +396,15 @@ namespace DesertPaintCodex.Services Debug.WriteLine("Scan starting at [" + _screenX + ", " + _screenY + "]"); g.CopyFromScreen(_screenX, _screenY, 0, 0, _targetBitmap.Size, CopyPixelOperation.SourceCopy); } - - // _targetBitmap.Save(Path.Combine(ProfileManager.CurrentProfile?.Directory ?? "", "screenshot.png"), ImageFormat.Png); + + SettingsService.Get("Log.Verbosity", out var verbosityIdx, 1); + _logVerbosity = (LogVerbosity)verbosityIdx; + + SettingsService.Get("Debug.Screenshot", out bool debugScreenshot, false); + if (debugScreenshot) + { + _targetBitmap.Save(Path.Combine(ProfileManager.CurrentProfile?.Directory ?? "", "screenshot.png"), ImageFormat.Png); + } Pixels pixels = new(_targetBitmap, _pixelMultiplier); @@ -415,9 +422,6 @@ namespace DesertPaintCodex.Services _firstRun = true; } - SettingsService.Get("Log.Verbosity", out var verbosityIdx, 1); - _logVerbosity = (LogVerbosity)verbosityIdx; - int patchTestSize = ((_swatchHeight - _swatchTopBorder - _swatchBottomBorder) / 2) - 1; SettingsService.Get("ScanArea.Min.X", out var startX, 0);