mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-25 14:44:28 +02:00
MdeModulePkg: Avoid key notification called more than once
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=996 Issue: In current code logic, when a key is pressed, it will search the whole NotifyList to find whether a notification has been registered with the keystroke. if yes, it will en-queue the key for notification execution later. And now if different notification functions have been registered with the same key, then the key will be en-queued more than once. Then it will cause the notification executed more than once. This patch is to enhance the code logic to fix this issue. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
f92b8ee3b7
commit
f316a26013
@ -1451,6 +1451,7 @@ KeyGetchar (
|
|||||||
//
|
//
|
||||||
PushEfikeyBufTail (&ConsoleIn->EfiKeyQueueForNotify, &KeyData);
|
PushEfikeyBufTail (&ConsoleIn->EfiKeyQueueForNotify, &KeyData);
|
||||||
gBS->SignalEvent (ConsoleIn->KeyNotifyProcessEvent);
|
gBS->SignalEvent (ConsoleIn->KeyNotifyProcessEvent);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1695,6 +1695,7 @@ UsbKeyCodeToEfiInputKey (
|
|||||||
//
|
//
|
||||||
Enqueue (&UsbKeyboardDevice->EfiKeyQueueForNotify, KeyData, sizeof (*KeyData));
|
Enqueue (&UsbKeyboardDevice->EfiKeyQueueForNotify, KeyData, sizeof (*KeyData));
|
||||||
gBS->SignalEvent (UsbKeyboardDevice->KeyNotifyProcessEvent);
|
gBS->SignalEvent (UsbKeyboardDevice->KeyNotifyProcessEvent);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -987,6 +987,7 @@ EfiKeyFiFoInsertOneKey (
|
|||||||
//
|
//
|
||||||
EfiKeyFiFoForNotifyInsertOneKey (TerminalDevice->EfiKeyFiFoForNotify, Key);
|
EfiKeyFiFoForNotifyInsertOneKey (TerminalDevice->EfiKeyFiFoForNotify, Key);
|
||||||
gBS->SignalEvent (TerminalDevice->KeyNotifyProcessEvent);
|
gBS->SignalEvent (TerminalDevice->KeyNotifyProcessEvent);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (IsEfiKeyFiFoFull (TerminalDevice)) {
|
if (IsEfiKeyFiFoFull (TerminalDevice)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user