Skip to content

Commit

Permalink
Allow OS maintainer to use their own video mode settings. Fixes raspb…
Browse files Browse the repository at this point in the history
…errypi#259

Signed-off-by: Sam Nazarko <[email protected]>
  • Loading branch information
samnazarko committed Feb 6, 2016
1 parent bc6dc9e commit c397af9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recovery/multiimagewritethread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ bool MultiImageWriteThread::processImage(OsInfo *image)
Json::saveToFile("/mnt2/os_config.json", qm);

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

/* Partition setup script can either reside in the image folder
* or inside the boot partition tarball */
Expand Down
1 change: 1 addition & 0 deletions recovery/osinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ OsInfo::OsInfo(const QString &folder, const QString &flavour, QObject *parent) :
_releaseDate = m.value("release_date").toString();
_bootable = m.value("bootable", true).toBool();
_riscosOffset = m.value("riscos_offset").toInt();
_managevideo = m.value("managevideo", false).toBool();

QVariantList parts = Json::loadFromFile(folder+"/partitions.json").toMap().value("partitions").toList();
foreach (QVariant pv, parts)
Expand Down
6 changes: 6 additions & 0 deletions recovery/osinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ class OsInfo : public QObject
return _bootable;
}

inline bool managevideo()
{
return _managevideo;
}

inline QList<PartitionInfo *> *partitions()
{
return &_partitions;
Expand All @@ -66,6 +71,7 @@ class OsInfo : public QObject
protected:
QString _folder, _flavour, _name, _description, _version, _releaseDate;
bool _bootable;
bool _managevideo;
QList<PartitionInfo *> _partitions;
int _riscosOffset;

Expand Down

0 comments on commit c397af9

Please sign in to comment.