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

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@884 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Steven 2014-01-04 07:18:43 +00:00
parent ca56486381
commit d0cef2769f
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;