mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[feat] add callback to notify the travsesal mode
This commit is contained in:
@@ -184,6 +184,7 @@ int Render::CreateConnectionPeer() {
|
|||||||
params_.on_receive_data_buffer = OnReceiveDataBufferCb;
|
params_.on_receive_data_buffer = OnReceiveDataBufferCb;
|
||||||
params_.on_signal_status = OnSignalStatusCb;
|
params_.on_signal_status = OnSignalStatusCb;
|
||||||
params_.on_connection_status = OnConnectionStatusCb;
|
params_.on_connection_status = OnConnectionStatusCb;
|
||||||
|
params_.net_status_report = NetStatusReport;
|
||||||
params_.user_data = this;
|
params_.user_data = this;
|
||||||
|
|
||||||
peer_ = CreatePeer(¶ms_);
|
peer_ = CreatePeer(¶ms_);
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ class Render {
|
|||||||
|
|
||||||
static void OnConnectionStatusCb(ConnectionStatus status, void *user_data);
|
static void OnConnectionStatusCb(ConnectionStatus status, void *user_data);
|
||||||
|
|
||||||
|
static void NetStatusReport(TraversalMode mode, const unsigned short send,
|
||||||
|
const unsigned short receive, void *user_ptr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int ProcessMouseKeyEven(SDL_Event &ev);
|
int ProcessMouseKeyEven(SDL_Event &ev);
|
||||||
|
|
||||||
|
|||||||
@@ -229,3 +229,8 @@ void Render::OnConnectionStatusCb(ConnectionStatus status, void *user_data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Render::NetStatusReport(TraversalMode mode, const unsigned short send,
|
||||||
|
const unsigned short receive, void *user_ptr) {
|
||||||
|
printf("Net mode: [%d]\n", mode);
|
||||||
|
}
|
||||||
2
thirdparty/projectx
vendored
2
thirdparty/projectx
vendored
Submodule thirdparty/projectx updated: af49ebe63d...54179722e5
Reference in New Issue
Block a user