Fix not exiting when closed
This commit is contained in:
parent
63391a3be6
commit
d902e1f747
2 changed files with 8 additions and 4 deletions
4
dbus.cpp
4
dbus.cpp
|
@ -132,6 +132,7 @@ bool MprisAPI::CanEditTracks() {
|
|||
return false;
|
||||
}
|
||||
MprisAPI::~MprisAPI() {
|
||||
connection.leaveEventLoop();
|
||||
unregisterAdaptor();
|
||||
}
|
||||
#endif
|
||||
|
@ -439,7 +440,8 @@ void DBusAPI::PlayStream(const uint32_t &idx) {
|
|||
DBusAPI::~DBusAPI() {
|
||||
#ifdef DBUS_ENABLED
|
||||
threadExitFlag.store(true);
|
||||
threadFunc.join();
|
||||
threadFunc.detach();
|
||||
connection.leaveEventLoop();
|
||||
unregisterAdaptor();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -67,6 +67,8 @@ namespace Looper::Options {
|
|||
}
|
||||
}
|
||||
path = parent_path;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
save_options();
|
||||
|
|
Loading…
Reference in a new issue