Honour the minimum game window sizes in gui2.

Did some testing and didn't note regressions, but there might be some
issues still lurking, this area of interaction between gui1 and gui2 is
tricky. (Fixes bug #16724.)
This commit is contained in:
Mark de Wever 2010-09-19 16:24:22 +00:00
parent 965ebc7bc6
commit 7a39198ccd
2 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,8 @@ Version 1.9.1+svn:
* User interface:
* Fixed: Addon dialog in title screen shows last host again.
* Fixed: Fullscreen hotkey works again in the title screen.
* Fixed: Termination of the game when making the title screen small
(bug #16724).
Version 1.9.1:
* AI:

View File

@ -1234,8 +1234,7 @@ void twindow::signal_handler_sdl_video_resize(
const event::tevent event, bool& handled, const tpoint& new_size)
{
DBG_GUI_E << LOG_HEADER << ' ' << event << ".\n";
#if 0
/** @todo enable when gui2 becomes the master event handler. */
if(new_size.x < preferences::min_allowed_width()
|| new_size.y < preferences::min_allowed_height()) {
@ -1257,7 +1256,7 @@ void twindow::signal_handler_sdl_video_resize(
<< " resize aborted, resize failed.\n";
return;
}
#endif
settings::gamemap_width += new_size.x - settings::screen_width ;
settings::gamemap_height += new_size.y - settings::screen_height ;
settings::screen_width = new_size.x;