summaryrefslogtreecommitdiff
path: root/indra/llwindow/llkeyboardwin32.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-07-12 10:08:56 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-07-12 10:08:56 -0400
commit73d90aa9dd87986dc2ef8f39db346b71c58b181b (patch)
treea2ec930f732aaed7d7addbb22bb34b15c78d408b /indra/llwindow/llkeyboardwin32.cpp
parent8e70575be833cf2056b1ceef7ef842cbc7700ce0 (diff)
parente80f0f331dbfca686e0a80c557e9b1e455c8d167 (diff)
SL-18837: Merge branch 'DRTVWR-587-maint-V' into rm-cxxstd.
Diffstat (limited to 'indra/llwindow/llkeyboardwin32.cpp')
-rw-r--r--indra/llwindow/llkeyboardwin32.cpp24
1 files changed, 1 insertions, 23 deletions
diff --git a/indra/llwindow/llkeyboardwin32.cpp b/indra/llwindow/llkeyboardwin32.cpp
index 2123ed3939..4c207faa81 100644
--- a/indra/llwindow/llkeyboardwin32.cpp
+++ b/indra/llwindow/llkeyboardwin32.cpp
@@ -247,31 +247,9 @@ void LLKeyboardWin32::scanKeyboard()
{
S32 key;
MSG msg;
- BOOL pending_key_events = PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD);
+ PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_NOREMOVE | PM_NOYIELD);
for (key = 0; key < KEY_COUNT; key++)
{
- // On Windows, verify key down state. JC
- // RN: only do this if we don't have further key events in the queue
- // as otherwise there might be key repeat events still waiting for this key we are now dumping
- if (!pending_key_events && mKeyLevel[key])
- {
- // *TODO: I KNOW there must be a better way of
- // interrogating the key state than this, using async key
- // state can cause ALL kinds of bugs - Doug
- if ((key < KEY_BUTTON0) && ((key < '0') || (key > '9')))
- {
- // ...under windows make sure the key actually still is down.
- // ...translate back to windows key
- U16 virtual_key = inverseTranslateExtendedKey(key);
- // keydown in highest bit
- if (!pending_key_events && !(GetAsyncKeyState(virtual_key) & 0x8000))
- {
- //LL_INFOS() << "Key up event missed, resetting" << LL_ENDL;
- mKeyLevel[key] = FALSE;
- }
- }
- }
-
// Generate callback if any event has occurred on this key this frame.
// Can't just test mKeyLevel, because this could be a slow frame and
// key might have gone down then up. JC