1
0
Fork 0

Fix: Crash when pressing arrow keys in bootstrap mode (#12948)

pull/12951/head
Jonathan G Rennison 2024-09-18 21:41:54 +01:00 committed by GitHub
parent fe49dec527
commit 1e3855c9c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}