From 00fd192ead940429913475ecbb32b605e73b9af9 Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sat, 10 Nov 2012 12:49:22 +0100 Subject: [PATCH] Fix remotelinux clearbuffer --- remotelinux.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remotelinux.cc b/remotelinux.cc index 0a93201..fad7baf 100644 --- a/remotelinux.cc +++ b/remotelinux.cc @@ -300,7 +300,10 @@ UCHAR RemoteLinux::getButtonPress(int waitType) { void RemoteLinux::clearBuffer() { - while(getButtonPress(3) != NA_NONE); + UCHAR buttonpress=getButtonPress(3); + while(buttonpress != NA_NONE && buttonpress!=NA_UNKNOWN){ + buttonpress=getButtonPress(3); + }; } UCHAR RemoteLinux::TranslateHWCFixed(ULLONG code) -- 2.39.2