Skip to content

Commit 77243a1

Browse files
committed
Add disable async saving hint
1 parent db256a6 commit 77243a1

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

core/src/processing/core/PConstants.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,5 +520,8 @@ public interface PConstants {
520520
static final int DISABLE_KEY_REPEAT = 11;
521521
static final int ENABLE_KEY_REPEAT = -11;
522522

523-
static final int HINT_COUNT = 12;
523+
static final int DISABLE_ASYNC_SAVEFRAME = 12;
524+
static final int ENABLE_ASYNC_SAVEFRAME = -12;
525+
526+
static final int HINT_COUNT = 13;
524527
}

core/src/processing/core/PGraphics.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,11 @@ protected void reapplySettings() {
11261126
* (including auto-repeated). Call hint(DISABLE_KEY_REPEAT) to get events
11271127
* only when the key goes physically up or down.
11281128
* <br/> <br/>
1129+
* hint(DISABLE_ASYNC_SAVEFRAME) - P2D/P3D only - save() and saveFrame()
1130+
* will not use separate threads for saving and will block until the image
1131+
* is written to the drive. This was the default behavior in 3.0b7 and before.
1132+
* To enable, call hint(ENABLE_ASYNC_SAVEFRAME).
1133+
* <br/> <br/>
11291134
* As of release 0149, unhint() has been removed in favor of adding
11301135
* additional ENABLE/DISABLE constants to reset the default behavior. This
11311136
* prevents the double negatives, and also reinforces which hints can be

0 commit comments

Comments
 (0)