[feat] use peer map to manage multiple client instances

This commit is contained in:
dijunkun
2025-04-08 17:34:33 +08:00
parent 1e014bdae3
commit d828bd736d
12 changed files with 187 additions and 82 deletions

View File

@@ -48,7 +48,7 @@ int MouseController::Init(int screen_width, int screen_height) {
int MouseController::Destroy() { return 0; }
int MouseController::SendCommand(RemoteAction remote_action) {
int MouseController::SendMouseCommand(RemoteAction remote_action) {
int mouse_pos_x = remote_action.m.x;
int mouse_pos_y = remote_action.m.y;

View File

@@ -24,7 +24,7 @@ class MouseController : public DeviceController {
public:
virtual int Init(int screen_width, int screen_height);
virtual int Destroy();
virtual int SendCommand(RemoteAction remote_action);
virtual int SendMouseCommand(RemoteAction remote_action);
private:
void SimulateKeyDown(int fd, int kval);

View File

@@ -22,7 +22,7 @@ int MouseController::Init(int screen_width, int screen_height) {
int MouseController::Destroy() { return 0; }
int MouseController::SendCommand(RemoteAction remote_action) {
int MouseController::SendMouseCommand(RemoteAction remote_action) {
int mouse_pos_x = remote_action.m.x * screen_width_ / pixel_width_;
int mouse_pos_y = remote_action.m.y * screen_height_ / pixel_height_;

View File

@@ -17,7 +17,7 @@ class MouseController : public DeviceController {
public:
virtual int Init(int screen_width, int screen_height);
virtual int Destroy();
virtual int SendCommand(RemoteAction remote_action);
virtual int SendMouseCommand(RemoteAction remote_action);
private:
int screen_width_ = 0;

View File

@@ -15,7 +15,7 @@ int MouseController::Init(int screen_width, int screen_height) {
int MouseController::Destroy() { return 0; }
int MouseController::SendCommand(RemoteAction remote_action) {
int MouseController::SendMouseCommand(RemoteAction remote_action) {
INPUT ip;
if (remote_action.type == ControlType::mouse) {

View File

@@ -17,7 +17,7 @@ class MouseController : public DeviceController {
public:
virtual int Init(int screen_width, int screen_height);
virtual int Destroy();
virtual int SendCommand(RemoteAction remote_action);
virtual int SendMouseCommand(RemoteAction remote_action);
private:
int screen_width_ = 0;