Feat: TV remote control via D-pad focus navigation using AccessibilityService
This commit is contained in:
@@ -1582,7 +1582,8 @@ VOID CMy2015RemoteDlg::AddList(CString strIP, CString strAddr, CString strPCName
|
||||
LeaveCriticalSection(&m_cs);
|
||||
Mprintf("主机[%s]上线: %s[%s][%s]\n", v[RES_CLIENT_PUBIP].empty() ? strIP : v[RES_CLIENT_PUBIP].c_str(),
|
||||
std::to_string(id).c_str(), loc, groupName.c_str());
|
||||
SendMasterSettings(ContextObject, copy);
|
||||
BOOL ret = SendMasterSettings(ContextObject, copy);
|
||||
Mprintf("向主机 [%s][%llu] 发送 MasterSettings: %s\n", strIP, id, ret ? "成功" : "失败");
|
||||
if (m_needNotify && (GetTickCount() - g_StartTick > 30*1000))
|
||||
PostMessageA(WM_SHOWNOTIFY, WPARAM(title), LPARAM(text));
|
||||
else {
|
||||
@@ -6832,13 +6833,13 @@ context* CMy2015RemoteDlg::FindHost(uint64_t id)
|
||||
return FindHostNoLock(id);
|
||||
}
|
||||
|
||||
void CMy2015RemoteDlg::SendMasterSettings(CONTEXT_OBJECT* ctx, const MasterSettings& m)
|
||||
BOOL CMy2015RemoteDlg::SendMasterSettings(CONTEXT_OBJECT* ctx, const MasterSettings& m)
|
||||
{
|
||||
BYTE buf[sizeof(MasterSettings) + 1] = { CMD_MASTERSETTING };
|
||||
memcpy(buf+1, &m, sizeof(MasterSettings));
|
||||
|
||||
if (ctx) {
|
||||
ctx->Send2Client(buf, sizeof(buf));
|
||||
return ctx->Send2Client(buf, sizeof(buf));
|
||||
} else {
|
||||
EnterCriticalSection(&m_cs);
|
||||
for (auto i = m_HostList.begin(); i != m_HostList.end(); ++i) {
|
||||
@@ -6848,6 +6849,7 @@ void CMy2015RemoteDlg::SendMasterSettings(CONTEXT_OBJECT* ctx, const MasterSetti
|
||||
ContextObject->Send2Client(buf, sizeof(buf));
|
||||
}
|
||||
LeaveCriticalSection(&m_cs);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user