diff --git a/scripts/system/libraries/WebTablet.js b/scripts/system/libraries/WebTablet.js index c5f8168c30..92a5857390 100644 --- a/scripts/system/libraries/WebTablet.js +++ b/scripts/system/libraries/WebTablet.js @@ -222,6 +222,10 @@ WebTablet.prototype.getTabletTextureResolution = function() { } }; +WebTablet.prototype.getLandscape = function() { + return this.landscape; +} + WebTablet.prototype.setLandscape = function(newLandscapeValue) { if (this.landscape === newLandscapeValue) { return; diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index 63c1cc51aa..cf2a1f1315 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -192,7 +192,9 @@ return; } - if (now - validCheckTime > MSECS_PER_SEC) { + var needInstantUpdate = UIWebTablet && UIWebTablet.getLandscape() !== landscape; + + if ((now - validCheckTime > MSECS_PER_SEC) || needInstantUpdate) { validCheckTime = now; updateTabletWidthFromSettings();