1 --- ../mpcstickorig-0.10.2/mpcstick-0.10.2/src/mpcstick.c 2004-04-14 17:11:53.000000000 +0200
2 +++ src/mpcstick.c 2007-09-02 13:59:14.000000000 +0200
6 #define PACKAGE "mpcstick"
7 -#define VERSION "0.10.2"
8 +#define VERSION "0.10.2-kru"
10 #include "libmpdclient.h"
12 @@ -57,6 +57,9 @@ gboolean mpc_previous();
14 gboolean mpc_volume_up();
15 gboolean mpc_volume_down();
17 +gboolean mpc_repeat();
18 +gboolean mpc_random();
19 gboolean mpc_playpause();
21 gboolean mpc_seek_left();
22 @@ -78,7 +81,8 @@ enum {
26 - JS_BUTTON_10 = 16384
27 + JS_BUTTON_10 = 16384,
28 + JS_BUTTON_11 = 32768
32 @@ -97,6 +101,9 @@ js_function_table function_table[] = {
34 "volume_up", mpc_volume_up,
35 "volume_down", mpc_volume_down,
37 + "random", mpc_random,
38 + "repeat", mpc_repeat,
39 "playpause", mpc_playpause,
41 "seek_left", mpc_seek_left,
42 @@ -125,6 +132,7 @@ js_button_table button_table[] = {
43 "JS_BUTTON_8", JS_BUTTON_8,
44 "JS_BUTTON_9", JS_BUTTON_9,
45 "JS_BUTTON_10", JS_BUTTON_10,
46 + "JS_BUTTON_11", JS_BUTTON_11,
50 @@ -276,6 +284,7 @@ void joystick_listen(gchar *joy_dev_path
51 case 7: pressed_button = JS_BUTTON_8; break;
52 case 8: pressed_button = JS_BUTTON_9; break;
53 case 9: pressed_button = JS_BUTTON_10; break;
54 + case 10:pressed_button = JS_BUTTON_11; break;
55 default: pressed_button = JS_BUTTON_NONE; break;
58 @@ -372,6 +381,44 @@ gboolean mpc_next()
62 +gboolean mpc_random()
68 + if(status->random == 0)
70 + mpd_sendRandomCommand(conn, 1);
74 + mpd_sendRandomCommand(conn, 0);
76 + mpd_finishCommand(conn);
81 +gboolean mpc_repeat()
87 + if(status->repeat == 0)
89 + mpd_sendRepeatCommand(conn, 1);
93 + mpd_sendRepeatCommand(conn, 0);
95 + mpd_finishCommand(conn);
100 gboolean mpc_volume_up()
103 @@ -396,6 +443,26 @@ gboolean mpc_volume_down()
112 + gint *unmute = status->volume;
114 + if(status->volume == 0)
116 + mpd_sendSetvolCommand(conn, unmute);
120 + mpd_sendSetvolCommand(conn, 0);
122 + mpd_finishCommand(conn);
123 + printf("vol: %d \n", unmute);
127 gboolean mpc_playpause()
130 --- ../mpcstickorig-0.10.2/mpcstick-0.10.2/mpcstick.conf 2004-04-14 02:01:50.000000000 +0200
131 +++ mpcstick.conf 2007-09-02 01:14:17.000000000 +0200
135 server_addr = localhost
140 js_device = /dev/input/js0
141 @@ -19,6 +19,10 @@ JS_AXIS_DOWN = volume_down
142 JS_BUTTON_3 = playpause
145 +JS_BUTTON_5 = repeat
146 +JS_BUTTON_6 = random
149 JS_BUTTON_2 | JS_AXIS_LEFT = seek_left
150 JS_BUTTON_2 | JS_AXIS_RIGHT = seek_right
152 --- ../mpcstickorig-0.10.2/mpcstick-0.10.2/configure.in 2004-04-14 17:09:06.000000000 +0200
153 +++ configure.in 2007-09-01 20:53:13.000000000 +0200
155 AC_INIT(configure.in)
156 -AM_INIT_AUTOMAKE(mpcstick, "0.10.2", aaron@aaronbock.net)
157 +AM_INIT_AUTOMAKE(mpcstick, "0.10.2-kru", aaron@aaronbock.net)