Skip to content

Commit c397af9

Browse files
committed
Allow OS maintainer to use their own video mode settings. Fixes raspberrypi#259
Signed-off-by: Sam Nazarko <[email protected]>
1 parent bc6dc9e commit c397af9

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

recovery/multiimagewritethread.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,8 @@ bool MultiImageWriteThread::processImage(OsInfo *image)
486486
Json::saveToFile("/mnt2/os_config.json", qm);
487487

488488
emit statusUpdate(tr("%1: Saving display mode to config.txt").arg(os_name));
489-
patchConfigTxt();
489+
if ( ! image->managevideo())
490+
patchConfigTxt();
490491

491492
/* Partition setup script can either reside in the image folder
492493
* or inside the boot partition tarball */

recovery/osinfo.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ OsInfo::OsInfo(const QString &folder, const QString &flavour, QObject *parent) :
1212
_releaseDate = m.value("release_date").toString();
1313
_bootable = m.value("bootable", true).toBool();
1414
_riscosOffset = m.value("riscos_offset").toInt();
15+
_managevideo = m.value("managevideo", false).toBool();
1516

1617
QVariantList parts = Json::loadFromFile(folder+"/partitions.json").toMap().value("partitions").toList();
1718
foreach (QVariant pv, parts)

recovery/osinfo.h

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ class OsInfo : public QObject
5353
return _bootable;
5454
}
5555

56+
inline bool managevideo()
57+
{
58+
return _managevideo;
59+
}
60+
5661
inline QList<PartitionInfo *> *partitions()
5762
{
5863
return &_partitions;
@@ -66,6 +71,7 @@ class OsInfo : public QObject
6671
protected:
6772
QString _folder, _flavour, _name, _description, _version, _releaseDate;
6873
bool _bootable;
74+
bool _managevideo;
6975
QList<PartitionInfo *> _partitions;
7076
int _riscosOffset;
7177

0 commit comments

Comments
 (0)