Hardware accelerated video decoding off by default.

This commit is contained in:
John Preston 2022-04-19 09:51:29 +04:00
parent bfe47a1ba2
commit 1c5a3aef54
2 changed files with 12 additions and 3 deletions

View File

@ -239,8 +239,9 @@ QByteArray Settings::serialize() const {
}
stream
<< qint32(_hardwareAcceleratedVideo ? 1 : 0)
<< qint32(_chatQuickAction);
<< qint32(0) // old hardwareAcceleratedVideo
<< qint32(_chatQuickAction)
<< qint32(_hardwareAcceleratedVideo ? 1 : 0);
}
return result;
}
@ -514,11 +515,15 @@ void Settings::addFromSerialized(const QByteArray &serialized) {
}
}
if (!stream.atEnd()) {
stream >> hardwareAcceleratedVideo;
qint32 legacyHardwareAcceleratedVideo = 0;
stream >> legacyHardwareAcceleratedVideo;
}
if (!stream.atEnd()) {
stream >> chatQuickAction;
}
if (!stream.atEnd()) {
stream >> hardwareAcceleratedVideo;
}
if (stream.status() != QDataStream::Ok) {
LOG(("App Error: "
"Bad data for Core::Settings::constructFromSerialized()"));

View File

@ -792,7 +792,11 @@ private:
rpl::variable<Media::Player::OrderMode> _playerOrderMode;
bool _macWarnBeforeQuit = true;
std::vector<uint64> _accountsOrder;
#ifdef Q_OS_MAC
bool _hardwareAcceleratedVideo = true;
#else // Q_OS_MAC
bool _hardwareAcceleratedVideo = false;
#endif // Q_OS_MAC
HistoryView::DoubleClickQuickAction _chatQuickAction =
HistoryView::DoubleClickQuickAction();