From 04351a18f6a22c35ff0381fb5abdcc9d56a1fcd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 15 Jul 2023 22:22:06 +0200 Subject: [PATCH 1/2] Address feedback --- Common/UI/Root.cpp | 6 +++++- UI/GameInfoCache.cpp | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Common/UI/Root.cpp b/Common/UI/Root.cpp index 3a34aff6f0..3bf4904196 100644 --- a/Common/UI/Root.cpp +++ b/Common/UI/Root.cpp @@ -257,7 +257,11 @@ KeyEventResult UnsyncKeyEvent(const KeyInput &key, ViewGroup *root) { retval = KeyEventResult::PASS_THROUGH; break; default: - retval = KeyEventResult::ACCEPT; + if (!(key.flags & KEY_IS_REPEAT)) { + // If a repeat, we follow what KeyEventToFocusMoves set it to. + // Otherwise we signal that we used the key, always. + retval = KeyEventResult::ACCEPT; + } break; } return retval; diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index 3a36e5886c..d7d181f098 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -602,8 +602,7 @@ handleELF: info_->pic1.dataLoaded = ReadFileToString(&umd, "/PSP_GAME/PIC1.PNG", &info_->pic1.data, nullptr); } if (info_->wantFlags & GAMEINFO_WANTSND) { - ReadFileToString(&umd, "/PSP_GAME/SND0.AT3", &info_->sndFileData, nullptr); - info_->sndDataLoaded = true; + info_->sndDataLoaded = ReadFileToString(&umd, "/PSP_GAME/SND0.AT3", &info_->sndFileData, nullptr); } } From ebc0afc8289c67fc61d2c90c9a82ce65454c1ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 16 Jul 2023 00:20:55 +0200 Subject: [PATCH 2/2] Remove some logging --- Common/UI/Root.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Common/UI/Root.cpp b/Common/UI/Root.cpp index 3bf4904196..82b22de0a9 100644 --- a/Common/UI/Root.cpp +++ b/Common/UI/Root.cpp @@ -141,16 +141,13 @@ static void MoveFocus(ViewGroup *root, FocusDirection direction) { return; } - NeighborResult neigh; - neigh = root->FindNeighbor(focusedView, direction, neigh); + NeighborResult neigh = root->FindNeighbor(focusedView, direction, neigh); if (neigh.view) { neigh.view->SetFocus(); root->SubviewFocused(neigh.view); PlayUISound(UISound::SELECT); - } else { - INFO_LOG(SCECTRL, "No neighbor view"); } }