Do not attempt to perform viewport scrolling in game bootstrap mode.

Do not increase date in bootstrap mode
This commit is contained in:
Jonathan G Rennison
2017-10-11 08:44:58 +01:00
parent 3f83546dfc
commit 5282394b04
2 changed files with 4 additions and 4 deletions

View File

@@ -291,7 +291,7 @@ void IncreaseDate()
/* increase day, and check if a new day is there? */ /* increase day, and check if a new day is there? */
_tick_counter++; _tick_counter++;
if (_game_mode == GM_MENU) return; if (_game_mode == GM_MENU || _game_mode == GM_BOOTSTRAP) return;
_date_fract++; _date_fract++;
if (_date_fract < DAY_TICKS) return; if (_date_fract < DAY_TICKS) return;

View File

@@ -2751,7 +2751,7 @@ static int _input_events_this_tick = 0;
*/ */
static void HandleAutoscroll() static void HandleAutoscroll()
{ {
if (_game_mode == GM_MENU || HasModalProgress()) return; if (_game_mode == GM_MENU || _game_mode == GM_BOOTSTRAP || HasModalProgress()) return;
if (_settings_client.gui.auto_scrolling == VA_DISABLED) return; if (_settings_client.gui.auto_scrolling == VA_DISABLED) return;
if (_settings_client.gui.auto_scrolling == VA_MAIN_VIEWPORT_FULLSCREEN && !_fullscreen) return; if (_settings_client.gui.auto_scrolling == VA_MAIN_VIEWPORT_FULLSCREEN && !_fullscreen) return;
@@ -2797,7 +2797,7 @@ extern EventState VpHandlePlaceSizingDrag();
static void ScrollMainViewport(int x, int y) static void ScrollMainViewport(int x, int y)
{ {
if (_game_mode != GM_MENU) { if (_game_mode != GM_MENU && _game_mode != GM_BOOTSTRAP) {
Window *w = FindWindowById(WC_MAIN_WINDOW, 0); Window *w = FindWindowById(WC_MAIN_WINDOW, 0);
assert(w); assert(w);
@@ -2877,7 +2877,7 @@ static void MouseLoop(MouseClick click, int mousewheel)
ViewPort *vp = IsPtInWindowViewport(w, x, y); ViewPort *vp = IsPtInWindowViewport(w, x, y);
/* Don't allow any action in a viewport if either in menu or when having a modal progress window */ /* Don't allow any action in a viewport if either in menu or when having a modal progress window */
if (vp != NULL && (_game_mode == GM_MENU || HasModalProgress())) return; if (vp != NULL && (_game_mode == GM_MENU || _game_mode == GM_BOOTSTRAP || HasModalProgress())) return;
if (mousewheel != 0) { if (mousewheel != 0) {
/* Send mousewheel event to window */ /* Send mousewheel event to window */