mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Fixed bug 3950 - Don't always call dbus_shutdown in SDL_DBus
Alexander Larsson dbus_shutdown() is a debug feature which closes all global resources in the dbus library. Calling this should be done by the app, not a library, because if there are multiple users of dbus in the process then SDL could shut it down even though another part is using it. For example, i had an issue with this in mGBA, which uses both Qt and SDL, both using libdbus. I had a session bus, but no system bus (this was in a flatpak sandbox), and when SDL_DBus_Init() failed to init the system bus it called dbus_shudown() and continued on. This caused issues for Qt when running due to its session bus connections having disappeared beneath it.
This commit is contained in:
parent
4ff16ba3a4
commit
714085d327
@ -139,9 +139,14 @@ SDL_DBus_Quit(void)
|
|||||||
dbus.connection_close(dbus.session_conn);
|
dbus.connection_close(dbus.session_conn);
|
||||||
dbus.connection_unref(dbus.session_conn);
|
dbus.connection_unref(dbus.session_conn);
|
||||||
}
|
}
|
||||||
|
/* Don't do this - bug 3950
|
||||||
|
dbus_shutdown() is a debug feature which closes all global resources in the dbus library. Calling this should be done by the app, not a library, because if there are multiple users of dbus in the process then SDL could shut it down even though another part is using it.
|
||||||
|
*/
|
||||||
|
#if 0
|
||||||
if (dbus.shutdown) {
|
if (dbus.shutdown) {
|
||||||
dbus.shutdown();
|
dbus.shutdown();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
SDL_zero(dbus);
|
SDL_zero(dbus);
|
||||||
UnloadDBUSLibrary();
|
UnloadDBUSLibrary();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user