ImageBufferCount can now be as low as 2

pull/3122/head
Isaac Connor 2021-01-26 15:33:38 -05:00
parent 4dcce4ac95
commit 69626651ff
2 changed files with 7 additions and 3 deletions

View File

@ -168,7 +168,7 @@ $SLANG = array(
'BadMotionFrameSkip' => 'Motion Frame skip count must be an integer of zero or more',
'BadHeight' => 'Height must be set to a valid value',
'BadHost' => 'Host must be set to a valid ip address or hostname, do not include http://',
'BadImageBufferCount' => 'Image buffer size must be an integer of 10 or more',
'BadImageBufferCount' => 'Image buffer size must be an integer of 2 or more',
'BadLabelX' => 'Label X co-ordinate must be set to an integer of zero or more',
'BadLabelY' => 'Label Y co-ordinate must be set to an integer of zero or more',
'BadMaxFPS' => 'Maximum FPS must be a positive integer or floating point value',

View File

@ -99,11 +99,15 @@ function validateForm( form ) {
errors[errors.length] = "<?php echo translate('BadLabelX') ?>";
if ( !form.elements['newMonitor[LabelY]'].value || !(parseInt(form.elements['newMonitor[LabelY]'].value) >= 0 ) )
errors[errors.length] = "<?php echo translate('BadLabelY') ?>";
if ( !form.elements['newMonitor[ImageBufferCount]'].value || !(parseInt(form.elements['newMonitor[ImageBufferCount]'].value) >= 10 ) )
if ( !form.elements['newMonitor[ImageBufferCount]'].value || !(parseInt(form.elements['newMonitor[ImageBufferCount]'].value) >= 2 ) )
errors[errors.length] = "<?php echo translate('BadImageBufferCount') ?>";
if ( !form.elements['newMonitor[WarmupCount]'].value || !(parseInt(form.elements['newMonitor[WarmupCount]'].value) >= 0 ) )
errors[errors.length] = "<?php echo translate('BadWarmupCount') ?>";
if ( !form.elements['newMonitor[PreEventCount]'].value || !(parseInt(form.elements['newMonitor[PreEventCount]'].value) >= 0 ) || (parseInt(form.elements['newMonitor[PreEventCount]'].value) > parseInt(form.elements['newMonitor[ImageBufferCount]'].value)) )
if (
!form.elements['newMonitor[PreEventCount]'].value
||
!(parseInt(form.elements['newMonitor[PreEventCount]'].value) >= 0)
)
errors[errors.length] = "<?php echo translate('BadPreEventCount') ?>";
if ( !form.elements['newMonitor[PostEventCount]'].value || !(parseInt(form.elements['newMonitor[PostEventCount]'].value) >= 0 ) )
errors[errors.length] = "<?php echo translate('BadPostEventCount') ?>";