OSDN Git Service

Updated Web Updater and Elevator binaries. Now has massive code clean-up.
[lamexp/LameXP.git] / src / Dialog_SplashScreen.cpp
index 42bb063..60daea9 100644 (file)
 #define FADE_DELAY 16
 #define OPACITY_DELTA 0.02
 
+/* It can happen that the QThread has just terminated and already emitted the 'terminated' signal, but did NOT change the 'isRunning' flag to FALSE yet. */
+/* For this reason the macro will first check the 'isRunning' flag. If (and only if) the flag still returns TRUE, then we will wait() for at most 50 ms. */
+/* If, after 50 ms, the wait() function returns with FALSE, then the thread probably is still running and we return TRUE. Otherwise we can return FALSE. */
 #define THREAD_RUNNING(THRD) (((THRD)->isRunning()) ? (!((THRD)->wait(50))) : false)
 
+
 ////////////////////////////////////////////////////////////
 // Constructor
 ////////////////////////////////////////////////////////////
@@ -85,6 +89,7 @@ void SplashScreen::showSplash(QThread *thread)
        //Show splash
        splashScreen->m_canClose = false;
        splashScreen->setWindowOpacity(opacity);
+       splashScreen->setFixedSize(splashScreen->size());
        splashScreen->show();
 
        //Wait for window to show