mirror of https://github.com/OpenTTD/OpenTTD
Fix: Crash when pressing arrow keys in bootstrap mode (#12948)
parent
fe49dec527
commit
1e3855c9c3
|
@ -2761,8 +2761,10 @@ static void HandleKeyScrolling()
|
|||
if (_dirkeys && !EditBoxInGlobalFocus()) {
|
||||
int factor = _shift_pressed ? 50 : 10;
|
||||
|
||||
if (_game_mode != GM_MENU && _game_mode != GM_BOOTSTRAP) {
|
||||
/* Key scrolling stops following a vehicle. */
|
||||
GetMainWindow()->viewport->follow_vehicle = INVALID_VEHICLE;
|
||||
}
|
||||
|
||||
ScrollMainViewport(scrollamt[_dirkeys][0] * factor, scrollamt[_dirkeys][1] * factor);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue