Skip to content

Commit

Permalink
Fixed iOS 7 retina whiteline bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Eemeli Kelokorpi committed May 26, 2014
1 parent e3993d0 commit 2147d9f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/engine/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,10 @@ game.System = game.Class.extend({
var width = window.innerWidth;
var height = window.innerHeight;

// iOS 7 innerHeight bugfix
if (game.device.iPad && height === 671 && this.orientation === game.System.LANDSCAPE) height = 672;
if (game.device.iPhone && height === 320 && this.orientation === game.System.LANDSCAPE) height = 319;
if (game.device.iPhone && height === 256 && this.orientation === game.System.LANDSCAPE) height = 319;

// iOS 7 retina innerHeight bugfix
if (game.device.iOS7 && window.innerHeight === 256) height = 319;
if (game.device.iOS7 && game.device.pixelRatio === 2 && this.orientation === game.System.LANDSCAPE) height += 2;

if (game.System.resizeToFill && !this.rotateScreenVisible) {
if (width / height !== this.width / this.height) {
// Wrong ratio, need to resize
Expand Down

0 comments on commit 2147d9f

Please sign in to comment.