1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Removed some erroneous callbacks in the JUCESplashScreen component

This commit is contained in:
Tom Poole 2019-05-30 11:06:50 +01:00
parent 15567c7150
commit c8325a25c9
2 changed files with 5 additions and 7 deletions

View file

@ -57,7 +57,7 @@ namespace juce
static const int millisecondsToDisplaySplash = 2000, splashScreenFadeOutTime = 2000;
static const int splashScreenLogoWidth = 123, splashScreenLogoHeight = 63;
static uint32 splashDisplayTime = 0;
static bool appUsageReported = false;
static bool splashHasStartedFading = false, appUsageReported = false;
static Rectangle<float> getLogoArea (Rectangle<float> parentRect)
@ -150,7 +150,6 @@ void ReportingThreadContainer::changeListenerCallback (ChangeBroadcaster*)
//==============================================================================
JUCESplashScreen::JUCESplashScreen (Component& parent)
{
ignoreUnused (hasStartedFading);
ignoreUnused (parent);
#if JUCE_REPORT_APP_USAGE
@ -326,13 +325,13 @@ void JUCESplashScreen::paint (Graphics& g)
void JUCESplashScreen::timerCallback()
{
#if JUCE_DISPLAY_SPLASH_SCREEN
if (isVisible() && ! hasStartedFading)
if (isVisible() && ! splashHasStartedFading)
{
hasStartedFading = true;
splashHasStartedFading = true;
fader.animateComponent (this, getBounds(), 0.0f, splashScreenFadeOutTime, false, 0, 0);
}
if (hasStartedFading && ! fader.isAnimating())
if (splashHasStartedFading && ! fader.isAnimating())
#endif
delete this;
}
@ -351,7 +350,7 @@ void JUCESplashScreen::parentHierarchyChanged()
bool JUCESplashScreen::hitTest (int x, int y)
{
if (! hasStartedFading)
if (! splashHasStartedFading)
return getLogoArea (getLocalBounds().toFloat()).contains ((float) x, (float) y);
return false;

View file

@ -68,7 +68,6 @@ private:
std::unique_ptr<Drawable> content;
CriticalSection appUsageReporting;
ComponentAnimator fader;
bool hasStartedFading = false;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JUCESplashScreen)
};