1
0
Fork 0

macOS / DBus : avoid abort on startup

Don’t do the fgOSDisableScreensave DBus stuff on macOS - there is no
global DBus daemon configured by default.
This commit is contained in:
James Turner 2019-05-27 16:05:19 +01:00
parent 88a78dd314
commit d8b6fbfef0

View file

@ -20,9 +20,9 @@
// //
// $Id$ // $Id$
#ifdef HAVE_CONFIG_H #include <config.h>
# include <config.h> #include <simgear/compiler.h>
#endif
#ifdef HAVE_DBUS #ifdef HAVE_DBUS
#include <dbus/dbus.h>//Uses the low-level libdbus rather than GDBus/QtDBus to avoid adding more dependencies than necessary. http://dbus.freedesktop.org/doc/api/html/index.html #include <dbus/dbus.h>//Uses the low-level libdbus rather than GDBus/QtDBus to avoid adding more dependencies than necessary. http://dbus.freedesktop.org/doc/api/html/index.html
#endif #endif
@ -38,7 +38,7 @@
*/ */
void fgOSDisableScreensaver() void fgOSDisableScreensaver()
{ {
#ifdef HAVE_DBUS #if defined(HAVE_DBUS) && defined(SG_UNIX) && !defined(SG_MAC)
DBusConnection *dbus_connection; DBusConnection *dbus_connection;
DBusMessage *dbus_inhibit_screenlock; DBusMessage *dbus_inhibit_screenlock;
unsigned int window_id=1000;//fake-it doesn't seem to care unsigned int window_id=1000;//fake-it doesn't seem to care