Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions test/org/lwjgl/opengl/awt/CompareScreenshotTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ public void run() {
BufferedImage background = rbt.createScreenCapture(frameBounds);
// Some Operating Systems have a window open/close animation, so we wait until the screenshot is stable
while (true) {
// Pause at least 500 milliseconds between captures
try {
Thread.sleep(500);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RuntimeException("Thread interrupted during screenshot delay", e);
}

BufferedImage s = rbt.createScreenCapture(frameBounds);
if (new ImageComparison(background, s).compareImages().getDifferencePercent() == 0) {
break;
Expand Down
Loading