mirror of https://github.com/Genymobile/scrcpy
Store events numbers in an enum
This avoids to manually set an explicit value for each item. PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
This commit is contained in:
parent
e8f02685e9
commit
ce4e1fc420
|
@ -1,10 +1,21 @@
|
||||||
#define SC_EVENT_NEW_FRAME SDL_USEREVENT
|
#ifndef SC_EVENTS_H
|
||||||
#define SC_EVENT_DEVICE_DISCONNECTED (SDL_USEREVENT + 1)
|
#define SC_EVENTS_H
|
||||||
#define SC_EVENT_SERVER_CONNECTION_FAILED (SDL_USEREVENT + 2)
|
|
||||||
#define SC_EVENT_SERVER_CONNECTED (SDL_USEREVENT + 3)
|
#include "common.h"
|
||||||
#define SC_EVENT_USB_DEVICE_DISCONNECTED (SDL_USEREVENT + 4)
|
|
||||||
#define SC_EVENT_DEMUXER_ERROR (SDL_USEREVENT + 5)
|
#include <SDL_events.h>
|
||||||
#define SC_EVENT_RECORDER_ERROR (SDL_USEREVENT + 6)
|
|
||||||
#define SC_EVENT_SCREEN_INIT_SIZE (SDL_USEREVENT + 7)
|
enum {
|
||||||
#define SC_EVENT_TIME_LIMIT_REACHED (SDL_USEREVENT + 8)
|
SC_EVENT_NEW_FRAME = SDL_USEREVENT,
|
||||||
#define SC_EVENT_CONTROLLER_ERROR (SDL_USEREVENT + 9)
|
SC_EVENT_DEVICE_DISCONNECTED,
|
||||||
|
SC_EVENT_SERVER_CONNECTION_FAILED,
|
||||||
|
SC_EVENT_SERVER_CONNECTED,
|
||||||
|
SC_EVENT_USB_DEVICE_DISCONNECTED,
|
||||||
|
SC_EVENT_DEMUXER_ERROR,
|
||||||
|
SC_EVENT_RECORDER_ERROR,
|
||||||
|
SC_EVENT_SCREEN_INIT_SIZE,
|
||||||
|
SC_EVENT_TIME_LIMIT_REACHED,
|
||||||
|
SC_EVENT_CONTROLLER_ERROR,
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue