aboutsummaryrefslogtreecommitdiff
path: root/src/library_glut.js
diff options
context:
space:
mode:
authorPierre Renaux <pierre@talansoft.com>2012-04-08 20:42:15 +0800
committerPierre Renaux <pierre@talansoft.com>2012-04-19 16:32:45 +0800
commit1259e205f5e4b4a5c4bed1dc84f5798f48e11eab (patch)
treedeb612e330a1a54b129d1f0feda40d54d836f627 /src/library_glut.js
parent440d678914d82594a26b7b30cd31e7fc42efb615 (diff)
[src/library_glut.js]: Fullscreen mode fix, quoted variables that were renamed by Closure in optimized build ;
Diffstat (limited to 'src/library_glut.js')
-rw-r--r--src/library_glut.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/library_glut.js b/src/library_glut.js
index e4b2d138..9ad83684 100644
--- a/src/library_glut.js
+++ b/src/library_glut.js
@@ -226,13 +226,13 @@ var LibraryGLUT = {
onFullScreenEventChange: function(event){
var width;
var height;
- if (document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen) {
+ if (document["fullScreen"] || document["mozFullScreen"] || document["webkitIsFullScreen"]) {
width = screen["width"];
height = screen["height"];
} else {
width = GLUT.windowWidth;
height = GLUT.windowHeight;
- // TODO set position
+ // TODO set position
document.removeEventListener('fullscreenchange', GLUT.onFullScreenEventChange, true);
document.removeEventListener('mozfullscreenchange', GLUT.onFullScreenEventChange, true);
document.removeEventListener('webkitfullscreenchange', GLUT.onFullScreenEventChange, true);
@@ -241,6 +241,7 @@ var LibraryGLUT = {
Module['canvas'].height = height;
/* Can't call _glutReshapeWindow as that requests cancelling fullscreen. */
if (GLUT.reshapeFunc) {
+ // console.log("GLUT.reshapeFunc (from FS): " + width + ", " + height);
FUNCTION_TABLE[GLUT.reshapeFunc](width, height);
}
_glutPostRedisplay();
@@ -378,9 +379,11 @@ var LibraryGLUT = {
glutReshapeWindow__deps: ['$GLUT', 'glutPostRedisplay'],
glutReshapeWindow: function(width, height) {
GLUT.cancelFullScreen();
+ // console.log("glutReshapeWindow: " + width + ", " + height);
Module['canvas'].width = width;
Module['canvas'].height = height;
if (GLUT.reshapeFunc) {
+ // console.log("GLUT.reshapeFunc: " + width + ", " + height);
FUNCTION_TABLE[GLUT.reshapeFunc](width, height);
}
_glutPostRedisplay();