[dasher: 134/217] Fix for accidential start with TwoBox starter.



commit 561dd8d7adcfc436bc6b8e32c19b77b079dcfc47
Author: ipomoena <amajorek google com>
Date:   Thu Dec 3 16:49:36 2015 -0800

    Fix for accidential start with TwoBox starter.

 Src/DasherCore/TwoBoxStartHandler.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/Src/DasherCore/TwoBoxStartHandler.cpp b/Src/DasherCore/TwoBoxStartHandler.cpp
index 0f52f2d..ec870ac 100644
--- a/Src/DasherCore/TwoBoxStartHandler.cpp
+++ b/Src/DasherCore/TwoBoxStartHandler.cpp
@@ -42,7 +42,9 @@ void CTwoBoxStartHandler::Timer(unsigned long iTime, dasherint iDasherX, dasheri
   screenint iNewScreenX, iNewScreenY;
   pView->Dasher2Screen(iDasherX, iDasherY, iNewScreenX, iNewScreenY);
 
-  if((iNewScreenY >= iBoxMin) && (iNewScreenY <= iBoxMax)) {
+  if ((iNewScreenY >= iBoxMin) && (iNewScreenY <= iBoxMax) 
+         && (iNewScreenX >= 8) && (iNewScreenX <= pView->Screen()->GetWidth() - 16)
+         && pView->Screen()->IsPointVisible(iNewScreenX, iNewScreenY)) {
     if(m_iBoxEntered == std::numeric_limits<long>::max()) {
       m_iBoxEntered = iTime;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]