mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
Add ability to set number of concurrent downloads
This commit is contained in:
parent
4f9be2ae72
commit
d48bc96cf9
1 changed files with 8 additions and 1 deletions
|
@ -739,7 +739,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) :
|
||||||
connect(&identityPacketTimer, &QTimer::timeout, getMyAvatar(), &MyAvatar::sendIdentityPacket);
|
connect(&identityPacketTimer, &QTimer::timeout, getMyAvatar(), &MyAvatar::sendIdentityPacket);
|
||||||
identityPacketTimer.start(AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS);
|
identityPacketTimer.start(AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS);
|
||||||
|
|
||||||
ResourceCache::setRequestLimit(MAX_CONCURRENT_RESOURCE_DOWNLOADS);
|
const char** constArgv = const_cast<const char**>(argv);
|
||||||
|
QString concurrentDownloadsStr = getCmdOption(argc, constArgv, "--concurrent-downloads");
|
||||||
|
bool success;
|
||||||
|
int concurrentDownloads = concurrentDownloadsStr.toInt(&success);
|
||||||
|
if (!success) {
|
||||||
|
concurrentDownloads = MAX_CONCURRENT_RESOURCE_DOWNLOADS;
|
||||||
|
}
|
||||||
|
ResourceCache::setRequestLimit(concurrentDownloads);
|
||||||
|
|
||||||
_glWidget = new GLCanvas();
|
_glWidget = new GLCanvas();
|
||||||
getApplicationCompositor().setRenderingWidget(_glWidget);
|
getApplicationCompositor().setRenderingWidget(_glWidget);
|
||||||
|
|
Loading…
Reference in a new issue