Skip to content

Commit

Permalink
speed up OSD tab loading if there are too many custom OSD elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
error414 committed Oct 16, 2024
1 parent ae0f6a8 commit c7dfe1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3549,6 +3549,7 @@ function createCustomElements(){
}

var customElementsContainer = $('#osdCustomElements');
var init = true;

for(var i = 0; i < FC.OSD_CUSTOM_ELEMENTS.settings.customElementsCount; i++){
var label = $('<label>');
Expand Down Expand Up @@ -3606,7 +3607,9 @@ function createCustomElements(){
var valueBlock = $('.' + $(this).data('valueCellClass'))
valueBlock.find('.value').hide();
valueBlock.find('.' + dataValue).show();
updateOSDCustomElementsDisplay();
if(!init){
updateOSDCustomElementsDisplay();
}
});
}

Expand Down Expand Up @@ -3636,6 +3639,7 @@ function createCustomElements(){

fillCustomElementsValues();
customElementsInitCallback();
init = false;
}

function updateOSDCustomElementsDisplay() {
Expand Down

0 comments on commit c7dfe1a

Please sign in to comment.