Adjust OSD handling for non-OSD cores.

This commit is contained in:
sorgelig
2017-10-08 21:11:26 +08:00
parent d0eef23162
commit a13782eda5
2 changed files with 3 additions and 3 deletions

4
menu.c
View File

@@ -462,7 +462,7 @@ static uint32_t menu_key_get(void)
}
// currently no key pressed
if (!c && has_menu())
if (!c)
{
static unsigned char last_but = 0;
unsigned char but = user_io_menu_button();
@@ -645,7 +645,7 @@ void HandleUI(void)
}
else
{
if (get_key_mod() & (LGUI | RGUI)) //Alt+Menu
if ((get_key_mod() & (LGUI | RGUI)) || !has_menu()) //Alt+Menu
{
menustate = MENU_8BIT_SYSTEM1;
}

View File

@@ -1749,7 +1749,7 @@ void user_io_kbd(uint16_t key, int press)
{
if (is_menu_core()) printf("PS2 code(make)%s for core: %d(0x%X)\n", (code & EXT) ? "(ext)" : "", code & 255, code & 255);
if ((has_menu() || (get_key_mod() & (LALT | RALT | RGUI | LGUI))) && (((key == KEY_F12) && (!is_x86_core() || (get_key_mod() & (RGUI | LGUI)))) || key == KEY_MENU)) menu_key_set(KEY_F12);
if ((has_menu() || osd_is_visible || (get_key_mod() & (LALT | RALT | RGUI | LGUI))) && (((key == KEY_F12) && (!is_x86_core() || (get_key_mod() & (RGUI | LGUI)))) || key == KEY_MENU)) menu_key_set(KEY_F12);
else if (osd_is_visible)
{
if (press == 1) menu_key_set(key);