Initialize sixel mode even when missing Raster attributes Ph and Pv

Use default Ph=8, Pv=6.
Without this, some sixel commands (ususally the color table
initialization) are not processed.
wilder
Matan Ziv-Av 4 years ago committed by Tomaz Canabrava
parent fc45802b72
commit b17c13074c
  1. 14
      src/Vt102Emulation.cpp

@ -2950,7 +2950,7 @@ bool Vt102Emulation::processSixel(uint cc)
} }
addArgument(); addArgument();
if (params.count == 4) { if (params.count == 4 || params.count == 2) {
// We just ignore the pixel aspect ratio, it's dumb // We just ignore the pixel aspect ratio, it's dumb
// const int pixelWidth = params.value[0]; // const int pixelWidth = params.value[0];
// const int pixelHeight = params.value[1]; // const int pixelHeight = params.value[1];
@ -2961,8 +2961,16 @@ bool Vt102Emulation::processSixel(uint cc)
} else { } else {
m_aspect = qMakePair(params.value[0], params.value[1]); m_aspect = qMakePair(params.value[0], params.value[1]);
} }
const int width = params.value[2]; int width;
const int height = params.value[3]; int height;
if (params.count == 4) {
width = params.value[2];
height = params.value[3];
} else {
// Default size
width = 8;
height = 6;
}
SixelModeEnable(width, height); SixelModeEnable(width, height);
} }
resetTokenizer(); resetTokenizer();

Loading…
Cancel
Save