From bc11e6a95bd124450711688aa2777f9d44b0af79 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 8 May 2021 15:47:29 -0400 Subject: [PATCH] Include pre event count in min estimated ram use --- web/skins/classic/views/js/monitor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/views/js/monitor.js b/web/skins/classic/views/js/monitor.js index 4b41d8dd2..341f3f1aa 100644 --- a/web/skins/classic/views/js/monitor.js +++ b/web/skins/classic/views/js/monitor.js @@ -140,7 +140,7 @@ function initPage() { form.submit(); }; }); - document.querySelectorAll('input[name="newMonitor[ImageBufferCount]"],input[name="newMonitor[MaxImageBufferCount]"],input[name="newMonitor[Width]"],input[name="newMonitor[Height]"]').forEach(function(el) { + document.querySelectorAll('input[name="newMonitor[ImageBufferCount]"],input[name="newMonitor[MaxImageBufferCount]"],input[name="newMonitor[Width]"],input[name="newMonitor[Height]"],input[name="newMonitor[PreEventCount]"]').forEach(function(el) { el.oninput = window['update_estimated_ram_use'].bind(el); }); update_estimated_ram_use(); @@ -317,6 +317,7 @@ function update_estimated_ram_use() { var colours = document.querySelectorAll('select[name="newMonitor[Colours]"]')[0].value; var min_buffer_count = parseInt(document.querySelectorAll('input[name="newMonitor[ImageBufferCount]"]')[0].value); + min_buffer_count += parseInt(document.querySelectorAll('input[name="newMonitor[PreEventCount]"]')[0].value); var min_buffer_size = min_buffer_count * width * height * colours; document.getElementById('estimated_ram_use').innerHTML = 'Min: ' + human_filesize(min_buffer_size);