Merge branch 'master' into jgrpp

# Conflicts:
#	src/company_cmd.cpp
#	src/core/geometry_func.cpp
#	src/date.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/settings_type.h
#	src/video/allegro_v.cpp
#	src/video/dedicated_v.cpp
#	src/video/null_v.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
This commit is contained in:
Jonathan G Rennison
2021-02-19 15:38:34 +00:00
176 changed files with 4275 additions and 3826 deletions

View File

@@ -2182,8 +2182,8 @@ void ResizeWindow(Window *w, int delta_x, int delta_y, bool clamp_to_screen)
* the resolution clamp it in such a manner that it stays within the bounds. */
int new_right = w->left + w->width + delta_x;
int new_bottom = w->top + w->height + delta_y;
if (new_right >= (int)_cur_resolution.width) delta_x -= Ceil(new_right - _cur_resolution.width, std::max(1U, w->nested_root->resize_x));
if (new_bottom >= (int)_cur_resolution.height) delta_y -= Ceil(new_bottom - _cur_resolution.height, std::max(1U, w->nested_root->resize_y));
if (new_right >= (int)_screen.width) delta_x -= Ceil(new_right - _screen.width, std::max(1U, w->nested_root->resize_x));
if (new_bottom >= (int)_screen.height) delta_y -= Ceil(new_bottom - _screen.height, std::max(1U, w->nested_root->resize_y));
}
w->SetDirtyAsBlocks();
@@ -3541,7 +3541,7 @@ void ReInitAllWindows()
NetworkReInitChatBoxSize();
/* Make sure essential parts of all windows are visible */
RelocateAllWindows(_cur_resolution.width, _cur_resolution.height);
RelocateAllWindows(_screen.width, _screen.height);
MarkWholeScreenDirty();
}