Changed media player to initialize in boot.
[jspeed] / src / mainwindow.cpp
index 3ccacaf..e08ab2c 100644 (file)
 #include "widgetscreen.h"
 #include "poialerts.h"
 #include "speedalarm.h"
+#include "mediaplayer.h"
 
 MainWindow::MainWindow(): QMainWindow(0), menu_(0), themeLoader_(0), mainScreen_(0)
 {
     setWindowTitle(tr("jSpeed"));
     showFullScreen();
     addScreens();
-    QTimer::singleShot(800, this, SLOT(loadServices()));
+    QTimer::singleShot(500, this, SLOT(loadServices()));
 }
 
 MainWindow::~MainWindow()
@@ -49,11 +50,13 @@ void MainWindow::loadServices()
 {
     Odometer::instance().start();
     QApplication::processEvents();
+    startBacklight();
+    QApplication::processEvents();
     PoiAlerts::instance().start();
     QApplication::processEvents();
     SpeedAlarm::instance().start();
     QApplication::processEvents();
-    startBacklight();
+    MediaPlayer::init();
 }
 
 void MainWindow::addScreens()