Skip to content

Commit

Permalink
Make sure mouse mode after StartTransmissionAck
Browse files Browse the repository at this point in the history
  • Loading branch information
numbaa committed Apr 27, 2024
1 parent b953a05 commit ac2660a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lanthing/src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,9 @@ void Client::onStartTransmissionAck(const std::shared_ptr<google::protobuf::Mess
auto msg = std::static_pointer_cast<ltproto::client2worker::StartTransmissionAck>(_msg);
if (msg->err_code() == ltproto::ErrorCode::Success) {
LOG(INFO) << "Received StartTransmissionAck with success";
auto switch_mouse = std::make_shared<ltproto::client2worker::SwitchMouseMode>();
switch_mouse->set_absolute(absolute_mouse_);
sendMessageToHost(ltproto::id(switch_mouse), switch_mouse, true);
}
else {
LOG(INFO) << "StartTransmission failed with " << ltproto::ErrorCode_Name(msg->err_code());
Expand Down

0 comments on commit ac2660a

Please sign in to comment.