diff --git a/core/src/processing/core/PApplet.java b/core/src/processing/core/PApplet.java index 7c17eaff0..a55efbf6f 100644 --- a/core/src/processing/core/PApplet.java +++ b/core/src/processing/core/PApplet.java @@ -5825,12 +5825,19 @@ public class PApplet implements PConstants { return saveXML(xml, filename, null); } - + /** + * @nowebref + */ public boolean saveXML(XML xml, String filename, String options) { return xml.save(saveFile(filename), options); } - + /** + * @webref input:files + * @param input String to parse as a JSONObject + * @see PApplet#loadJSONObject(String) + * @see PApplet#saveJSONObject(JSONObject, String) + */ public JSONObject parseJSONObject(String input) { return new JSONObject(new StringReader(input)); } @@ -5867,12 +5874,20 @@ public class PApplet implements PConstants { return saveJSONObject(json, filename, null); } - + /** + * @nowebref + */ public boolean saveJSONObject(JSONObject json, String filename, String options) { return json.save(saveFile(filename), options); } - +/** + * @webref input:files + * @param input String to parse as a JSONArray + * @see JSONObject + * @see PApplet#loadJSONObject(String) + * @see PApplet#saveJSONObject(JSONObject, String) + */ public JSONArray parseJSONArray(String input) { return new JSONArray(new StringReader(input)); } @@ -5881,7 +5896,6 @@ public class PApplet implements PConstants { /** * @webref input:files * @param filename name of a file in the data folder or a URL - * @see JSONObject * @see JSONArray * @see PApplet#loadJSONObject(String) * @see PApplet#saveJSONObject(JSONObject, String) diff --git a/core/src/processing/opengl/PSurfaceJOGL.java b/core/src/processing/opengl/PSurfaceJOGL.java index 81b070d4c..80dbe2949 100644 --- a/core/src/processing/opengl/PSurfaceJOGL.java +++ b/core/src/processing/opengl/PSurfaceJOGL.java @@ -942,8 +942,10 @@ public class PSurfaceJOGL implements PSurface { int peCount = 0; if (peAction == MouseEvent.WHEEL) { - peCount = nativeEvent.isShiftDown() ? (int)nativeEvent.getRotation()[0] : - (int)nativeEvent.getRotation()[1]; + // Invert wheel rotation count so it matches JAVA2D's + // https://github.com/processing/processing/issues/3840 + peCount = -(nativeEvent.isShiftDown() ? (int)nativeEvent.getRotation()[0]: + (int)nativeEvent.getRotation()[1]); } else { peCount = nativeEvent.getClickCount(); }