mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-08-18 01:15:59 +00:00
Warning fixes
This commit is contained in:
parent
6aad62ecde
commit
db2c0eee2c
@ -322,7 +322,7 @@ struct app_list *client_applist(const char *address) {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
int client_get_app_id(const char *address, char *name) {
|
int client_get_app_id(const char *address, const char *name) {
|
||||||
struct app_list *list = client_applist(address);
|
struct app_list *list = client_applist(address);
|
||||||
while (list != NULL) {
|
while (list != NULL) {
|
||||||
if (strcmp(list->name, name) == 0)
|
if (strcmp(list->name, name) == 0)
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
void client_init(const char* serverAddress);
|
void client_init(const char* serverAddress);
|
||||||
void client_start_app(STREAM_CONFIGURATION *config, const char* serverAddress, int appId, bool sops, bool localaudio);
|
void client_start_app(STREAM_CONFIGURATION *config, const char* serverAddress, int appId, bool sops, bool localaudio);
|
||||||
struct app_list* client_applist(const char* serverAddress);
|
struct app_list* client_applist(const char* serverAddress);
|
||||||
int client_get_app_id(const char* serverAddress, char* name);
|
int client_get_app_id(const char* serverAddress, const char* name);
|
||||||
void client_pair(const char *address);
|
void client_pair(const char *address);
|
||||||
int client_get_server_version(void);
|
int client_get_server_version(void);
|
||||||
bool client_is_paired(const char *address);
|
bool client_is_paired(const char *address);
|
||||||
|
@ -83,7 +83,7 @@ static void input_init_parms(struct input_device *dev, struct input_abs_parms *p
|
|||||||
parms->diff = parms->max - parms->min;
|
parms->diff = parms->max - parms->min;
|
||||||
}
|
}
|
||||||
|
|
||||||
void input_create(char* device, char* mapFile) {
|
void input_create(const char* device, char* mapFile) {
|
||||||
int fd = open(device, O_RDONLY|O_NONBLOCK);
|
int fd = open(device, O_RDONLY|O_NONBLOCK);
|
||||||
if (fd <= 0) {
|
if (fd <= 0) {
|
||||||
fprintf(stderr, "Failed to open device %s\n", device);
|
fprintf(stderr, "Failed to open device %s\n", device);
|
||||||
@ -275,7 +275,7 @@ static bool input_handle_event(struct input_event *ev, struct input_device *dev)
|
|||||||
break;
|
break;
|
||||||
case EV_KEY:
|
case EV_KEY:
|
||||||
if (ev->code < sizeof(keyCodes)/sizeof(keyCodes[0])) {
|
if (ev->code < sizeof(keyCodes)/sizeof(keyCodes[0])) {
|
||||||
char modifier = NULL;
|
char modifier = 0;
|
||||||
switch (ev->code) {
|
switch (ev->code) {
|
||||||
case KEY_LEFTSHIFT:
|
case KEY_LEFTSHIFT:
|
||||||
case KEY_RIGHTSHIFT:
|
case KEY_RIGHTSHIFT:
|
||||||
@ -290,7 +290,7 @@ static bool input_handle_event(struct input_event *ev, struct input_device *dev)
|
|||||||
modifier = MODIFIER_CTRL;
|
modifier = MODIFIER_CTRL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (modifier != NULL) {
|
if (modifier != 0) {
|
||||||
if (ev->value)
|
if (ev->value)
|
||||||
dev->modifiers |= modifier;
|
dev->modifiers |= modifier;
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user