Add Recent Files menu option.

key (backtick/grave) or select button.
This commit is contained in:
nanner55
2019-12-28 10:53:31 -08:00
committed by sorgelig
parent 790ae63a2a
commit 3438ffd7ca
7 changed files with 476 additions and 9 deletions

View File

@@ -2182,6 +2182,15 @@ static void input_cb(struct input_event *ev, struct input_absinfo *absinfo, int
return;
}
// Recent Files menu
// FIXME: temporary pass through of select joypad button. unsure of the best way to do this.
// updates here may require changes in menu.cpp to match the key mapping
if (ev->code == input[dev].mmap[SYS_BTN_SELECT] && !osd_event) {
struct input_event key_ev = *ev;
key_ev.code = KEY_GRAVE;
input_cb(&key_ev, 0, 0);
}
for (int i = 0; i < SYS_BTN_A; i++)
{
if (ev->code == input[dev].mmap[i])