Browse Source

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

tags/2021-05-28
jules 12 years ago
parent
commit
06e2a667fb
7 changed files with 15 additions and 16 deletions
  1. +2
    -2
      extras/Introjucer/Source/Application/jucer_Application.h
  2. +1
    -0
      extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h
  3. +1
    -0
      extras/Introjucer/Source/Project/jucer_AudioPluginModule.h
  4. +1
    -1
      extras/JuceDemo/Builds/Android/AndroidManifest.xml
  5. +1
    -2
      modules/juce_core/memory/juce_HeapBlock.h
  6. +1
    -1
      modules/juce_core/system/juce_PlatformDefs.h
  7. +8
    -10
      modules/juce_gui_basics/windows/juce_AlertWindow.cpp

+ 2
- 2
extras/Introjucer/Source/Application/jucer_Application.h 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...");


+ 1
- 0
extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Android.h 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());


+ 1
- 0
extras/Introjucer/Source/Project/jucer_AudioPluginModule.h 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)));


+ 1
- 1
extras/JuceDemo/Builds/Android/AndroidManifest.xml 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"/>


+ 1
- 2
modules/juce_core/memory/juce_HeapBlock.h 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!
};


+ 1
- 1
modules/juce_core/system/juce_PlatformDefs.h 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


+ 8
- 10
modules/juce_gui_basics/windows/juce_AlertWindow.cpp 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);
}


Loading…
Cancel
Save