rlgwebd.js: set the width and height on Player objects.
Fixes the client not being informed of the pty size.
This commit is contained in:
parent
02b76e1faf
commit
d0ea0471c0
1 changed files with 5 additions and 2 deletions
|
|
@ -112,7 +112,7 @@ function TermSession(game, lkey, dims, handlers) {
|
||||||
childenv["PTYHELPER"] = String(this.h) + "x" + String(this.w);
|
childenv["PTYHELPER"] = String(this.h) + "x" + String(this.w);
|
||||||
args = [this.game.path, "-n", this.pname];
|
args = [this.game.path, "-n", this.pname];
|
||||||
this.child = child_process.spawn("/bin/ptyhelper", args, {"env": childenv});
|
this.child = child_process.spawn("/bin/ptyhelper", args, {"env": childenv});
|
||||||
this.emit('open', true);
|
this.emit('open', true, this.sessid);
|
||||||
/* Set up the lockfile and ttyrec */
|
/* Set up the lockfile and ttyrec */
|
||||||
var ts = timestamp();
|
var ts = timestamp();
|
||||||
var progressdir = "/dgldir/inprogress-" + this.game.uname;
|
var progressdir = "/dgldir/inprogress-" + this.game.uname;
|
||||||
|
|
@ -311,9 +311,12 @@ function Player(gamename, lkey, dims, callback) {
|
||||||
if (this.alive)
|
if (this.alive)
|
||||||
this.session.close();
|
this.session.close();
|
||||||
};
|
};
|
||||||
function openH(success) {
|
function openH(success, id) {
|
||||||
if (success) {
|
if (success) {
|
||||||
ss.alive = true;
|
ss.alive = true;
|
||||||
|
ss.session = sessions[id];
|
||||||
|
ss.h = sessions[id].h;
|
||||||
|
ss.w = sessions[id].w;
|
||||||
}
|
}
|
||||||
callback(ss, success);
|
callback(ss, success);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue