-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (27 loc) · 760 Bytes
/
main.cpp
File metadata and controls
29 lines (27 loc) · 760 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
#include "mainscene.h"
#include <QApplication>
#include <QDir>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QDir dir;
qDebug() << "Current working directory:" << QDir::currentPath();
if (!dir.exists("saves")) {
if (dir.mkdir("saves")) {
qDebug() << "Created folder:" << "saves";
} else {
qWarning() << "Failed to create folder:" << "saves";
}
}
if (!dir.exists("auto_save")) {
if (dir.mkdir("auto_save")) {
qDebug() << "Created folder:" << "auto_save";
} else {
qWarning() << "Failed to create folder:" << "auto_save";
}
}
Mainscene w;
w.show();
qDebug() << "Main menu is active";
return a.exec();
}