diff --git a/core/src/processing/opengl/PSurfaceJOGL.java b/core/src/processing/opengl/PSurfaceJOGL.java index dd7a1d767..17d2d916e 100644 --- a/core/src/processing/opengl/PSurfaceJOGL.java +++ b/core/src/processing/opengl/PSurfaceJOGL.java @@ -815,8 +815,15 @@ public class PSurfaceJOGL implements PSurface { public void setFrameRate(float fps) { if (fps < 1) { - PGraphics.showWarning("The OpenGL renderers cannot have a frame rate lower than 1.\nYour sketch will run at 1 frame per second."); + PGraphics.showWarning( + "The OpenGL renderer cannot have a frame rate lower than 1.\n" + + "Your sketch will run at 1 frame per second."); fps = 1; + } else if (fps > 1000) { + PGraphics.showWarning( + "The OpenGL renderer cannot have a frame rate higher than 1000.\n" + + "Your sketch will run at 1000 frames per second."); + fps = 1000; } if (animator != null) { animator.stop(); @@ -1220,7 +1227,7 @@ public class PSurfaceJOGL implements PSurface { } static Map cursors = new HashMap<>(); - static Map cursorNames = new HashMap(); + static Map cursorNames = new HashMap<>(); static { cursorNames.put(PConstants.ARROW, "arrow"); cursorNames.put(PConstants.CROSS, "cross");