Browse Source

Fix compilation with libtorrent v0.14

adaptive-webui-19844
Christophe Dumez 14 years ago
parent
commit
efa1f4ebb4
  1. 2
      src/qtlibtorrent/qbtsession.cpp

2
src/qtlibtorrent/qbtsession.cpp

@ -389,8 +389,10 @@ void QBtSession::configureSession() {
sessionSettings.cache_size = pref.diskCacheSize()*64; sessionSettings.cache_size = pref.diskCacheSize()*64;
qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB"; qDebug() << "Using a disk cache size of" << pref.diskCacheSize() << "MiB";
// Disable OS cache to avoid memory problems (uTorrent behavior) // Disable OS cache to avoid memory problems (uTorrent behavior)
#if LIBTORRENT_VERSION_MINOR > 14
sessionSettings.disk_io_write_mode = session_settings::disable_os_cache_for_aligned_files; sessionSettings.disk_io_write_mode = session_settings::disable_os_cache_for_aligned_files;
sessionSettings.disk_io_read_mode = session_settings::disable_os_cache_for_aligned_files; sessionSettings.disk_io_read_mode = session_settings::disable_os_cache_for_aligned_files;
#endif
// Queueing System // Queueing System
if(pref.isQueueingSystemEnabled()) { if(pref.isQueueingSystemEnabled()) {
sessionSettings.active_downloads = pref.getMaxActiveDownloads(); sessionSettings.active_downloads = pref.getMaxActiveDownloads();

Loading…
Cancel
Save