Only display network traffic string during connections

This commit is contained in:
simon.kagstrom 2009-11-08 09:12:46 +00:00
parent 3073af1d84
commit 2ce92d07e2
2 changed files with 9 additions and 11 deletions

View File

@ -558,17 +558,14 @@ void C64::network_vblank()
else
remote->ResetNetworkUpdate();
if (1)
{
static uint32_t last_traffic_update;
static uint32_t last_traffic_update;
if (last_time_update - last_traffic_update > 300)
{
TheDisplay->NetworkTrafficMeter(remote->GetKbps() / (8 * 1024.0),
has_throttled);
last_traffic_update = now;
has_throttled = false;
}
if (last_time_update - last_traffic_update > 300)
{
TheDisplay->NetworkTrafficMeter(remote->GetKbps() / (8 * 1024.0),
has_throttled);
last_traffic_update = now;
has_throttled = false;
}
}

View File

@ -231,7 +231,8 @@ void C64Display::Update(uint8 *src_pixels)
SDL_SoftStretch(sdl_screen, &srcrect, real_screen, &dstrect);
}
draw_string(real_screen, 0, 0, networktraffic_string, black, fill_gray);
if (this->TheC64->network_connection_type != NONE)
draw_string(real_screen, 0, 0, networktraffic_string, black, fill_gray);
if (this->on_screen_message) {
Uint32 time_now = SDL_GetTicks();