Turn screen on on right-click

The right-click is almost useless on Android, so use it to turn the
screen on.

Add a new control event type (command) to request the server to turn the
screen on.
This commit is contained in:
Romain Vimont
2018-02-02 14:52:23 +01:00
parent 228545cefd
commit a139509f11
9 changed files with 107 additions and 1 deletions

View File

@@ -17,8 +17,11 @@ enum control_event_type {
CONTROL_EVENT_TYPE_TEXT,
CONTROL_EVENT_TYPE_MOUSE,
CONTROL_EVENT_TYPE_SCROLL,
CONTROL_EVENT_TYPE_COMMAND,
};
#define CONTROL_EVENT_COMMAND_SCREEN_ON 0
struct control_event {
enum control_event_type type;
union {
@@ -40,6 +43,9 @@ struct control_event {
Sint32 hscroll;
Sint32 vscroll;
} scroll_event;
struct {
int action;
} command_event;
};
};