SnapmaticPicture: define default PhotoBuffer
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1770ec23e0
commit
b47a0119a5
1 changed files with 8 additions and 0 deletions
|
@ -170,7 +170,11 @@ bool SnapmaticPicture::readingPictureFromFile(const QString &fileName, bool cach
|
||||||
|
|
||||||
bool SnapmaticPicture::setImage(const QImage &picture, bool eXtendMode)
|
bool SnapmaticPicture::setImage(const QImage &picture, bool eXtendMode)
|
||||||
{
|
{
|
||||||
|
#ifdef GTA5SYNC_DYNAMIC_PHOTOBUFFER
|
||||||
quint32 jpegPicStreamLength = p_ragePhoto.photoBuffer();
|
quint32 jpegPicStreamLength = p_ragePhoto.photoBuffer();
|
||||||
|
#else
|
||||||
|
quint32 jpegPicStreamLength = 524288U;
|
||||||
|
#endif
|
||||||
QByteArray picByteArray;
|
QByteArray picByteArray;
|
||||||
int comLvl = 100;
|
int comLvl = 100;
|
||||||
bool saveSuccess = false;
|
bool saveSuccess = false;
|
||||||
|
@ -193,6 +197,10 @@ bool SnapmaticPicture::setImage(const QImage &picture, bool eXtendMode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
#ifndef GTA5SYNC_DYNAMIC_PHOTOBUFFER
|
||||||
|
if (p_ragePhoto.photoBuffer() != jpegPicStreamLength)
|
||||||
|
p_ragePhoto.setPhotoBuffer(jpegPicStreamLength, true);
|
||||||
|
#endif
|
||||||
picByteArray = picByteArrayT;
|
picByteArray = picByteArrayT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue