mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 19:32:11 +00:00
SCUMM HE: Fix network start at the game start
This commit is contained in:
parent
e6d9148061
commit
a43381cf99
@ -547,6 +547,11 @@ bool Net::remoteReceiveData() {
|
||||
void Net::remoteReceiveDataCallback(Common::JSONValue *response) {
|
||||
debug(1, "remoteReceiveData: Got: '%s'", response->stringify().c_str());
|
||||
|
||||
if (!response->hasChild("size")) {
|
||||
warning("Net::remoteReceiveDataCallback(): invalid response");
|
||||
return;
|
||||
}
|
||||
|
||||
_packetsize = response->child("size")->asIntegerNumber();
|
||||
|
||||
if (!_packetsize)
|
||||
@ -565,6 +570,9 @@ void Net::unpackageArray(int arrayId, byte *data, int len) {
|
||||
|
||||
|
||||
void Net::doNetworkOnceAFrame(int msecs) {
|
||||
if (_sessionid == -1 || _myUserId == -1)
|
||||
return;
|
||||
|
||||
uint32 tickCount = g_system->getMillis() + msecs;
|
||||
|
||||
while (remoteReceiveData()) {
|
||||
|
Loading…
Reference in New Issue
Block a user