aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2016-01-17 21:26:04 +0100
committerChris "Koying" Browet <cbro@semperpax.com>2016-01-20 19:24:22 +0100
commit54196042b7281702a9d28bbc8d5279974f6a760d (patch)
tree205f9c3ab15363b10e853f8ceb6aa875eeb89186
parent9d50c197baa8ea86c150e178e69d79ea8c23a3f3 (diff)
FIX: [longpress] fixes ghost repeat
-rw-r--r--xbmc/input/InputManager.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp
index 1eaffc25da..3345a3d906 100644
--- a/xbmc/input/InputManager.cpp
+++ b/xbmc/input/InputManager.cpp
@@ -480,8 +480,13 @@ bool CInputManager::OnEvent(XBMC_Event& newEvent)
case XBMC_KEYUP:
m_Keyboard.ProcessKeyUp();
if (m_LastKey.GetButtonCode() != KEY_INVALID && !(m_LastKey.GetButtonCode() & CKey::MODIFIER_LONG))
- OnKey(m_LastKey);
- m_LastKey.Reset();
+ {
+ CKey key = m_LastKey;
+ m_LastKey.Reset(); // OnKey is reentrant; need to do this before entering
+ OnKey(key);
+ }
+ else
+ m_LastKey.Reset();
break;
case XBMC_MOUSEBUTTONDOWN:
case XBMC_MOUSEBUTTONUP: