mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Game browser: Backspace goes up a directory, Windows raw input flags key repeats
With no type-to-search active, Backspace goes to the parent directory. Never on a repeat, so holding it doesn't climb to the root. Not every platform flags repeats, so the browser also tracks whether it's held. Windows raw input now flags auto-repeated key downs as IS_REPEAT, like Android and UWP, and forgets the held keys it releases on losing focus. The UI drops OS repeats of a key it's already repeating itself, so held arrows don't double up (they were dropped before too, a step later). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
193dd01c32
commit
b0382ed91a
5 files changed
+36
-3
No files matched your search
@@ -781,6 +781,22 @@ bool GameBrowser::Key(const KeyInput &input) {
|
||||
}
|
||||
}
|
||||
|
||||
// Backspace with no search going also goes to the parent directory, as in file managers. Never on
|
||||
// a repeat, or holding it would climb to the root (or carry on up after clearing a search). Not
|
||||
// every platform flags repeats, so this also tracks whether it's held.
|
||||
if (input.keyCode == NKCODE_DEL && input.deviceId == DEVICE_ID_KEYBOARD) {
|
||||
if (input.flags & KeyInputFlags::UP) {
|
||||
backspaceHeld_ = false;
|
||||
} else if (input.flags & KeyInputFlags::DOWN) {
|
||||
const bool repeat = backspaceHeld_ || (input.flags & KeyInputFlags::IS_REPEAT);
|
||||
backspaceHeld_ = true;
|
||||
if (!repeat && search_.searchFilter.empty() && (browseFlags_ & BrowseFlags::NAVIGATE) && path_.CanNavigateUp()) {
|
||||
NavigateUp();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool retval = LinearLayout::Key(input);
|
||||
if (retval) {
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user