Skip to content

Commit

Permalink
Load settings file before using global_scale
Browse files Browse the repository at this point in the history
On the pi that settings file must be processed earlier than anything
that references it, so it must be done right after the app launches.
  • Loading branch information
steveatinfincia committed Aug 22, 2020
1 parent e606165 commit b870399
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ int main(int argc, char *argv[]) {
QCoreApplication::setOrganizationDomain("open.hd");
QCoreApplication::setApplicationName("Open.HD");

auto manageSettings = new ManageSettings();
#if defined(__rasp_pi__)
manageSettings->loadPiSettings();
#endif

QSettings settings;

double global_scale = settings.value("global_scale", 1.0).toDouble();
Expand Down Expand Up @@ -338,13 +343,8 @@ OpenHDAppleVideo *pipVideo = new OpenHDAppleVideo(OpenHDStreamTypePiP);

#endif

auto manageSettings = new ManageSettings();
engine.rootContext()->setContextProperty("ManageSettings", manageSettings);

#if defined(__rasp_pi__)
manageSettings->loadPiSettings();
#endif


auto openHDSettings = new OpenHDSettings();
engine.rootContext()->setContextProperty("openHDSettings", openHDSettings);
Expand Down

0 comments on commit b870399

Please sign in to comment.