We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed89db3 commit 960ef4bCopy full SHA for 960ef4b
1 file changed
test/org/lwjgl/opengl/awt/CompareScreenshotTest.java
@@ -283,6 +283,14 @@ 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
+ try {
288
+ Thread.sleep(500);
289
+ } catch (InterruptedException e) {
290
+ Thread.currentThread().interrupt();
291
+ throw new RuntimeException("Thread interrupted during screenshot delay", e);
292
+ }
293
+
294
BufferedImage s = rbt.createScreenCapture(frameBounds);
295
if (new ImageComparison(background, s).compareImages().getDifferencePercent() == 0) {
296
break;
0 commit comments