summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp24
-rw-r--r--src/mo_icon.icobin96367 -> 45874 bytes
-rw-r--r--src/mo_icon.psdbin979131 -> 0 bytes
-rw-r--r--src/splash.pngbin273418 -> 74041 bytes
4 files changed, 20 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a262d031..eb3a7248 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -434,11 +434,11 @@ void setupPath()
::SetEnvironmentVariableW(L"PATH", newPath.c_str());
}
-
-int runApplication(MOApplication &application, SingleInstance &instance)
+int runApplication(MOApplication &application, SingleInstance &instance,
+ const QString &splashPath)
{
qDebug("start main application");
- QPixmap pixmap(":/MO/gui/splash");
+ QPixmap pixmap(splashPath);
QSplashScreen splash(pixmap);
QString dataPath = application.property("dataPath").toString();
@@ -474,6 +474,17 @@ int runApplication(MOApplication &application, SingleInstance &instance)
if (game == nullptr) {
return 1;
}
+ if (splashPath.startsWith(':')) {
+ // currently using MO splash, see if the plugin contains one
+ QString pluginSplash
+ = QString(":/%1/splash").arg(game->gameShortName());
+ QImage image(pluginSplash);
+ if (!image.isNull()) {
+ image.save(dataPath + "/splash.png");
+ } else {
+ qDebug("no plugin splash");
+ }
+ }
organizer.setManagedGame(game);
organizer.createDefaultProfile();
@@ -630,7 +641,12 @@ int main(int argc, char *argv[])
LogBuffer::init(100, QtDebugMsg, qApp->property("dataPath").toString() + "/logs/mo_interface.log");
- int result = runApplication(application, instance);
+ QString splash = dataPath + "/splash.png";
+ if (!QFile::exists(dataPath + "/splash.png")) {
+ splash = ":/MO/gui/splash";
+ }
+
+ int result = runApplication(application, instance, splash);
if (result != INT_MAX) {
return result;
diff --git a/src/mo_icon.ico b/src/mo_icon.ico
index 59da6c2d..ba54d4dc 100644
--- a/src/mo_icon.ico
+++ b/src/mo_icon.ico
Binary files differ
diff --git a/src/mo_icon.psd b/src/mo_icon.psd
deleted file mode 100644
index 1f7b40c9..00000000
--- a/src/mo_icon.psd
+++ /dev/null
Binary files differ
diff --git a/src/splash.png b/src/splash.png
index 4f1f1a3d..d29a6711 100644
--- a/src/splash.png
+++ b/src/splash.png
Binary files differ