In Processing 4, with the renderer set to P2D, fullScreen()
does not make the window fullscreen as expected if Windows scaling is set to anything other than 100% (for example at 125%, the window will fill around 3/4 of the screen). width
and height
also report resolutions lower than the screen's, even though displayWidth
and displayHeight
correctly state that it's 1920x1080.
This issue occurs only in the exported application, not in the Processing editor. It also doesn't happen with the default renderer or when using Processing 3.
I've tried everything I can think of to resolve this - but the only thing I can think of so far is to compare displayWidth
with width
(and the same with height) once the program is open, and if they don't match, show a message to the user telling them to switch to windowed mode. I also considered just using size(displayWidth, displayHeight)
, but I can't work out how to hide the taskbar with that.
Any ideas? I'd really prefer P2D over the default renderer because of performance and shaders...
Thanks!
The example image has the following code:
void settings(){
fullScreen(P2D); }
void setup(){
background(255,0,0); }