Enable wheel mouse in console (used to scroll up and down).

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@884 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
stevenaaus 2014-01-04 07:18:43 +00:00
parent a8d8bdc5c4
commit 039de0aa6a
2 changed files with 5 additions and 6 deletions

View file

@ -66,8 +66,8 @@ static int FilterMouseEvents (const SDL_Event *event)
switch (event->type)
{
case SDL_MOUSEMOTION:
case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP:
// case SDL_MOUSEBUTTONDOWN:
// case SDL_MOUSEBUTTONUP:
return 0;
}

View file

@ -322,16 +322,15 @@ void Key_Console (int key)
return;
case K_PGUP:
// Mouse events never reach the console, especially in windowed mode
// when mouse is released to the window manager
// case K_MWHEELUP:
// To allow (some) mouse events to reach the console, we selectively alter FilterMouseEvents
case K_MWHEELUP:
con_backscroll += keydown[K_CTRL] ? ((con_vislines>>3) - 4) : 2;
if (con_backscroll > con_totallines - (vid.height>>3) - 1)
con_backscroll = con_totallines - (vid.height>>3) - 1;
return;
case K_PGDN:
// case K_MWHEELDOWN:
case K_MWHEELDOWN:
con_backscroll -= keydown[K_CTRL] ? ((con_vislines>>3) - 4) : 2;
if (con_backscroll < 0)
con_backscroll = 0;