mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
pixelDensity (OpenGL): update sketch pixel size when display density changes
This commit is contained in:
@@ -695,6 +695,10 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
float f = pgl.getPixelScale();
|
||||
pixelWidth = (int)(width * f);
|
||||
pixelHeight = (int)(height * f);
|
||||
if (primaryGraphics) {
|
||||
parent.pixelWidth = pixelWidth;
|
||||
parent.pixelHeight = pixelHeight;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user