From 67e79c063fd3f761d8fd248c4b22e98579abe9d7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 23 Aug 2007 02:54:34 +0000 Subject: [PATCH] compile right w/wx 2.6 --- wx/speed-stats.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/wx/speed-stats.cc b/wx/speed-stats.cc index 8f89ef7b5..d96fdaf77 100644 --- a/wx/speed-stats.cc +++ b/wx/speed-stats.cc @@ -83,7 +83,8 @@ SpeedStats :: OnPaint( wxPaintEvent& WXUNUSED(event) ) const int per_bar = top / num_bars; // clear - wxMemoryDC memDC( *myBitmap ); + wxMemoryDC memDC; + memDC.SelectObject( *myBitmap ); memDC.SetBackground( myColors[BACKGROUND] ); memDC.Clear( ); @@ -183,12 +184,12 @@ SpeedStats :: Pulse( tr_handle_t * handle ) Speed s; s.time = time( NULL ); s.allUp = s.time % 30;//allUp; - s.allDown = s.time % 15;//allDown; - //if( myTorrent ) { - //const tr_stat_t * stat = tr_torrentStat( myTorrent ); - s.torrentUp = s.time % 40;//stat->rateUpload; - s.torrentDown = s.time % 25;//stat->rateDownload; - //} + s.allDown = allDown; + if( myTorrent ) { + const tr_stat_t * stat = tr_torrentStat( myTorrent ); + s.torrentUp = stat->rateUpload; + s.torrentDown = stat->rateDownload; + } myStats.push_back( s ); // age off old data