Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,19 @@ private void setCaptionMode(int captionMode) {
int oldCaptionMode = this.captionMode;
this.captionMode = captionMode;

// Clear the working memory.
// Clear the cues and cueBuilders except for Paint-on mode. Paint-on mode may modify characters
// already on the screen. This feature is not fully supported, but we need to keep the previous
// screen content shown
if (captionMode == CC_MODE_PAINT_ON) {
// update the Mode member of all existing cueBuilders even if we are mid-row
for (CueBuilder builder : cueBuilders) {
builder.setCaptionMode(captionMode);
}
return;
}

resetCueBuilders();

if (oldCaptionMode == CC_MODE_PAINT_ON || captionMode == CC_MODE_ROLL_UP
|| captionMode == CC_MODE_UNKNOWN) {
// When switching from paint-on or to roll-up or unknown, we also need to clear the caption.
Expand Down Expand Up @@ -653,6 +664,10 @@ public CueBuilder(int captionMode, int captionRowCount) {
setCaptionRowCount(captionRowCount);
}

public void setCaptionMode(int captionMode) {
this.captionMode = captionMode;
}

public void reset(int captionMode) {
this.captionMode = captionMode;
cueStyles.clear();
Expand Down