Fix Scaling.

This commit is contained in:
SimonFair
2024-10-20 15:37:51 +01:00
parent ecb8a8dac2
commit e36779bd49
3 changed files with 3 additions and 3 deletions
@@ -81,7 +81,7 @@ foreach ($vms as $vm) {
if ($vmrcport > 0) {
$wsport = $lv->domain_get_ws_port($res);
$vmrcprotocol = $lv->domain_get_vmrc_protocol($res);
if ($vmrcprotocol == "vnc") $vmrcscale = "&scale=auto"; else $vmrcscale = "";
if ($vmrcprotocol == "vnc") $vmrcscale = "&resize=scale"; else $vmrcscale = "";
$vmrcurl = autov('/plugins/dynamix.vm.manager/'.$vmrcprotocol.'.html',true).$vmrcscale.'&autoconnect=true&host='._var($_SERVER,'HTTP_HOST');
if ($vmrcprotocol == "spice") $vmrcurl .= '&vmname='. urlencode($vm) .'&port=/wsproxy/'.$vmrcport.'/'; else $vmrcurl .= '&port=&path=/wsproxy/'.$wsport.'/';
$graphics = strtoupper($vmrcprotocol).":".$vmrcport."\n";
@@ -133,7 +133,7 @@ case 'domain-start-console':
$vmrcurl = autov('/plugins/dynamix.vm.manager/'.$protocol.'.html',true).'&autoconnect=true&host='._var($_SERVER,'HTTP_HOST');
if ($protocol == "spice") $vmrcurl .= '&vmname='. urlencode($domName) .'&port=/wsproxy/'.$vmrcport.'/'; else $vmrcurl .= '&port=&path=/wsproxy/'.$wsport.'/';
}
if ($protocol == "vnc") $vmrcscale = "&scale=auto"; else $vmrcscale = "";
if ($protocol == "vnc") $vmrcscale = "&resize=scale"; else $vmrcscale = "";
$arrResponse['vmrcurl'] = $vmrcurl.$vmrcscale;
break;