mirror of
https://github.com/vanilla-wiiu/vanilla.git
synced 2025-01-22 08:11:47 -05:00
only push audio event if payload size > 0
This commit is contained in:
parent
af454b07e1
commit
5c42244a4c
1 changed files with 3 additions and 1 deletions
|
@ -59,7 +59,9 @@ void handle_audio_packet(gamepad_context_t *ctx, char *data, size_t len)
|
|||
return;
|
||||
}
|
||||
|
||||
push_event(ctx->event_loop, VANILLA_EVENT_AUDIO, ap->payload, ap->payload_size);
|
||||
if (ap->payload_size) {
|
||||
push_event(ctx->event_loop, VANILLA_EVENT_AUDIO, ap->payload, ap->payload_size);
|
||||
}
|
||||
|
||||
uint8_t vibrate_val = ap->vibrate;
|
||||
push_event(ctx->event_loop, VANILLA_EVENT_VIBRATE, &vibrate_val, sizeof(vibrate_val));
|
||||
|
|
Loading…
Reference in a new issue