Browse Source

Removed some erroneous callbacks in the JUCESplashScreen component

tags/2021-05-28
Tom Poole 6 years ago
parent
commit
c8325a25c9
2 changed files with 5 additions and 7 deletions
  1. +5
    -6
      modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp
  2. +0
    -1
      modules/juce_gui_basics/misc/juce_JUCESplashScreen.h

+ 5
- 6
modules/juce_gui_basics/misc/juce_JUCESplashScreen.cpp 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;


+ 0
- 1
modules/juce_gui_basics/misc/juce_JUCESplashScreen.h 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)
};


Loading…
Cancel
Save