fix libXrandr library name and load sndio
use OpenBSD joypad class
suspend X11 screensaver for release builds

Index: platform/x11/os_x11.cpp
--- platform/x11/os_x11.cpp.orig
+++ platform/x11/os_x11.cpp
@@ -55,6 +55,10 @@
 #include <X11/extensions/Xinerama.h>
 #include <X11/extensions/shape.h>
 
+#ifdef SUSPEND_SCREENSAVER
+#include <X11/extensions/scrnsaver.h>
+#endif
+
 // ICCCM
 #define WM_NormalState 1L // window normal state
 #define WM_IconicState 3L // window minimized
@@ -219,7 +223,7 @@ Error OS_X11::initialize(const VideoMode &p_desired, i
 	int xrandr_minor = 0;
 	int event_base, error_base;
 	xrandr_ext_ok = XRRQueryExtension(x11_display, &event_base, &error_base);
-	xrandr_handle = dlopen("libXrandr.so.2", RTLD_LAZY);
+	xrandr_handle = dlopen("libXrandr.so", RTLD_LAZY);
 	if (!xrandr_handle) {
 		err = dlerror();
 		// For some arcane reason, NetBSD now ships libXrandr.so.3 while the rest of the world has libXrandr.so.2...
@@ -664,9 +668,13 @@ Error OS_X11::initialize(const VideoMode &p_desired, i
 
 	window_has_focus = true; // Set focus to true at init
 #ifdef JOYDEV_ENABLED
-	joypad = memnew(JoypadLinux(input));
+	joypad = memnew(JoypadOpenBSD(input));
 #endif
 
+#ifdef SUSPEND_SCREENSAVER
+	XScreenSaverSuspend(x11_display, true);
+#endif
+
 	power_manager = memnew(PowerX11);
 
 	if (p_desired.layered) {
@@ -4474,6 +4482,11 @@ void OS_X11::update_real_mouse_position() {
 }
 
 OS_X11::OS_X11() {
+
+#ifdef SNDIO_ENABLED
+	AudioDriverManager::add_driver(&driver_sndio);
+#endif
+
 #ifdef PULSEAUDIO_ENABLED
 	AudioDriverManager::add_driver(&driver_pulseaudio);
 #endif
