Allow 0 for MaxImageBufferCount

This commit is contained in:
Isaac Connor
2024-05-23 10:42:52 -04:00
parent bf8306dbf7
commit 352aff02e4

View File

@@ -510,9 +510,11 @@ function random_WebColour() {
function buffer_setting_oninput(e) {
const max_image_buffer_count = document.getElementById('newMonitor[MaxImageBufferCount]');
const pre_event_count = document.getElementById('newMonitor[PreEventCount]');
if (parseInt(pre_event_count.value) > parseInt(max_image_buffer_count.value)) {
if (this.id=='newMonitor[PreEventCount]') {
max_image_buffer_count.value=pre_event_count.value;
if (parseInt(max_image_buffer_count.value) &&
(parseInt(pre_event_count.value) > parseInt(max_image_buffer_count.value))
) {
if (this.id == 'newMonitor[PreEventCount]') {
max_image_buffer_count.value = pre_event_count.value;
} else {
pre_event_count.value = max_image_buffer_count.value;
}