fix screen avail width / height
parent
0bd16d392f
commit
e8ca33ab8a
|
@ -68,7 +68,7 @@ GameLib.D3.API.Camera = function(
|
|||
this.fov = fov;
|
||||
|
||||
if (GameLib.Utils.UndefinedOrNull(aspect)) {
|
||||
aspect = window.innerWidth / window.innerHeight;
|
||||
aspect = window.screen.availWidth / window.screen.availHeight;
|
||||
}
|
||||
this.aspect = aspect;
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ GameLib.System.Render.prototype.start = function() {
|
|||
GameLib.Event.Emit(
|
||||
GameLib.Event.WINDOW_RESIZE,
|
||||
{
|
||||
width : window.innerWidth,
|
||||
height : window.innerHeight
|
||||
width : window.screen.availWidth,
|
||||
height : window.screen.availHeight
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -101,8 +101,8 @@ GameLib.System.Render.prototype.nativeWindowResize = function() {
|
|||
GameLib.Event.Emit(
|
||||
GameLib.Event.WINDOW_RESIZE,
|
||||
{
|
||||
width : window.innerWidth,
|
||||
height : window.innerHeight
|
||||
width : window.screen.availWidth,
|
||||
height : window.screen.availHeight
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue