mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Android: Allow multiple instances of ScopedJuceInitialiser_GUI
Previously, the UnitTestRunner example in the DemoRunner would fail on any tests that included ScopedJuceInitialiser_GUI, as DeletedAtShutdown objects would be destroyed too early.
This commit is contained in:
parent
bafd0d293b
commit
238a99caf8
1 changed files with 2 additions and 1 deletions
|
|
@ -267,7 +267,7 @@ private:
|
|||
|
||||
JUCEApplicationBase::createInstance = createApplicationSymbol;
|
||||
|
||||
initialiseJuce_GUI();
|
||||
initialiser.emplace();
|
||||
|
||||
if (! JUCEApplicationBase::createInstance())
|
||||
jassertfalse; // you must supply an application object for an android app!
|
||||
|
|
@ -292,6 +292,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
std::optional<ScopedJuceInitialiser_GUI> initialiser;
|
||||
GlobalRef myself;
|
||||
juce::JUCEApplicationBase* (*createApplicationSymbol)();
|
||||
bool hasBeenInitialised = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue