diff --git a/src/gui/render.cpp b/src/gui/render.cpp index cdd9cbfd..c25e6cac 100644 --- a/src/gui/render.cpp +++ b/src/gui/render.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: render.cpp,v 1.59 2009-04-26 18:24:36 qbix79 Exp $ */ +/* $Id: render.cpp,v 1.60 2009-04-26 19:14:50 harekiet Exp $ */ #include #include @@ -519,6 +519,12 @@ void RENDER_SetSize(Bitu width,Bitu height,Bitu bpp,float fps,double ratio,bool if (!width || !height || width > SCALER_MAXWIDTH || height > SCALER_MAXHEIGHT) { return; } + if ( ratio > 1 ) { + double target = height * ratio + 0.1; + ratio = target / height; + } else { + //This would alter the width of the screen, we don't care about rounding errors here + } render.src.width=width; render.src.height=height; render.src.bpp=bpp;