mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Tidy and document DDE face tracker UDP socket opening and closing
This commit is contained in:
parent
8d9685ee39
commit
f169ab1238
1 changed files with 2 additions and 5 deletions
|
@ -93,13 +93,10 @@ void DdeFaceTracker::update() {
|
|||
}
|
||||
|
||||
void DdeFaceTracker::setEnabled(bool enabled) {
|
||||
// isOpen() does not work as one might expect on QUdpSocket; don't test isOpen() before closing socket.
|
||||
_udpSocket.close();
|
||||
if (enabled) {
|
||||
if (_udpSocket.isOpen()) {
|
||||
_udpSocket.close();
|
||||
}
|
||||
_udpSocket.bind(_host, _port);
|
||||
} else {
|
||||
_udpSocket.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue