diff --git a/src/blupi.cxx b/src/blupi.cxx index 9b2d7a7..08868eb 100644 --- a/src/blupi.cxx +++ b/src/blupi.cxx @@ -180,13 +180,14 @@ ReadConfig () /** * \brief Main frame update. */ -static void +static bool UpdateFrame (void) { Rect clip, rcRect; Uint32 phase; Point posMouse; Sint32 i, term, speed; + bool display = true; posMouse = g_pEvent->GetLastMousePos (); @@ -259,7 +260,7 @@ UpdateFrame (void) phase == EV_PHASE_H2MOVIE || phase == EV_PHASE_PLAYMOVIE || phase == EV_PHASE_WINMOVIE) { - g_pEvent->MovieToStart (); // start a movie if necessary + display = g_pEvent->MovieToStart (); // start a movie if necessary } if (phase == EV_PHASE_INSERT) @@ -273,6 +274,8 @@ UpdateFrame (void) if (term == 2) g_pEvent->ChangePhase (EV_PHASE_WINMOVIE); // win } + + return display; } /** @@ -387,10 +390,12 @@ HandleEvent (const SDL_Event & event) case EV_UPDATE: if (!g_pEvent->IsMovie ()) // pas de film en cours ? { - if (!g_pause) - UpdateFrame (); + bool display = true; - if (!g_pEvent->IsMovie ()) + if (!g_pause) + display = UpdateFrame (); + + if (!g_pEvent->IsMovie () && display) g_pPixmap->Display (); } break; diff --git a/src/event.cxx b/src/event.cxx index 513a55a..401e861 100644 --- a/src/event.cxx +++ b/src/event.cxx @@ -3454,15 +3454,16 @@ CEvent::TryInsert () // Fait démarrer un film si nécessaire. -void +bool CEvent::MovieToStart () { + bool movie = false; + if (m_movieToStart[0] != 0) // y a-t-il un film à démarrer ? { - HideMouse (true); // cache la souris - if (StartMovie (m_movieToStart)) { + movie = true; m_phase = m_phaseAfterMovie; // prochaine phase normale } else @@ -3470,6 +3471,8 @@ CEvent::MovieToStart () m_movieToStart[0] = 0; } + + return movie; } // Décale le décor. @@ -4322,6 +4325,7 @@ CEvent::StartMovie (const std::string & pFilename) if (!m_pMovie->IsExist (pFilename)) return false; + HideMouse (true); m_pSound->StopMusic (); if (!m_pMovie->Play (pFilename)) diff --git a/src/event.h b/src/event.h index cd326fb..472cfd1 100644 --- a/src/event.h +++ b/src/event.h @@ -101,7 +101,7 @@ public: Sint32 GetImageWorld (); bool IsHelpHide (); bool ChangePhase (Uint32 phase); - void MovieToStart (); + bool MovieToStart (); Uint32 GetPhase (); void TryInsert ();