Improve: Add adaptive screen algorithm option and set to default
Fix: send Windows client path/username as UTF-8 (consistent with CLIENT_CAP_UTF8), keep client ID stable across upgrade
This commit is contained in:
@@ -17,7 +17,7 @@ CSettingDlg::CSettingDlg(CMy2015RemoteDlg* pParent)
|
||||
, m_nListenPort("6543")
|
||||
, m_nMax_Connect(0)
|
||||
, m_sScreenCapture(_T("GDI"))
|
||||
, m_sScreenCompress(_T("RGBA->RGB565"))
|
||||
, m_sScreenCompress(_T("算法自适应"))
|
||||
, m_nReportInterval(5)
|
||||
, m_sSoftwareDetect(_T("摄像头"))
|
||||
, m_sPublicIP(_T(""))
|
||||
@@ -154,12 +154,15 @@ BOOL CSettingDlg::OnInitDialog()
|
||||
|
||||
int DXGI = THIS_CFG.GetInt("settings", "DXGI");
|
||||
|
||||
CString algo = THIS_CFG.GetStr("settings", "ScreenCompress", "").c_str();
|
||||
CString algo = THIS_CFG.GetStr("settings", "ScreenCompress", ALGORITHM_NULL).c_str();
|
||||
|
||||
m_nListenPort = nPort.c_str();
|
||||
|
||||
int n = algo.IsEmpty() ? ALGORITHM_DIFF : atoi(algo.GetString());
|
||||
switch (n) {
|
||||
case ALGORITHM_NUL:
|
||||
m_sScreenCompress = _L(_T("算法自适应"));
|
||||
break;
|
||||
case ALGORITHM_GRAY:
|
||||
m_sScreenCompress = _L(_T("灰度图像传输"));
|
||||
break;
|
||||
@@ -175,10 +178,11 @@ BOOL CSettingDlg::OnInitDialog()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_ComboScreenCompress.InsertStringL(ALGORITHM_GRAY, "灰度图像传输");
|
||||
m_ComboScreenCompress.InsertStringL(ALGORITHM_DIFF, "屏幕差异算法");
|
||||
m_ComboScreenCompress.InsertStringL(ALGORITHM_H264, "H264压缩算法");
|
||||
m_ComboScreenCompress.InsertStringL(ALGORITHM_RGB565, "RGBA->RGB565");
|
||||
m_ComboScreenCompress.InsertStringL(1+ALGORITHM_NUL, "算法自适应");
|
||||
m_ComboScreenCompress.InsertStringL(1+ALGORITHM_GRAY, "灰度图像传输");
|
||||
m_ComboScreenCompress.InsertStringL(1+ALGORITHM_DIFF, "屏幕差异算法");
|
||||
m_ComboScreenCompress.InsertStringL(1+ALGORITHM_H264, "H264压缩算法");
|
||||
m_ComboScreenCompress.InsertStringL(1+ALGORITHM_RGB565, "RGBA->RGB565");
|
||||
|
||||
m_ComboScreenCapture.InsertStringL(0, "GDI");
|
||||
m_ComboScreenCapture.InsertStringL(1, "DXGI");
|
||||
@@ -245,7 +249,7 @@ void CSettingDlg::OnBnClickedButtonSettingapply()
|
||||
int n = m_ComboScreenCapture.GetCurSel();
|
||||
THIS_CFG.SetInt("settings", "DXGI", n);
|
||||
|
||||
n = m_ComboScreenCompress.GetCurSel();
|
||||
n = m_ComboScreenCompress.GetCurSel() - 1;
|
||||
THIS_CFG.SetInt("settings", "ScreenCompress", n);
|
||||
|
||||
THIS_CFG.SetInt("settings", "ReportInterval", m_nReportInterval);
|
||||
|
||||
Reference in New Issue
Block a user