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

Introjucer: change to android manifest to improve graphics performance. Stopped alertwindows being always-on-top in plugins.

This commit is contained in:
jules 2012-09-19 18:39:57 +01:00
parent e77d5b12ef
commit 06e2a667fb
7 changed files with 15 additions and 16 deletions

View file

@ -44,8 +44,6 @@ public:
//==============================================================================
void initialise (const String& commandLine)
{
initialiseLogger ("log_");
LookAndFeel::setDefaultLookAndFeel (&lookAndFeel);
settings = new StoredSettings();
settings->initialise();
@ -62,6 +60,8 @@ public:
}
}
initialiseLogger ("log_");
if (sendCommandLineToPreexistingInstance())
{
DBG ("Another instance is running - quitting...");

View file

@ -271,6 +271,7 @@ private:
XmlElement* app = manifest->createNewChildElement ("application");
app->setAttribute ("android:label", "@string/app_name");
app->setAttribute ("android:icon", "@drawable/icon");
app->setAttribute ("android:hardwareAccelerated", "false"); // (using the 2D acceleration slows down openGL)
XmlElement* act = app->createNewChildElement ("activity");
act->setAttribute ("android:name", getActivityName());

View file

@ -101,6 +101,7 @@ namespace
Project& project = projectSaver.getProject();
StringPairArray flags;
//flags.set ("JUCE_MODAL_LOOPS_PERMITTED", "0");
flags.set ("JucePlugin_Build_VST", valueToBool (shouldBuildVST (project)));
flags.set ("JucePlugin_Build_AU", valueToBool (shouldBuildAU (project)));
flags.set ("JucePlugin_Build_RTAS", valueToBool (shouldBuildRTAS (project)));

View file

@ -7,7 +7,7 @@
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<application android:label="@string/app_name" android:icon="@drawable/icon">
<application android:label="@string/app_name" android:icon="@drawable/icon" android:hardwareAccelerated="false">
<activity android:name="JuceDemo" android:label="@string/app_name" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

View file

@ -295,8 +295,7 @@ private:
HeapBlockHelper::ThrowOnFail<throwOnFailure>::check (data);
}
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (HeapBlock);
JUCE_DECLARE_NON_COPYABLE (HeapBlock);
JUCE_PREVENT_HEAP_ALLOCATION; // Creating a 'new HeapBlock' would be missing the point!
};

View file

@ -272,7 +272,7 @@ namespace juce
//==============================================================================
#if JUCE_ANDROID && ! DOXYGEN
#define JUCE_MODAL_LOOPS_PERMITTED 0
#else
#elif ! defined (JUCE_MODAL_LOOPS_PERMITTED)
/** Some operating environments don't provide a modal loop mechanism, so this flag can be
used to disable any functions that try to run a modal loop. */
#define JUCE_MODAL_LOOPS_PERMITTED 1

View file

@ -47,22 +47,20 @@ AlertWindow::AlertWindow (const String& title,
setMessage (message);
for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;)
Desktop& desktop = Desktop::getInstance();
for (int i = desktop.getNumComponents(); --i >= 0;)
{
Component* const c = Desktop::getInstance().getComponent (i);
if (c != nullptr && c->isAlwaysOnTop() && c->isShowing())
if (Component* const c = desktop.getComponent (i))
{
setAlwaysOnTop (true);
break;
if (c->isAlwaysOnTop() && c->isShowing())
{
setAlwaysOnTop (true);
break;
}
}
}
if (! JUCEApplication::isStandaloneApp())
setAlwaysOnTop (true); // for a plugin, make it always-on-top because the host windows are often top-level
AlertWindow::lookAndFeelChanged();
constrainer.setMinimumOnscreenAmounts (0x10000, 0x10000, 0x10000, 0x10000);
}