Fix using ESC in savedata screen. Warning fix

This commit is contained in:
Henrik Rydgård 2024-09-07 15:37:24 +02:00
parent ce4f8ba6f4
commit 48a0c0f068
3 changed files with 2 additions and 3 deletions

View file

@ -610,7 +610,7 @@ bool ZipExtractFileToMemory(struct zip *z, int fileIndex, std::string *data) {
zip_int64_t retval = zip_fread(zf, data->data(), readSize);
zip_fclose(zf);
if (retval < 0 || retval < readSize) {
if (retval < 0 || retval < (int)readSize) {
ERROR_LOG(Log::HLE, "Failed to read %d bytes from zip (%d) - archive corrupt?", (int)readSize, (int)retval);
return false;
} else {

View file

@ -155,7 +155,7 @@ void InstallZipScreen::CreateViews() {
bool InstallZipScreen::key(const KeyInput &key) {
// Ignore all key presses during download and installation to avoid user escape
if (g_GameManager.GetState() == GameManagerState::IDLE) {
return UIScreen::key(key);
return UIDialogScreen::key(key);
}
return false;
}

View file

@ -273,7 +273,6 @@ bool SavedataButton::UpdateText() {
}
void SavedataButton::UpdateText(const std::shared_ptr<GameInfo> &ginfo) {
_dbg_assert_(ginfo->Ready(GameInfoFlags::PARAM_SFO));
const std::string currentTitle = ginfo->GetTitle();
if (!currentTitle.empty()) {
title_ = CleanSaveString(currentTitle);