Skip to content

OpenToonz - An open-source full-featured 2D animation creation software

C

Update main.cpp

JPUser1cf3a7be7499d
diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp
index c21dc77da..a0131cc99 100644
--- a/toonz/sources/toonz/main.cpp
+++ b/toonz/sources/toonz/main.cpp
@@ -442,9 +442,21 @@ int main(int argc, char *argv[]) {
TEnv::setApplicationFileName(argv[0]);
- // splash screen
- QPixmap splashPixmap = QIcon(":Resources/splash.svg").pixmap(QSize(610, 344));
+// splash screen (override with local file if present)
+QString exeDir = QCoreApplication::applicationDirPath();
+QString localSplashPath = QDir(exeDir).filePath("splash.svg");
+QPixmap splashPixmap;
+
+if (QFileInfo(localSplashPath).exists() && QFileInfo(localSplashPath).isFile()) {
+ splashPixmap = QIcon(localSplashPath).pixmap(QSize(610, 344));
+ if (splashPixmap.isNull()) {
+ // fallback if loading fails
+ splashPixmap = QIcon(":Resources/splash.svg").pixmap(QSize(610, 344));
+ }
+} else {
+ splashPixmap = QIcon(":Resources/splash.svg").pixmap(QSize(610, 344));
+}
#ifdef _WIN32
QFont font("Segoe UI", -1);
#else