diff options
author | Simon Rettberg | 2016-10-28 16:14:07 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-10-28 16:14:07 +0200 |
commit | 6decac6613fef21869784df0d83a0b7c7d1c2008 (patch) | |
tree | fa453e3262039851cf79809569a6446e91cfb595 /src/client/net/serverconnection.cpp | |
parent | [client] Fix memleak (diff) | |
download | pvs2-6decac6613fef21869784df0d83a0b7c7d1c2008.tar.gz pvs2-6decac6613fef21869784df0d83a0b7c7d1c2008.tar.xz pvs2-6decac6613fef21869784df0d83a0b7c7d1c2008.zip |
[client] Allow ESC key to cancel projection in hybrid mode
Diffstat (limited to 'src/client/net/serverconnection.cpp')
-rw-r--r-- | src/client/net/serverconnection.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/client/net/serverconnection.cpp b/src/client/net/serverconnection.cpp index 448b200..46f2538 100644 --- a/src/client/net/serverconnection.cpp +++ b/src/client/net/serverconnection.cpp @@ -262,15 +262,28 @@ void ServerConnection::handleMsg() } } else if (id == _LOCK) { const bool enable = (_fromServer.getFieldString("ENABLE").toInt() != 0); - if (enable) + if (enable && !clientApp->isConnectedToLocalManager()) { _blank->lock(_fromServer.getFieldString("MESSAGE")); - else + } else { _blank->unlock(); + } } else if (id == _ATTENTION) { emit attentionChanged(_fromServer.getFieldString(_ENABLE) == __TRUE); } } +void ServerConnection::checkLocalConnection() +{ + if (_socket == NULL) { + return; + } + if (_socket->peerAddress() == _socket->localAddress()) { + _isLocalConnection = 1; + } else { + _isLocalConnection = 0; + } +} + /* * Override */ |