Feat: Android client Phase 0-3 full implementation
This commit was merged in pull request #3.
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
#include <md5.h>
|
||||
#include <cstdint> // for uint16_t
|
||||
|
||||
extern CMy2015RemoteDlg* g_2015RemoteDlg;
|
||||
|
||||
extern "C" uint32_t licenseGetBuildTag() { volatile uint32_t tag = 0xC0DE2026u; return tag; }
|
||||
#include <vector>
|
||||
#include <mutex> // for std::mutex, std::lock_guard
|
||||
@@ -225,7 +227,15 @@ CScreenSpyDlg::CScreenSpyDlg(CMy2015RemoteDlg* Parent, Server* IOCPServer, CONTE
|
||||
if (WebService().IsRunning() && !WebService().IsMfcTriggered(m_ClientID)) {
|
||||
int width = m_BitmapInfor_Full->bmiHeader.biWidth;
|
||||
int height = abs(m_BitmapInfor_Full->bmiHeader.biHeight);
|
||||
WebService().NotifyResolutionChange(m_ClientID, width, height);
|
||||
bool topDown = (m_BitmapInfor_Full->bmiHeader.biClrImportant == 1);
|
||||
// m_ContextObject is the screen sub-connection; client_type lives on the
|
||||
// main login connection. Look it up via the peer IP (same pattern as GetClientEncoding).
|
||||
std::string clientType;
|
||||
if (g_2015RemoteDlg) {
|
||||
context* main = g_2015RemoteDlg->FindHostByClientID(m_ClientID);
|
||||
if (main) clientType = main->GetAdditionalData(RES_CLIENT_TYPE).GetString();
|
||||
}
|
||||
WebService().NotifyResolutionChange(m_ClientID, width, height, topDown, clientType);
|
||||
// 透传客户端初始的音频开/关状态给 web,让前端按钮显示正确
|
||||
WebService().NotifyAudioState(m_ClientID, m_Settings.AudioEnabled != 0);
|
||||
}
|
||||
@@ -953,7 +963,6 @@ VOID CScreenSpyDlg::OnClose()
|
||||
CWnd* parent = GetParent();
|
||||
if (parent)
|
||||
parent->SendMessage(WM_CHILD_CLOSED, (WPARAM)this, 0);
|
||||
extern CMy2015RemoteDlg *g_2015RemoteDlg;
|
||||
if(g_2015RemoteDlg)
|
||||
g_2015RemoteDlg->RemoveRemoteWindow(GetSafeHwnd());
|
||||
|
||||
@@ -1126,7 +1135,13 @@ VOID CScreenSpyDlg::OnReceiveComplete()
|
||||
if (m_bIsWebSession && WebService().IsRunning()) {
|
||||
int width = m_BitmapInfor_Full->bmiHeader.biWidth;
|
||||
int height = abs(m_BitmapInfor_Full->bmiHeader.biHeight);
|
||||
WebService().NotifyResolutionChange(m_ClientID, width, height);
|
||||
bool topDown = (m_BitmapInfor_Full->bmiHeader.biClrImportant == 1);
|
||||
std::string clientType;
|
||||
if (g_2015RemoteDlg) {
|
||||
context* main = g_2015RemoteDlg->FindHostByClientID(m_ClientID);
|
||||
if (main) clientType = main->GetAdditionalData(RES_CLIENT_TYPE).GetString();
|
||||
}
|
||||
WebService().NotifyResolutionChange(m_ClientID, width, height, topDown, clientType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user