may have fixed the hanging bug.. or at least fixed it for opengl

This commit is contained in:
benfry
2004-12-13 07:01:40 +00:00
parent 2e648173d9
commit 850fb4ae0f
3 changed files with 34 additions and 11 deletions

View File

@@ -3938,15 +3938,21 @@ public class PApplet extends Applet
Thread ethread = new Thread() { //new Runnable() {
public void run() {
setPriority(Thread.MIN_PRIORITY);
while ((Thread.currentThread() == this) && !finished) {
try {
// is this what's causing all the trouble?
int anything = System.in.read();
if (anything == EXTERNAL_STOP) {
//System.out.println("********** STOPPING");
// adding this for 0073.. need to stop libraries
// when the stop button is hit.
PApplet.this.stop();
//System.out.println("********** REALLY");
finished = true;
//stop();
//thread = null; // kill self
}
} catch (IOException e) {
// not tested (needed?) but seems correct