diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-01 01:40:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 01:18:54 +0300 |
commit | 7794e6271fea1e0c0af9eacc99603f15a2f8ef79 (patch) | |
tree | 084996965982a65bbac403bc13c874cb98855b99 /src/net/tmwa/network.cpp | |
parent | 18ff3c4430f6dfad38cf2da7c417315eba53a0fc (diff) | |
download | manaplus-7794e6271fea1e0c0af9eacc99603f15a2f8ef79.tar.gz manaplus-7794e6271fea1e0c0af9eacc99603f15a2f8ef79.tar.bz2 manaplus-7794e6271fea1e0c0af9eacc99603f15a2f8ef79.tar.xz manaplus-7794e6271fea1e0c0af9eacc99603f15a2f8ef79.zip |
add ability to delay network messages dispatch.
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r-- | src/net/tmwa/network.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 5338a6f5b..fa7565e46 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -93,6 +93,7 @@ void Network::clearHandlers() void Network::dispatchMessages() { BLOCK_START("Network::dispatchMessages 1") + mPauseDispatch = false; while (messageReady()) { SDL_mutexP(mMutexIn); @@ -133,6 +134,11 @@ void Network::dispatchMessages() } skip(len); + if (mPauseDispatch) + { + BLOCK_END("Network::dispatchMessages 3") + break; + } BLOCK_END("Network::dispatchMessages 3") } BLOCK_END("Network::dispatchMessages 1") |