mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Call dbus_shutdown to make valgrind happy.
This commit is contained in:
parent
1ee96bb994
commit
1c6cd67819
@ -67,6 +67,7 @@ load_dbus_syms(void)
|
||||
SDL_DBUS_SYM(error_free);
|
||||
SDL_DBUS_SYM(get_local_machine_id);
|
||||
SDL_DBUS_SYM(free);
|
||||
SDL_DBUS_SYM(shutdown);
|
||||
|
||||
#undef SDL_DBUS_SYM
|
||||
#undef SDL_DBUS_SYM2
|
||||
@ -106,7 +107,7 @@ LoadDBUSLibrary(void)
|
||||
void
|
||||
SDL_DBus_Init(void)
|
||||
{
|
||||
if (LoadDBUSLibrary() != -1) {
|
||||
if (!dbus.session_conn && LoadDBUSLibrary() != -1) {
|
||||
DBusError err;
|
||||
dbus.error_init(&err);
|
||||
dbus.session_conn = dbus.bus_get_private(DBUS_BUS_SESSION, &err);
|
||||
@ -128,6 +129,7 @@ SDL_DBus_Quit(void)
|
||||
if (dbus.session_conn) {
|
||||
dbus.connection_close(dbus.session_conn);
|
||||
dbus.connection_unref(dbus.session_conn);
|
||||
dbus.shutdown();
|
||||
SDL_memset(&dbus, 0, sizeof(dbus));
|
||||
}
|
||||
UnloadDBUSLibrary();
|
||||
|
@ -63,6 +63,7 @@ typedef struct SDL_DBusContext {
|
||||
void (*error_free)(DBusError *);
|
||||
char *(*get_local_machine_id)(void);
|
||||
void (*free)(void *);
|
||||
void (*shutdown)(void);
|
||||
|
||||
} SDL_DBusContext;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user