Fix SplashScreen closing after https://codereview.scilab.org/#/c/14056/ 86/14086/1
Vincent COUVERT [Thu, 20 Mar 2014 14:56:41 +0000 (15:56 +0100)]
Change-Id: Ic479276f035c00a6760c1711dacf323d7c48dd42

scilab/modules/windows_tools/src/c/scilab_windows/splashScreen.cpp

index e084f15..6efcb38 100644 (file)
@@ -15,6 +15,7 @@
 /*--------------------------------------------------------------------------*/
 #include <Windows.h>
 #include <stdio.h>
+#include <string>
 #include <CommCtrl.h>
 #include <GdiPlus.h>
 extern "C"
@@ -196,7 +197,7 @@ static DWORD WINAPI ThreadSplashScreen(LPVOID lpParam)
 /*--------------------------------------------------------------------------*/
 static BOOL stopSplashScreen(UINT _time, UINT _timeMax)
 {
-    if (haveConsoleWindow() || (timeSplashScreen > _timeMax))
+    if (haveConsoleWindow() || (timeSplashScreen >= _timeMax))
     {
         return TRUE;
     }
@@ -221,7 +222,7 @@ static BOOL haveConsoleWindow(void)
 
     if (hWndMainScilab == NULL)
     {
-        wsprintf(titleMainWindow, _("Scilab Console"));
+        wsprintf(titleMainWindow, _("Scilab %s Console"),  std::string(SCI_VERSION_STRING).substr(strlen("scilab-"), std::string::npos).c_str());
         hWndMainScilab = FindWindow(NULL, titleMainWindow);
     }