Skip to content

Commit

Permalink
More debug (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed May 9, 2024
1 parent f672180 commit 3da60d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/NetVips/VipsProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public struct GTimer
/// <summary>
/// Is the timer currently active?
/// </summary>
[MarshalAs(UnmanagedType.Bool)]
[MarshalAs(UnmanagedType.I1)]
public bool Active;
}

Expand Down
3 changes: 3 additions & 0 deletions tests/NetVips.Tests/IoFuncsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3da60d6

Please sign in to comment.