We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed89db3 commit 9533d7eCopy full SHA for 9533d7e
1 file changed
test/org/lwjgl/opengl/awt/CompareScreenshotTest.java
@@ -283,6 +283,12 @@ public void run() {
283
BufferedImage background = rbt.createScreenCapture(frameBounds);
284
// Some Operating Systems have a window open/close animation, so we wait until the screenshot is stable
285
while (true) {
286
+ // Pause at least 500 milliseconds between captures
287
+ long pauseStartTime = System.currentTimeMillis();
288
+ while (System.currentTimeMillis() - pauseStartTime < 500) {
289
+ Thread.yield();
290
+ }
291
+
292
BufferedImage s = rbt.createScreenCapture(frameBounds);
293
if (new ImageComparison(background, s).compareImages().getDifferencePercent() == 0) {
294
break;
0 commit comments