DREAMWEB: report click only once, this fixes phantom clicks after loading or between screens.

This commit is contained in:
Vladimir Menshakov 2011-06-13 13:30:02 +04:00 committed by Alyssa Milburn
parent d69e437d42
commit 93cf9993ea
2 changed files with 6 additions and 1 deletions

View File

@ -67,6 +67,7 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam
_outSaveFile = 0;
_inSaveFile = 0;
_speed = 1;
_oldMouseState = 0;
}
DreamWebEngine::~DreamWebEngine() {
@ -270,7 +271,10 @@ void DreamWebEngine::mouseCall() {
pos.y = 184;
_context.cx = pos.x;
_context.dx = pos.y;
_context.bx = eventMan->getButtonState();
unsigned state = eventMan->getButtonState();
_context.bx = state == _oldMouseState? 0: state;
_oldMouseState = state;
}
void DreamWebEngine::setGraphicsMode() {

View File

@ -114,6 +114,7 @@ private:
Common::InSaveFile *_inSaveFile;
uint _speed;
uint _oldMouseState;
dreamgen::Context _context;
};