From 3da60d682e032b33eee6d486dc116b529ab004bd Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Thu, 9 May 2024 12:40:50 +0200 Subject: [PATCH] More debug (3) --- src/NetVips/VipsProgress.cs | 2 +- tests/NetVips.Tests/IoFuncsTests.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/NetVips/VipsProgress.cs b/src/NetVips/VipsProgress.cs index 3adc432..b0b4a53 100644 --- a/src/NetVips/VipsProgress.cs +++ b/src/NetVips/VipsProgress.cs @@ -22,7 +22,7 @@ public struct GTimer /// /// Is the timer currently active? /// - [MarshalAs(UnmanagedType.Bool)] + [MarshalAs(UnmanagedType.I1)] public bool Active; } diff --git a/tests/NetVips.Tests/IoFuncsTests.cs b/tests/NetVips.Tests/IoFuncsTests.cs index 6222a4d..e4d83c8 100644 --- a/tests/NetVips.Tests/IoFuncsTests.cs +++ b/tests/NetVips.Tests/IoFuncsTests.cs @@ -245,10 +245,13 @@ void EvalCallback(Image image, VipsProgress progressStruct) _testOutputHelper.WriteLine($" tpels = {progressStruct.TPels} (total number of pels)"); _testOutputHelper.WriteLine($" npels = {progressStruct.NPels} (number of pels computed so far)"); _testOutputHelper.WriteLine($" percent = {progressStruct.Percent} (percent complete)"); + _testOutputHelper.WriteLine($" active = {progressStruct.Start.Active} (timer active)"); } im.SetProgress(true); + im.SignalConnect(Enums.Signals.PreEval, EvalCallback); im.SignalConnect(Enums.Signals.Eval, EvalCallback); + im.SignalConnect(Enums.Signals.PostEval, EvalCallback); var buf = im.DzsaveBuffer("image-pyramid", suffix: ".png"); Assert.True(buf.Length > 0);