SnapmaticPicture: define default PhotoBuffer
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Syping 2021-05-23 05:06:32 +02:00
parent 1770ec23e0
commit b47a0119a5
1 changed files with 8 additions and 0 deletions

View File

@ -170,7 +170,11 @@ bool SnapmaticPicture::readingPictureFromFile(const QString &fileName, bool cach
bool SnapmaticPicture::setImage(const QImage &picture, bool eXtendMode)
{
#ifdef GTA5SYNC_DYNAMIC_PHOTOBUFFER
quint32 jpegPicStreamLength = p_ragePhoto.photoBuffer();
#else
quint32 jpegPicStreamLength = 524288U;
#endif
QByteArray picByteArray;
int comLvl = 100;
bool saveSuccess = false;
@ -193,6 +197,10 @@ bool SnapmaticPicture::setImage(const QImage &picture, bool eXtendMode)
}
}
else {
#ifndef GTA5SYNC_DYNAMIC_PHOTOBUFFER
if (p_ragePhoto.photoBuffer() != jpegPicStreamLength)
p_ragePhoto.setPhotoBuffer(jpegPicStreamLength, true);
#endif
picByteArray = picByteArrayT;
}
}