Skip to content

Commit

Permalink
force landscape mode, other tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jlongster committed Jul 19, 2013
1 parent 64aa9ef commit 42b76c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion www/js/app.js
Expand Up @@ -158,7 +158,20 @@ define(function(require) {
}

function init() {
console.log(screen.mozLockOrientation('landscape-primary'));
screen.mozLockOrientation('landscape-primary');

// document.addEventListener('visibilitychange', function() {
// if(document.visibilityState == 'visible') {
// screen.mozLockOrientation('landscape-primary');
// }
// });

document.addEventListener('mozfullscreenchange', function() {
if(document.mozFullScreenEnabled) {
screen.mozLockOrientation('landscape-primary');
}
});

renderer = new Renderer();

input.init();
Expand Down
4 changes: 2 additions & 2 deletions www/js/input.js
Expand Up @@ -67,7 +67,7 @@ define(function(require) {
var touch = e.changedTouches[0];
startPos = [touch.clientX, touch.clientY];

dpad.style.backgroundColor = '#ccf';
// dpad.style.backgroundColor = '#ccf';
}

function dpadMove(e) {
Expand Down Expand Up @@ -117,7 +117,7 @@ define(function(require) {
pressedKeys['RIGHT'] = false;
pressedKeys['DOWN'] = false;

dpad.style.backgroundColor = '#fcc';
// dpad.style.backgroundColor = '#fcc';
}

function init() {
Expand Down

0 comments on commit 42b76c9

Please sign in to comment.