Skip to content

Commit

Permalink
Minor gamescreen polish
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Feb 1, 2024
1 parent af20992 commit 13abd49
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions UI/GameScreen.cpp
Expand Up @@ -156,13 +156,14 @@ void GameScreen::CreateViews() {
}
} else {
tvTitle_ = nullptr;
tvID_ = nullptr;
tvGameSize_ = nullptr;
tvSaveDataSize_ = nullptr;
tvInstallDataSize_ = nullptr;
tvRegion_ = nullptr;
tvPlayTime_ = nullptr;
tvCRC_ = nullptr;
tvID_ = nullptr;
tvVerified_ = nullptr;
}

ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins));
Expand Down Expand Up @@ -308,8 +309,12 @@ ScreenRenderFlags GameScreen::render(ScreenRenderMode mode) {
tvGameSize_->SetText(temp);
}
if (tvSaveDataSize_) {
snprintf(temp, sizeof(temp), "%s: %s", ga->T("SaveData"), NiceSizeFormat(info->saveDataSize).c_str());
tvSaveDataSize_->SetText(temp);
if (info->saveDataSize > 0) {
snprintf(temp, sizeof(temp), "%s: %s", ga->T("SaveData"), NiceSizeFormat(info->saveDataSize).c_str());
tvSaveDataSize_->SetText(temp);
} else {
tvSaveDataSize_->SetVisibility(UI::V_GONE);
}
}
if (info->installDataSize > 0 && tvInstallDataSize_) {
snprintf(temp, sizeof(temp), "%s: %1.2f %s", ga->T("InstallData"), (float) (info->installDataSize) / 1024.f / 1024.f, ga->T("MB"));
Expand Down

0 comments on commit 13abd49

Please sign in to comment.