mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 15:31:39 +00:00
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:
parent
a8d8bdc5c4
commit
039de0aa6a
2 changed files with 5 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue