mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-22 01:34:21 +00:00
Removed the initialiseJuce_NonGUI() and shutdownJuce_NonGUI() methods - these aren't needed any more. Removed some old MidiOutput methods which weren't cross-platform. OpenGLComponent updates. Extra DropShadower safety.
This commit is contained in:
parent
e159587a9b
commit
328cc11713
44 changed files with 1416 additions and 756 deletions
|
|
@ -27,43 +27,12 @@
|
|||
|
||||
BEGIN_JUCE_NAMESPACE
|
||||
|
||||
#include "../memory/juce_Atomic.h"
|
||||
#include "juce_PlatformUtilities.h"
|
||||
#include "juce_SystemStats.h"
|
||||
#include "../text/juce_LocalisedStrings.h"
|
||||
#include "../io/streams/juce_MemoryOutputStream.h"
|
||||
#include "../io/streams/juce_MemoryInputStream.h"
|
||||
#include "../threads/juce_Thread.h"
|
||||
|
||||
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
|
||||
#include "../events/juce_MessageManager.h"
|
||||
#include "../gui/components/buttons/juce_TextButton.h"
|
||||
#include "../gui/components/lookandfeel/juce_LookAndFeel.h"
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
static bool juceInitialisedNonGUI = false;
|
||||
|
||||
JUCE_API void JUCE_CALLTYPE initialiseJuce_NonGUI()
|
||||
{
|
||||
if (! juceInitialisedNonGUI)
|
||||
{
|
||||
juceInitialisedNonGUI = true;
|
||||
|
||||
DBG (SystemStats::getJUCEVersion());
|
||||
}
|
||||
}
|
||||
|
||||
JUCE_API void JUCE_CALLTYPE shutdownJuce_NonGUI()
|
||||
{
|
||||
if (juceInitialisedNonGUI)
|
||||
{
|
||||
juceInitialisedNonGUI = false;
|
||||
|
||||
Thread::stopAllThreads (3000);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
#if ! JUCE_ONLY_BUILD_CORE_LIBRARY
|
||||
|
||||
|
|
@ -76,27 +45,7 @@ JUCE_API void JUCE_CALLTYPE initialiseJuce_GUI()
|
|||
juceInitialisedGUI = true;
|
||||
|
||||
JUCE_AUTORELEASEPOOL
|
||||
initialiseJuce_NonGUI();
|
||||
|
||||
MessageManager::getInstance();
|
||||
LookAndFeel::setDefaultLookAndFeel (nullptr);
|
||||
|
||||
#if JUCE_DEBUG
|
||||
try // This section is just a safety-net for catching builds without RTTI enabled..
|
||||
{
|
||||
MemoryOutputStream mo;
|
||||
OutputStream* o = &mo;
|
||||
|
||||
// Got an exception here? Then TURN ON RTTI in your compiler settings!!
|
||||
o = dynamic_cast <MemoryOutputStream*> (o);
|
||||
jassert (o != nullptr);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// Ended up here? If so, TURN ON RTTI in your compiler settings!!
|
||||
jassertfalse;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -108,20 +57,17 @@ JUCE_API void JUCE_CALLTYPE shutdownJuce_GUI()
|
|||
|
||||
JUCE_AUTORELEASEPOOL
|
||||
DeletedAtShutdown::deleteAll();
|
||||
LookAndFeel::clearDefaultLookAndFeel();
|
||||
delete MessageManager::getInstance();
|
||||
|
||||
shutdownJuce_NonGUI();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_UNIT_TESTS
|
||||
|
||||
#include "../utilities/juce_UnitTest.h"
|
||||
#include "../memory/juce_Atomic.h"
|
||||
|
||||
class AtomicTests : public UnitTest
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue