src/core/linux/SDL_dbus.c
changeset 9699 8e0e18edb270
parent 9646 9d4917e2d909
child 9998 f67cf37e9cd4
equal deleted inserted replaced
9698:bf0257e323d2 9699:8e0e18edb270
    28 static void *dbus_handle = NULL;
    28 static void *dbus_handle = NULL;
    29 static unsigned int screensaver_cookie = 0;
    29 static unsigned int screensaver_cookie = 0;
    30 static SDL_DBusContext dbus = {0};
    30 static SDL_DBusContext dbus = {0};
    31 
    31 
    32 static int
    32 static int
    33 load_dbus_syms(void)
    33 LoadDBUSSyms(void)
    34 {
    34 {
    35     #define SDL_DBUS_SYM2(x, y) \
    35     #define SDL_DBUS_SYM2(x, y) \
    36         if (!(dbus.x = SDL_LoadFunction(dbus_handle, #y))) return -1
    36         if (!(dbus.x = SDL_LoadFunction(dbus_handle, #y))) return -1
    37         
    37         
    38     #define SDL_DBUS_SYM(x) \
    38     #define SDL_DBUS_SYM(x) \
    93         dbus_handle = SDL_LoadObject(dbus_library);
    93         dbus_handle = SDL_LoadObject(dbus_library);
    94         if (dbus_handle == NULL) {
    94         if (dbus_handle == NULL) {
    95             retval = -1;
    95             retval = -1;
    96             /* Don't call SDL_SetError(): SDL_LoadObject already did. */
    96             /* Don't call SDL_SetError(): SDL_LoadObject already did. */
    97         } else {
    97         } else {
    98             retval = load_dbus_syms();
    98             retval = LoadDBUSSyms();
    99             if (retval < 0) {
    99             if (retval < 0) {
   100                 UnloadDBUSLibrary();
   100                 UnloadDBUSLibrary();
   101             }
   101             }
   102         }
   102         }
   103     }
   103     }