-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (25 loc) · 837 Bytes
/
main.cpp
File metadata and controls
33 lines (25 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "spotifyoverlay.h"
#include "openvr.h"
#include "openvroverlaycontroller.h"
#include <QApplication>
void logMsgHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
QDateTime date;
QString text = msg;
text.prepend("[" + date.currentDateTime().toString() + "]: ");
QFile file("log.txt");
file.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text);
QTextStream ts(&file);
ts << text << '\n' << flush;
}
int main(int argc, char *argv[])
{
qInstallMessageHandler(logMsgHandler); // Enable logging
QApplication a(argc, argv);
SpotifyOverlay *w = new SpotifyOverlay;
COpenVROverlayController::SharedInstance()->Init();
COpenVROverlayController::SharedInstance()->SetWidget(w);
w->initManifest();
//w->show();
return a.exec();
}