From 359f88a764ba0645c55636cf519aeb1df24c9409 Mon Sep 17 00:00:00 2001 From: samhed Date: Tue, 10 Sep 2013 16:42:55 +0200 Subject: [PATCH] Fixed a bug which sometimes occured on touch devices. The bug would prevent the viewport from properly changing size. --- include/display.js | 4 ++-- include/ui.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/display.js b/include/display.js index 9f2d6b89..d15c99e5 100644 --- a/include/display.js +++ b/include/display.js @@ -396,13 +396,13 @@ that.absY = function(y) { that.resize = function(width, height) { - c_prevStyle = ""; + c_prevStyle = ""; fb_width = width; fb_height = height; rescale(conf.scale); - that.viewportChange(); + that.viewportChange(0, 0, width, height); }; that.clear = function() { diff --git a/include/ui.js b/include/ui.js index 21b4f8b9..b24bd9c7 100644 --- a/include/ui.js +++ b/include/ui.js @@ -21,7 +21,7 @@ window.onresize = function () { // the resolution of the session clearTimeout(resizeTimeout); resizeTimeout = setTimeout(function(){ - UI.onresize(); + UI.onresize(); }, 500); };