将freerdp启动命令行的 /gdi:sw 固定到助手内部,不允许用户自行设置。如果使用 /gdi:hw 会导致显示不正常。

pull/105/head
Apex Liu 2017-12-14 03:57:10 +08:00
parent 8bc95e5c17
commit 73be5d89f8
4 changed files with 11 additions and 14 deletions

View File

@ -78,7 +78,7 @@
},
{
"app" : "{assist_tools_path}\\tprdp\\tprdp-client.exe",
"cmdline" : "{size} {console} /v:{host_ip}:{host_port} /u:{user_name} /p:**** {clipboard} {drives} /gdi:sw /t:\"TP#{real_ip}\"",
"cmdline" : "{size} {console} /v:{host_ip}:{host_port} /u:{user_name} /p:**** {clipboard} {drives} /t:\"TP#{real_ip}\"",
"display" : "FreeRDP内置",
"name" : "freerdp"
}

View File

@ -558,9 +558,9 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
ex_astr teleport_ip = jsRoot["teleport_ip"].asCString();
int teleport_port = jsRoot["teleport_port"].asUInt();
int windows_size = 2;
int windows_size = 3;
if (jsRoot["size"].isNull())
windows_size = 2;
windows_size = 3;
else
windows_size = jsRoot["size"].asUInt();
@ -833,26 +833,20 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
display = 2;
break;
case 1:
{
width = 800;
higth = 600;
display = 1;
break;
}
case 2:
{
width = 1024;
higth = 768;
display = 1;
break;
}
case 3:
{
width = 1280;
higth = 1024;
display = 1;
break;
}
default:
width = 800;
higth = 600;
@ -956,6 +950,8 @@ void TsHttpRpc::_rpc_func_run_client(const ex_astr& func_args, ex_astr& buf)
}
ex_astr2wstr(real_sid, w_sid);
w_exe_path += L" /gdi:sw"; // 使用软件渲染gdi:hw使用硬件加速但是会出现很多黑块录像回放时又是正常的
w_exe_path += L" -grab-keyboard"; // 防止启动FreeRDP后失去本地键盘响应必须得先最小化一下FreeRDP窗口不过貌似不起作用
// ąäÁżĚćťť
ex_replace_all(w_exe_path, _T("{size}"), w_screen);

View File

@ -126,7 +126,7 @@ $app.on_table_host_cell_created = function (tbl, row_id, col_key, cell_obj) {
var protocol_sub_type = $(this).attr('data-sub-protocol');
var uni_id = $(this).attr('data-id');
console.log(uni_id, protocol_sub_type);
// console.log(uni_id, protocol_sub_type);
if (action === 'rdp') {
$app.connect_remote(uni_id, TP_PROTOCOL_TYPE_RDP, TP_PROTOCOL_TYPE_RDP_DESKTOP);
@ -267,7 +267,7 @@ $app.on_table_host_render_created = function (render) {
return h.join('');
};
render.action = function (row_id, fields) {
console.log(fields);
// console.log(fields);
var h = [];
for (var i = 0; i < fields.accs.length; ++i) {
var acc = fields.accs[i];
@ -321,7 +321,7 @@ $app.on_table_host_render_created = function (render) {
};
render.state = function (row_id, fields) {
console.log(fields);
// console.log(fields);
var _prompt, _style, _state;
if ((fields.h_state === TP_STATE_NORMAL || fields.h_state === 0)

View File

@ -104,13 +104,13 @@ $assist.do_teleport = function (args, func_success, func_error) {
teleport_port: teleport_port,
remote_host_ip: remote_host_ip,
// remote_host_port: args.host_port,
size: 0, //parseInt(args.size),
size: 3, //parseInt(args.size),
console: 0, //args.console,
session_id: session_id,
protocol_type: parseInt(args.protocol_type),
protocol_sub_type: parseInt(args.protocol_sub_type)
};
console.log('---', data);
// console.log('---', data);
var args_ = encodeURIComponent(JSON.stringify(data));
$.ajax({
type: 'GET',
@ -120,6 +120,7 @@ $assist.do_teleport = function (args, func_success, func_error) {
jsonp: 'callback',
dataType: 'json',
success: function (ret) {
console.log('ret', ret);
if (ret.code === TPE_OK) {
func_success();
} else {