summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-22 03:17:00 +0100
committerSven Gothel <[email protected]>2023-01-22 03:17:00 +0100
commitb0ac7056205ed423eab9a04417d2e9e6387cc5a0 (patch)
tree35b7d07fa86099bf6259e10da7dd34b18c248f5f
parent06b1563dc84125ab1c589499f30034162ddca0c8 (diff)
Test MouseAdapter: Use volatile qualifier to avoid reading too old values
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
index c11ec86fd..a2209c5ea 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/AWTMouseAdapter.java
@@ -35,9 +35,9 @@ import java.util.List;
public class AWTMouseAdapter extends java.awt.event.MouseAdapter implements InputEventCountAdapter {
String prefix;
- int mouseClicked;
- int consumed;
- boolean pressed;
+ volatile int mouseClicked;
+ volatile int consumed;
+ volatile boolean pressed;
List<EventObject> queue = new ArrayList<EventObject>();
boolean verbose = true;
diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
index 0370767ed..c9c675bdb 100644
--- a/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
+++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTMouseAdapter.java
@@ -38,9 +38,9 @@ import com.jogamp.newt.event.MouseEvent;
public class NEWTMouseAdapter extends MouseAdapter implements InputEventCountAdapter {
String prefix;
- int mouseClicked;
- int consumed;
- boolean pressed;
+ volatile int mouseClicked;
+ volatile int consumed;
+ volatile boolean pressed;
List<EventObject> queue = new ArrayList<EventObject>();
boolean verbose = true;