mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Use cbuf for control event queue
Replace the control_event_queue implementation by cbuf.
This commit is contained in:
parent
b38292cd69
commit
241a3dcba5
6 changed files with 14 additions and 190 deletions
|
|
@ -1,14 +1,16 @@
|
|||
#ifndef CONTROL_H
|
||||
#define CONTROL_H
|
||||
|
||||
#include "control_event.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <SDL2/SDL_mutex.h>
|
||||
#include <SDL2/SDL_thread.h>
|
||||
|
||||
#include "cbuf.h"
|
||||
#include "control_event.h"
|
||||
#include "net.h"
|
||||
|
||||
struct control_event_queue CBUF(struct control_event, 64);
|
||||
|
||||
struct controller {
|
||||
socket_t video_socket;
|
||||
SDL_Thread *thread;
|
||||
|
|
@ -33,7 +35,6 @@ controller_stop(struct controller *controller);
|
|||
void
|
||||
controller_join(struct controller *controller);
|
||||
|
||||
// expose simple API to hide control_event_queue
|
||||
bool
|
||||
controller_push_event(struct controller *controller,
|
||||
const struct control_event *event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue