Ok, so I must have been confused about how it worked. I thought before the mouseX and mouseY where polled by the processing core, every N ms, and now only updated when mouseMoved/mouseDragged events occurred.
Anyway the thing is that one of my sketches has changed behaviour of the mouseX/mouseY values.
Here is the example code:
Code:
void setup(){
size(screen.width, screen.height);
framerate(25);
System.out.println("In setup() ...");
System.out.println("mouseX = " + mouseX + "; mouseY = " + mouseY);
System.out.println("In draw()...");
}
void draw(){
System.out.println("mouseX = " + mouseX + "; mouseY = " + mouseY);
}
I run it in present mode.
And as soon as I click Present, I don't move the mouse. And after a small moment I press ESC.
the result in 115:
Code:
In setup() ...
mouseX = 0; mouseY = 0
In draw()...
mouseX = 0; mouseY = 0
mouseX = 592; mouseY = 80
mouseX = 592; mouseY = 80
mouseX = 592; mouseY = 80
mouseX = 592; mouseY = 80
mouseX = 592; mouseY = 80
mouseX = 592; mouseY = 80
...
the result in 116:
Code:
In setup() ...
mouseX = 0; mouseY = 0
In draw()...
mouseX = 0; mouseY = 0
mouseX = 0; mouseY = 0
mouseX = 0; mouseY = 0
mouseX = 0; mouseY = 0
mouseX = 0; mouseY = 0
...
In both cases the mouse wasn't moved.
NOTES:
1 - The sketch must have focus for this test to run.
2 - Be sure to change the framerate() to frameRate()