(svn r1734) - Fix: [ 1112253 ] hijacking of arrow keys, game also scrolled when it was out of focus (dominik)

This commit is contained in:
darkvater
2005-01-30 16:54:39 +00:00
parent 8580e73b65
commit 1527ef3db0
4 changed files with 13 additions and 8 deletions

View File

@@ -2202,7 +2202,7 @@ static void StatusBarWndProc(Window *w, WindowEvent *e)
}
}
void ScrollMainViewport(int x, int y)
static void ScrollMainViewport(int x, int y)
{
if (_game_mode != GM_MENU) {
Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
@@ -2250,7 +2250,7 @@ static const int8 scrollamt[16][2] = {
void HandleKeyScrolling(void)
{
if (_dirkeys) {
if (_dirkeys && _iconsole_win == NULL) {
int factor = _shift_pressed ? 50 : 10;
ScrollMainViewport(scrollamt[_dirkeys][0] * factor, scrollamt[_dirkeys][1] * factor);
}