Scale game window outside cordova
This commit is contained in:
parent
06ff99769d
commit
aba41086e7
2 changed files with 24 additions and 28 deletions
|
@ -147,7 +147,6 @@ document.addEventListener("backbutton", function(event){
|
||||||
// Scale game canvas
|
// Scale game canvas
|
||||||
// =====================
|
// =====================
|
||||||
|
|
||||||
document.addEventListener("deviceready", () => {
|
|
||||||
Graphics._updateRealScale = function () {
|
Graphics._updateRealScale = function () {
|
||||||
if (this._stretchEnabled) {
|
if (this._stretchEnabled) {
|
||||||
var h = window.innerWidth / this._width;
|
var h = window.innerWidth / this._width;
|
||||||
|
@ -159,7 +158,6 @@ document.addEventListener("deviceready", () => {
|
||||||
this._realScale = this._scale;
|
this._realScale = this._scale;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
|
||||||
|
|
||||||
// ===========================
|
// ===========================
|
||||||
// Gamepad tips on default
|
// Gamepad tips on default
|
||||||
|
|
|
@ -147,7 +147,6 @@ document.addEventListener("backbutton", function(event){
|
||||||
// Scale game canvas
|
// Scale game canvas
|
||||||
// =====================
|
// =====================
|
||||||
|
|
||||||
document.addEventListener("deviceready", () => {
|
|
||||||
Graphics._updateRealScale = function () {
|
Graphics._updateRealScale = function () {
|
||||||
if (this._stretchEnabled) {
|
if (this._stretchEnabled) {
|
||||||
var h = window.innerWidth / this._width;
|
var h = window.innerWidth / this._width;
|
||||||
|
@ -159,7 +158,6 @@ document.addEventListener("deviceready", () => {
|
||||||
this._realScale = this._scale;
|
this._realScale = this._scale;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})
|
|
||||||
|
|
||||||
// ===========================
|
// ===========================
|
||||||
// Gamepad tips on default
|
// Gamepad tips on default
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue