1
0
Fork 0
forked from len0rd/rockbox

Fix locked context fallthrough

Enabling locked actions for all softlock targets accidentally
broke keylock on touchscreens because the generic touchscreen
keymap was missed. Trying to lookup CONTEXT_WPS|CONTEXT_LOCKED
returned the mapping for CONTEXT_STD because the locked version
wasn't explicitly handled.

But on almost all cases, a context's keymap does not change when
the screen is locked. It makes more sense to mask out the locked
flag and only check for it where needed.

Change-Id: I65cda2de82950d272d4394fd772286699e7c3779
This commit is contained in:
Aidan MacDonald 2023-03-17 23:43:39 +00:00
parent 0c29d1788e
commit a0a59ab610
17 changed files with 20 additions and 66 deletions

View file

@ -383,7 +383,7 @@ const struct button_mapping* get_context_mapping(int context)
return target_get_context_mapping(context & ~CONTEXT_CUSTOM2);
}
switch (context)
switch (context & ~CONTEXT_LOCKED)
{
case CONTEXT_STD:
return button_context_standard;