When offered multiple heads, generate a warning, rather than failing in subtle ways.

This commit is contained in:
Jeremy White 2017-03-07 13:07:41 -06:00
parent 4ea12e87a2
commit 2fa7c65144

View File

@ -145,7 +145,12 @@ SpiceMainConn.prototype.process_channel_message = function(msg)
chan_id : chans.channels[i].id chan_id : chans.channels[i].id
}; };
if (chans.channels[i].type == SPICE_CHANNEL_DISPLAY) if (chans.channels[i].type == SPICE_CHANNEL_DISPLAY)
this.display = new SpiceDisplayConn(conn); {
if (this.display !== undefined)
this.log_warn("The spice-html5 client does not handle multiple heads.");
else
this.display = new SpiceDisplayConn(conn);
}
else if (chans.channels[i].type == SPICE_CHANNEL_INPUTS) else if (chans.channels[i].type == SPICE_CHANNEL_INPUTS)
{ {
this.inputs = new SpiceInputsConn(conn); this.inputs = new SpiceInputsConn(conn);