summaryrefslogtreecommitdiff
path: root/gtk2_ardour/au_pluginui.mm
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-05-04 17:38:10 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-04 17:38:26 -0400
commit6a8b177f06ee1213cefc7408a67b0ed1e315460d (patch)
tree176dde9681f23cd200969f665fb2e16dd5558c4e /gtk2_ardour/au_pluginui.mm
parent8882ef79d3b4a536daa00e3a20e2c50e0c49bbe8 (diff)
don't bother compiling nsview code swizzling for PPC
The platform has no support for libdispatch which is handy when setting up an objective C block, and also has no Retina, which means it doesn't suffer the problem this code is intended to fix
Diffstat (limited to 'gtk2_ardour/au_pluginui.mm')
-rw-r--r--gtk2_ardour/au_pluginui.mm19
1 files changed, 17 insertions, 2 deletions
diff --git a/gtk2_ardour/au_pluginui.mm b/gtk2_ardour/au_pluginui.mm
index 7af4b8dd97..f2153aec6a 100644
--- a/gtk2_ardour/au_pluginui.mm
+++ b/gtk2_ardour/au_pluginui.mm
@@ -206,12 +206,25 @@ dump_view_tree (NSView* view, int depth, int maxdepth)
* certainly be possible to make it work for Ardour.
*/
-static IMP original_nsview_drawIfNeeded;
-static std::vector<id> plugin_views;
static uint32_t block_plugin_redraws = 0;
static const uint32_t minimum_redraw_rate = 30; /* frames per second */
static const uint32_t block_plugin_redraw_count = 15; /* number of combined plugin redraws to block, if blocking */
+#ifdef __ppc
+
+/* PowerPC versions of OS X do not support libdispatch, which we use below when swizzling objective C. But they also don't have Retina
+ * which is the underlying reason for this code. So just skip it on those CPUs.
+ */
+
+
+static void add_plugin_view (id view) {}
+static void remove_plugin_view (id view) {}
+
+#else
+
+static IMP original_nsview_drawIfNeeded;
+static std::vector<id> plugin_views;
+
static void add_plugin_view (id view)
{
if (plugin_views.empty()) {
@@ -264,6 +277,8 @@ static void interposed_drawIfNeeded (id receiver, SEL selector, NSRect rect)
@end
+#endif /* __ppc */
+
/* END OF THE PLUGIN REDRAW HACK */
@implementation NotificationObject