Add disable async saving hint

This commit is contained in:
Jakub Valtar
2015-09-24 23:24:49 -04:00
parent 4d13e18f5e
commit 171bf658d8
2 changed files with 9 additions and 1 deletions
+4 -1
View File
@@ -520,5 +520,8 @@ public interface PConstants {
static final int DISABLE_KEY_REPEAT = 11;
static final int ENABLE_KEY_REPEAT = -11;
static final int HINT_COUNT = 12;
static final int DISABLE_ASYNC_SAVEFRAME = 12;
static final int ENABLE_ASYNC_SAVEFRAME = -12;
static final int HINT_COUNT = 13;
}
+5
View File
@@ -1126,6 +1126,11 @@ public class PGraphics extends PImage implements PConstants {
* (including auto-repeated). Call hint(DISABLE_KEY_REPEAT) to get events
* only when the key goes physically up or down.
* <br/> <br/>
* hint(DISABLE_ASYNC_SAVEFRAME) - P2D/P3D only - save() and saveFrame()
* will not use separate threads for saving and will block until the image
* is written to the drive. This was the default behavior in 3.0b7 and before.
* To enable, call hint(ENABLE_ASYNC_SAVEFRAME).
* <br/> <br/>
* As of release 0149, unhint() has been removed in favor of adding
* additional ENABLE/DISABLE constants to reset the default behavior. This
* prevents the double negatives, and also reinforces which hints can be