Skip to content

Commit b870399

Browse files
Load settings file before using global_scale
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.
1 parent e606165 commit b870399

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/main.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ int main(int argc, char *argv[]) {
100100
QCoreApplication::setOrganizationDomain("open.hd");
101101
QCoreApplication::setApplicationName("Open.HD");
102102

103+
auto manageSettings = new ManageSettings();
104+
#if defined(__rasp_pi__)
105+
manageSettings->loadPiSettings();
106+
#endif
107+
103108
QSettings settings;
104109

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

339344
#endif
340345

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

344-
#if defined(__rasp_pi__)
345-
manageSettings->loadPiSettings();
346-
#endif
347-
348348

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

0 commit comments

Comments
 (0)