File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
core/src/processing/opengl Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -815,8 +815,15 @@ public void setSmooth(int level) {
815815
816816 public void setFrameRate (float fps ) {
817817 if (fps < 1 ) {
818- PGraphics .showWarning ("The OpenGL renderers cannot have a frame rate lower than 1.\n Your sketch will run at 1 frame per second." );
818+ PGraphics .showWarning (
819+ "The OpenGL renderer cannot have a frame rate lower than 1.\n " +
820+ "Your sketch will run at 1 frame per second." );
819821 fps = 1 ;
822+ } else if (fps > 1000 ) {
823+ PGraphics .showWarning (
824+ "The OpenGL renderer cannot have a frame rate higher than 1000.\n " +
825+ "Your sketch will run at 1000 frames per second." );
826+ fps = 1000 ;
820827 }
821828 if (animator != null ) {
822829 animator .stop ();
@@ -1220,7 +1227,7 @@ void set() {
12201227 }
12211228
12221229 static Map <Integer , CursorInfo > cursors = new HashMap <>();
1223- static Map <Integer , String > cursorNames = new HashMap <Integer , String >();
1230+ static Map <Integer , String > cursorNames = new HashMap <>();
12241231 static {
12251232 cursorNames .put (PConstants .ARROW , "arrow" );
12261233 cursorNames .put (PConstants .CROSS , "cross" );
You can’t perform that action at this time.
0 commit comments