0426708544
Define server callbacks, start the server asynchronously and listen to connection events to initialize scrcpy properly. It will help to simplify the server code, and allows to run the UI event loop while the server is connecting. In particular, this will allow to receive SIGINT/Ctrl+C events during connection to interrupt immediately.
4 lines
231 B
C
4 lines
231 B
C
#define EVENT_NEW_FRAME SDL_USEREVENT
|
|
#define EVENT_STREAM_STOPPED (SDL_USEREVENT + 1)
|
|
#define EVENT_SERVER_CONNECTION_FAILED (SDL_USEREVENT + 2)
|
|
#define EVENT_SERVER_CONNECTED (SDL_USEREVENT + 3)
|