]> git.proxmox.com Git - mirror_edk2.git/commit - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c
ShellPkg/[hex]edit: Fix mouse freeze issue
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 13 Mar 2018 07:39:47 +0000 (15:39 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 14 Mar 2018 03:25:44 +0000 (11:25 +0800)
commit58793b8838f500955c8a7a548b4b450e81798f6e
tree667d3ef18e2f644e2fb99ebe301a7aa81a749e9a
parent81feb6d3059d6dfdfecd47f6b1f0c7d2b9f66e65
ShellPkg/[hex]edit: Fix mouse freeze issue

In edit or hexedit, the mouse cursor doesn't move when moving
the mouse.
The root cause is 5563281fa2b31093a1cbd415553b9264c5136e89
* ShellPkg/[hex]edit: use SimpleTextInEx to read console
wrongly uses WaitForEvent() to listen keyboard input.
It blocks the code execution when there is no keyboard input.
While the same function also polls the mouse move status,
the mouse movement cannot be reflected to the screen when
there is no keyboard input.

The patch fixes the issue by use CheckEvent() instead of
WaitForEvent().

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/MainTextEditor.c
ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/MainHexEditor.c