Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Allow OS maintainer to use their own video mode settings. Fixes #259 #263

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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