````
bool visible;

if(streams.empty() ...) {
  visible = false;
  ...
} else {
  visible = CMediaSettings::Get().GetCurrentVideoSettings().m_SubtitleOn;
  ...
}
....
for(...) {
  if(forced)
    visible = true;
}

if(!valid)
  visible = false;

SetSubtitleVisibleInternal(visible)
````