$OpenBSD: patch-plugins_c,v 1.7 2016/09/13 08:48:12 dcoppa Exp $
--- plugins.c.orig	Sun Jun 19 13:26:18 2016
+++ plugins.c	Thu Sep  8 08:25:07 2016
@@ -750,7 +750,7 @@ load_gui_plugin (const char **plugdirs) {
 #endif
 
     char conf_gui_plug[100];
-    conf_get_str ("gui_plugin", "GTK2", conf_gui_plug, sizeof (conf_gui_plug));
+    conf_get_str ("gui_plugin", "GTK3", conf_gui_plug, sizeof (conf_gui_plug));
     char name[100];
 
     // try to load selected plugin
@@ -917,7 +917,6 @@ plug_load_all (void) {
 #ifndef ANDROID
     char *xdg_local_home = getenv ("XDG_LOCAL_HOME");
     char xdg_plugin_dir[1024];
-    char xdg_plugin_dir_explicit_arch[1024];
 
     if (xdg_local_home) {
         strncpy (xdg_plugin_dir, xdg_local_home, sizeof (xdg_plugin_dir));
@@ -938,16 +937,11 @@ plug_load_all (void) {
                 trace ("warning: XDG_LOCAL_HOME value is too long: %s. Ignoring.", xdg_local_home);
                 xdg_plugin_dir[0] = 0;
             }
-            written = snprintf (xdg_plugin_dir_explicit_arch, sizeof (xdg_plugin_dir_explicit_arch), "%s/.local/lib%d/deadbeef", homedir, (int)(sizeof (long) * 8));
-            if (written > sizeof (xdg_plugin_dir_explicit_arch)) {
-                trace ("warning: XDG_LOCAL_HOME value is too long: %s. Ignoring.", xdg_local_home);
-                xdg_plugin_dir_explicit_arch[0] = 0;
-            }
         }
     }
 
     // load from HOME 1st, than replace from installdir if needed
-    const char *plugins_dirs[] = { xdg_plugin_dir_explicit_arch, xdg_plugin_dir, dirname, NULL };
+    const char *plugins_dirs[] = { xdg_plugin_dir, dirname, NULL };
 
     // If xdg_plugin_dir and dirname is the same, we should avoid each plugin
     // to be load twice.
@@ -1288,8 +1282,10 @@ plug_select_output (void) {
     return 0;
 #else
     char outplugname[100];
-#ifdef HAVE_COCOAUI
+#if defined(HAVE_COCOAUI)
     conf_get_str ("output_plugin", "CoreAudio", outplugname, sizeof (outplugname));
+#elif defined(HAVE_SNDIO)
+    conf_get_str ("output_plugin", "sndio output plugin", outplugname, sizeof (outplugname));
 #else
     conf_get_str ("output_plugin", "ALSA output plugin", outplugname, sizeof (outplugname));
 #endif
@@ -1334,8 +1330,10 @@ plug_reinit_sound (void) {
 
     if (plug_select_output () < 0) {
         char outplugname[100];
-#ifdef HAVE_COCOAUI
+#if defined(HAVE_COCOAUI)
         conf_get_str ("output_plugin", "core audio output plugin", outplugname, sizeof (outplugname));
+#elif defined(HAVE_SNDIO)
+        conf_get_str ("output_plugin", "sndio output plugin", outplugname, sizeof (outplugname));
 #else
         conf_get_str ("output_plugin", "ALSA output plugin", outplugname, sizeof (outplugname));
 #endif
