Skip to content

Commit

Permalink
ENGINES: Fix mouse wheel scrolling on the console
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Apr 29, 2012
1 parent b4479fb commit 442dbf1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/engines/aurora/console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,10 @@ bool Console::processEvent(Events::Event &event) {
if (!isVisible())
return false;

if (event.type == Events::kEventMouseDown) {
if ((event.type == Events::kEventMouseDown) &&
((event.button.button != SDL_BUTTON_WHEELUP) &&
(event.button.button != SDL_BUTTON_WHEELDOWN))) {

const uint8 button = event.button.button;
const uint8 pasteMask1 = SDL_BUTTON_MMASK;
const uint8 pasteMask2 = SDL_BUTTON_LMASK | SDL_BUTTON_RMASK;
Expand All @@ -764,14 +767,20 @@ bool Console::processEvent(Events::Event &event) {
}
}

if (event.type == Events::kEventMouseMove) {
if ((event.type == Events::kEventMouseMove) &&
((event.button.button != SDL_BUTTON_WHEELUP) &&
(event.button.button != SDL_BUTTON_WHEELDOWN))) {

if (event.motion.state & SDL_BUTTON_LMASK) {
_console->stopHighlight(event.button.x, event.button.y);
return true;
}
}

if (event.type == Events::kEventMouseUp) {
if ((event.type == Events::kEventMouseUp) &&
((event.button.button != SDL_BUTTON_WHEELUP) &&
(event.button.button != SDL_BUTTON_WHEELDOWN))) {

uint32 curTime = EventMan.getTimestamp();

if (((curTime - _lastClickTime) < kDoubleClickTime) &&
Expand Down

0 comments on commit 442dbf1

Please sign in to comment.