fix crash when zomming in main menu
This commit is contained in:
parent
6c9ff35b70
commit
840571698f
2 changed files with 2 additions and 0 deletions
|
@ -46,6 +46,7 @@ SVN trunk (1.1+svn):
|
|||
* improved (underwater) merfolk village
|
||||
* (internal) make attack animations work like all other animations
|
||||
* backport latest SDL_ttf change, fix ascender/descender issue for DejaVu
|
||||
* fix crash when using zoom keys in the main lobby
|
||||
|
||||
Version 1.1:
|
||||
* campaign server
|
||||
|
|
|
@ -63,6 +63,7 @@ namespace {
|
|||
|
||||
int MinZoom(const gamemap& map, const SDL_Rect& viewport)
|
||||
{
|
||||
if(map.x()<4 || !map.y() ) return DefaultZoom;
|
||||
const int min_zoom1 = viewport.w/((map.x()*3)/4);
|
||||
const int min_zoom2 = viewport.h/map.y();
|
||||
return maximum<int>(min_zoom1,min_zoom2);
|
||||
|
|
Loading…
Add table
Reference in a new issue