summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
Diffstat (limited to 'input')
-rw-r--r--input/appleir.c6
-rw-r--r--input/input.c42
-rw-r--r--input/input.h4
-rw-r--r--input/joystick.c22
-rw-r--r--input/lirc.c4
-rw-r--r--input/lirc.h2
6 files changed, 40 insertions, 40 deletions
diff --git a/input/appleir.c b/input/appleir.c
index 855c3d7397..5e4bc148c6 100644
--- a/input/appleir.c
+++ b/input/appleir.c
@@ -68,7 +68,7 @@ static const struct {
{ APPLE_IR_BACKWARD, 2, AR_PREV_HOLD },
{ APPLE_IR_MENU, 1, AR_MENU },
{ APPLE_IR_MENU, 2, AR_MENU_HOLD },
- { APPLE_IR_PLUS, 1, AR_VUP },
+ { APPLE_IR_PLUS, 1, AR_VUP },
{ APPLE_IR_MINUS, 1, AR_VDOWN },
{ -1, -1, -1 }
};
@@ -102,7 +102,7 @@ int mp_input_appleir_init (char *dev)
fd = open (file, O_RDONLY | O_NONBLOCK);
if (fd < 0)
continue;
-
+
ioctl (fd, EVIOCGID, &id);
if (id.bustype == BUS_USB &&
id.vendor == USB_VENDOR_APPLE &&
@@ -147,6 +147,6 @@ int mp_input_appleir_read(void *ctx, int fd)
if (apple_ir_mapping[i].linux_keycode == ev.code &&
apple_ir_mapping[i].value == ev.value)
return apple_ir_mapping[i].mp_keycode;
-
+
return MP_INPUT_NOTHING;
}
diff --git a/input/input.c b/input/input.c
index cbd7e6a0db..92d6a212ab 100644
--- a/input/input.c
+++ b/input/input.c
@@ -211,17 +211,17 @@ static const mp_cmd_t mp_cmds[] = {
{ MP_CMD_CEXIT, "exit", 0, { {-1,{0}} } },
{ MP_CMD_CHIDE, "hide", 0, { {MP_CMD_ARG_INT,{3000}}, {-1,{0}} } },
#endif
-
+
{ MP_CMD_GET_VO_FULLSCREEN, "get_vo_fullscreen", 0, { {-1,{0}} } },
{ MP_CMD_GET_SUB_VISIBILITY, "get_sub_visibility", 0, { {-1,{0}} } },
{ MP_CMD_KEYDOWN_EVENTS, "key_down_event", 1, { {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_SET_PROPERTY, "set_property", 2, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_GET_PROPERTY, "get_property", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
{ MP_CMD_STEP_PROPERTY, "step_property", 1, { {MP_CMD_ARG_STRING, {0}}, {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
-
+
{ MP_CMD_SEEK_CHAPTER, "seek_chapter", 1, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
{ MP_CMD_SET_MOUSE_POS, "set_mouse_pos", 2, { {MP_CMD_ARG_INT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
-
+
{ 0, NULL, 0, {} }
};
@@ -375,7 +375,7 @@ static const mp_cmd_bind_t def_cmd_binds[] = {
{ { MOUSE_BTN4, 0 }, "seek -10" },
{ { MOUSE_BTN5, 0 }, "volume 1" },
{ { MOUSE_BTN6, 0 }, "volume -1" },
-
+
#ifdef CONFIG_DVDNAV
{ { KEY_KP8, 0 }, "dvdnav up" }, // up
{ { KEY_KP2, 0 }, "dvdnav down" }, // down
@@ -498,9 +498,9 @@ static const mp_cmd_bind_t def_cmd_binds[] = {
{ { KEY_VOLUME_UP, 0 }, "volume 1" },
{ { KEY_VOLUME_DOWN, 0 }, "volume -1" },
{ { KEY_MUTE, 0 }, "mute" },
-
+
{ { KEY_CLOSE_WIN, 0 }, "quit" },
-
+
{ { '!', 0 }, "seek_chapter -1" },
{ { '@', 0 }, "seek_chapter 1" },
{ { 'A', 0 }, "switch_angle 1" },
@@ -857,7 +857,7 @@ mp_input_parse_cmd(char* str) {
if(e <= ptr2 || *(e - 1) != '\\') break;
ptr2 = e + 1;
}
-
+
if(term != ' ' && (!e || e[0] == '\0')) {
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Command %s: argument %d is unterminated.\n",cmd_def->name,i+1);
ptr = NULL;
@@ -913,8 +913,8 @@ static int read_cmd(mp_input_fd_t* mp_fd, char** ret)
mp_fd->buffer = talloc_size(NULL, MP_CMD_MAX_SIZE);
mp_fd->pos = 0;
mp_fd->size = MP_CMD_MAX_SIZE;
- }
-
+ }
+
// Get some data if needed/possible
while (!mp_fd->got_cmd && !mp_fd->eof && (mp_fd->size - mp_fd->pos > 1) ) {
int r = mp_fd->read_func.cmd(mp_fd->fd, mp_fd->buffer+mp_fd->pos,
@@ -972,7 +972,7 @@ static int read_cmd(mp_input_fd_t* mp_fd, char** ret)
mp_fd->pos -= l+1;
memmove(mp_fd->buffer, end+1, mp_fd->pos);
}
-
+
if(*ret)
return 1;
else
@@ -1007,7 +1007,7 @@ mp_input_add_cmd_filter(mp_input_cmd_filter func, void* ctx) {
filter->next = cmd_filters;
cmd_filters = filter;
}
-
+
static char *find_bind_for_key(const mp_cmd_bind_t* binds, int n,int* keys)
{
@@ -1141,7 +1141,7 @@ static mp_cmd_t* interpret_key(struct input_ctx *ictx, int code, int paused)
ictx->key_down[ictx->num_key_down] = code;
ictx->num_key_down++;
ictx->last_key_down = 1;
- }
+ }
// We ignore key from last combination
ret = ictx->last_key_down ?
get_cmd_from_keys(ictx, ictx->num_key_down, ictx->key_down, paused)
@@ -1319,14 +1319,14 @@ static mp_cmd_t *get_queued_cmd(struct input_ctx *ictx, int peek_only)
return NULL;
ret = ictx->cmd_queue[ictx->cmd_queue_start];
-
- if (!peek_only) {
+
+ if (!peek_only) {
ictx->cmd_queue_length--;
ictx->cmd_queue_start = (ictx->cmd_queue_start + 1) % CMD_QUEUE_SIZE;
}
-
+
return ret;
-}
+}
/**
* \param peek_only when set, the returned command stays in the queue.
@@ -1402,7 +1402,7 @@ static char *get_key_name(int key, char buffer[12])
if(key_names[i].key == key)
return key_names[i].name;
}
-
+
if(isascii(key)) {
snprintf(buffer, 12, "%c",(char)key);
return buffer;
@@ -1493,7 +1493,7 @@ static void bind_keys(struct input_ctx *ictx,
}
}
}
-
+
if(!bind) {
bind_section->cmd_binds = talloc_realloc(bind_section,
bind_section->cmd_binds,
@@ -1707,12 +1707,12 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui)
if(use_gui)
add_binds(ictx, gui_def_cmd_binds);
#endif
-
+
char *config_file = input_conf->config_file;
file = config_file[0] != '/' ? get_path(config_file) : config_file;
if(!file)
return ictx;
-
+
if (!parse_config(ictx, file)) {
// free file if it was allocated by get_path(),
// before it gets overwritten
@@ -1780,7 +1780,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui)
(mp_close_func_t)close, NULL);
}
#endif
-
+
if (input_conf->in_file) {
struct stat st;
if (stat(input_conf->in_file, &st))
diff --git a/input/input.h b/input/input.h
index 47f2560348..69ed394ff2 100644
--- a/input/input.h
+++ b/input/input.h
@@ -139,7 +139,7 @@ typedef enum {
MP_CMD_DVDNAV_SELECT,
MP_CMD_DVDNAV_PREVMENU,
MP_CMD_DVDNAV_MOUSECLICK,
-
+
/// GUI commands
MP_CMD_GUI_EVENTS = 5000,
MP_CMD_GUI_LOADFILE,
@@ -183,7 +183,7 @@ typedef enum {
#define MP_INPUT_RETRY -4
// For the key's drivers, if possible you can send key up and key down
-// events. Key up is the default, to send a key down you must use the
+// events. Key up is the default, to send a key down you must use the
// OR operator between the key code and MP_KEY_DOWN.
#define MP_KEY_DOWN (1<<29)
// Use this when the key shouldn't be auto-repeated (like mouse buttons)
diff --git a/input/joystick.c b/input/joystick.c
index b6e5e43784..4a63c14fae 100644
--- a/input/joystick.c
+++ b/input/joystick.c
@@ -50,7 +50,7 @@ int mp_input_joystick_init(char* dev) {
int fd,l=0;
int initialized = 0;
struct js_event ev;
-
+
mp_tmsg(MSGT_INPUT,MSGL_V,"Opening joystick device %s\n",dev ? dev : JS_DEV);
fd = open( dev ? dev : JS_DEV , O_RDONLY | O_NONBLOCK );
@@ -58,7 +58,7 @@ int mp_input_joystick_init(char* dev) {
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Can't open joystick device %s: %s\n",dev ? dev : JS_DEV,strerror(errno));
return -1;
}
-
+
while(! initialized) {
l = 0;
while((unsigned int)l < sizeof(struct js_event)) {
@@ -73,12 +73,12 @@ int mp_input_joystick_init(char* dev) {
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno));
close(fd);
return -1;
- }
+ }
l += r;
}
if((unsigned int)l < sizeof(struct js_event)) {
if(l > 0)
- mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l);
+ mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: We lose %d bytes of data\n",l);
break;
}
if(ev.type == JS_EVENT_BUTTON)
@@ -86,7 +86,7 @@ int mp_input_joystick_init(char* dev) {
if(ev.type == JS_EVENT_AXIS)
axis[ev.number] = ev.value;
}
-
+
return fd;
}
@@ -104,9 +104,9 @@ int mp_input_joystick_read(void *ctx, int fd) {
if( r < 0)
mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n",strerror(errno));
else
- mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n","EOF");
+ mp_tmsg(MSGT_INPUT,MSGL_ERR,"Error while reading joystick device: %s\n","EOF");
return MP_INPUT_DEAD;
- }
+ }
l += r;
}
@@ -117,7 +117,7 @@ int mp_input_joystick_read(void *ctx, int fd) {
}
if(ev.type & JS_EVENT_INIT) {
- mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: warning init event, we have lost sync with driver.\n");
+ mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick: warning init event, we have lost sync with driver.\n");
ev.type &= ~JS_EVENT_INIT;
if(ev.type == JS_EVENT_BUTTON) {
int s = (btns >> ev.number) & 1;
@@ -130,9 +130,9 @@ int mp_input_joystick_read(void *ctx, int fd) {
(axis[ev.number] == 0 && ev.value >= -JOY_AXIS_DELTA && ev.value <= JOY_AXIS_DELTA)
) // State is the same : ignore
return MP_INPUT_NOTHING;
- }
+ }
}
-
+
if(ev.type & JS_EVENT_BUTTON) {
btns &= ~(1 << ev.number);
btns |= (ev.value << ev.number);
@@ -154,7 +154,7 @@ int mp_input_joystick_read(void *ctx, int fd) {
} else
return MP_INPUT_NOTHING;
} else {
- mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick warning unknown event type %d\n",ev.type);
+ mp_tmsg(MSGT_INPUT,MSGL_WARN,"Joystick warning unknown event type %d\n",ev.type);
return MP_INPUT_ERROR;
}
diff --git a/input/lirc.c b/input/lirc.c
index acc8f73dcb..1e3708a3f4 100644
--- a/input/lirc.c
+++ b/input/lirc.c
@@ -35,7 +35,7 @@ char *lirc_configfile;
static char* cmd_buf = NULL;
-int
+int
mp_input_lirc_init(void) {
int lirc_sock;
int mode;
@@ -81,7 +81,7 @@ int mp_input_lirc_read(int fd,char* dest, int s) {
}
return w;
}
-
+
// Nothing in the buffer, poll the lirc fd
if(lirc_nextcode(&code) != 0) {
mp_msg(MSGT_LIRC,MSGL_ERR,"Lirc error :(\n");
diff --git a/input/lirc.h b/input/lirc.h
index 22ba92cc6c..d7b22fbb60 100644
--- a/input/lirc.h
+++ b/input/lirc.h
@@ -19,7 +19,7 @@
#ifndef MPLAYER_LIRC_H
#define MPLAYER_LIRC_H
-int
+int
mp_input_lirc_init(void);
int