From: <mth...@us...> - 2009-07-28 09:35:02
|
Revision: 10286 http://openmsx.svn.sourceforge.net/openmsx/?rev=10286&view=rev Author: mthuurne Date: 2009-07-28 09:34:39 +0000 (Tue, 28 Jul 2009) Log Message: ----------- Ensure that the default scale factor is actually supported. Builds for devices with 320x240 screens do not support scale factor 2. Modified Paths: -------------- openmsx/trunk/src/video/RenderSettings.cc Modified: openmsx/trunk/src/video/RenderSettings.cc =================================================================== --- openmsx/trunk/src/video/RenderSettings.cc 2009-07-28 09:31:54 UTC (rev 10285) +++ openmsx/trunk/src/video/RenderSettings.cc 2009-07-28 09:34:39 UTC (rev 10286) @@ -9,6 +9,7 @@ #include "CommandController.hh" #include "CommandException.hh" #include "build-info.hh" +#include <algorithm> #include <cmath> namespace openmsx { @@ -98,8 +99,8 @@ SCALER_SIMPLE, scalerMap)); scaleFactor.reset(new IntegerSetting(commandController, - "scale_factor", "scale factor", 2, - MIN_SCALE_FACTOR, MAX_SCALE_FACTOR)); + "scale_factor", "scale factor", + std::min(2, MAX_SCALE_FACTOR), MIN_SCALE_FACTOR, MAX_SCALE_FACTOR)); scanlineAlpha.reset(new IntegerSetting(commandController, "scanline", "amount of scanline effect: 0 = none, 100 = full", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |