mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-07 04:49:38 +01:00
Fix: Crash when pressing arrow keys in bootstrap mode (#12948)
This commit is contained in:
parent
fe49dec527
commit
1e3855c9c3
@ -2761,8 +2761,10 @@ static void HandleKeyScrolling()
|
||||
if (_dirkeys && !EditBoxInGlobalFocus()) {
|
||||
int factor = _shift_pressed ? 50 : 10;
|
||||
|
||||
/* Key scrolling stops following a vehicle. */
|
||||
GetMainWindow()->viewport->follow_vehicle = INVALID_VEHICLE;
|
||||
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
Block a user