mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-23 16:46:48 +00:00
Add connection status update handler
This commit is contained in:
@@ -44,6 +44,17 @@ static void rumble(unsigned short controllerNumber, unsigned short lowFreqMotor,
|
|||||||
rumble_handler(controllerNumber, lowFreqMotor, highFreqMotor);
|
rumble_handler(controllerNumber, lowFreqMotor, highFreqMotor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void connection_status_update(int status) {
|
||||||
|
switch (status) {
|
||||||
|
case CONN_STATUS_OKAY:
|
||||||
|
printf("Connection is okay\n");
|
||||||
|
break;
|
||||||
|
case CONN_STATUS_POOR:
|
||||||
|
printf("Connection is poor\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
CONNECTION_LISTENER_CALLBACKS connection_callbacks = {
|
CONNECTION_LISTENER_CALLBACKS connection_callbacks = {
|
||||||
.stageStarting = NULL,
|
.stageStarting = NULL,
|
||||||
.stageComplete = NULL,
|
.stageComplete = NULL,
|
||||||
@@ -52,4 +63,5 @@ CONNECTION_LISTENER_CALLBACKS connection_callbacks = {
|
|||||||
.connectionTerminated = connection_terminated,
|
.connectionTerminated = connection_terminated,
|
||||||
.logMessage = connection_log_message,
|
.logMessage = connection_log_message,
|
||||||
.rumble = rumble,
|
.rumble = rumble,
|
||||||
|
.connectionStatusUpdate = connection_status_update
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user