Re: [xwax-devel] [PATCH] Allow up to 4 decks (instead of 3)
Brought to you by:
hills
From: MK a. El D. <el....@la...> - 2011-06-01 16:14:24
|
On Viernes, 6 de Mayo de 2011 00:05:52 usted escribió: > On Fri, 6 May 2011, el.doctor wrote: > > Woooww A-M-A-Z-I-N-G... > > > > Thx a lot Mark!! Big up for the great work! :D > > > > Will have to prepare a debian package ... > > Be careful before publishing random patches as 'proper' xwaxes. > > But yeah, this should do what you want. Give it a spin... :-) > > > Cheers > > MK > > > > > Message du 05/05/11 23:58 > > > De : "Mark Hills" > > > A : el....@la... > > > Copie à : xwa...@li... > > > Objet : [PATCH] Allow up to 4 decks (instead of 3) > > > > > > > > > Raise the limit to 4 decks, and re-map the function keys to manage > > > decks in sets of three, instead of four. > > > > > > This patch applies to 0.10-beta1. > > > > > > Note that I'm not planning on merging this patch. Most keyboards > > > seem to have the function keys in sets of four; it's really confusing > > > to re-group them in threes! > > > > > > But I do plan to raise the limit beyond 4 decks when MIDI or hardware > > > controllers are available. > > > > > > Signed-off-by: Mark Hills > > > --- > > > interface.c | 8 ++++---- > > > realtime.h | 2 +- > > > rig.c | 2 +- > > > rig.h | 2 +- > > > xwax.c | 2 +- > > > 5 files changed, 8 insertions(+), 8 deletions(-) > > > > > > diff --git a/interface.c b/interface.c > > > index 3d774bb..64220fc 100644 > > > --- a/interface.c > > > +++ b/interface.c > > > @@ -1287,11 +1287,11 @@ static bool handle_key(struct interface_t *in, > > > struct selector_t *sel, } else if (key >= SDLK_F1 && key <= SDLK_F12) > > > { > > > int func, deck; > > > > > > - /* Handle the function key press in groups of four -- > > > - * F1-F4 (deck 0), F5-F8 (deck 1) etc. */ > > > + /* Handle the function key press in groups of three -- > > > + * F1-F3 (deck 0), F4-F6 (deck 1) etc. */ > > > > > > - func = (key - SDLK_F1) % 4; > > > - deck = (key - SDLK_F1) / 4; > > > + func = (key - SDLK_F1) % 3; > > > + deck = (key - SDLK_F1) / 3; > > > > > > if (deck < in->ndeck) { > > > struct player_t *pl; > > > diff --git a/realtime.h b/realtime.h > > > index d971fef..6fa1e68 100644 > > > --- a/realtime.h > > > +++ b/realtime.h > > > @@ -32,7 +32,7 @@ struct rt_t { > > > bool finished; > > > > > > size_t ndv; > > > - struct device_t *dv[3]; > > > + struct device_t *dv[4]; > > > > > > size_t npt; > > > struct pollfd pt[32]; > > > diff --git a/rig.c b/rig.c > > > index 54f3200..1a57117 100644 > > > --- a/rig.c > > > +++ b/rig.c > > > @@ -96,7 +96,7 @@ int rig_main(struct rig_t *rig) > > > { > > > int r; > > > size_t n; > > > - struct pollfd pt[4], *pe; > > > + struct pollfd pt[5], *pe; > > > > > > assert(sizeof pt >= rig->ntrack + 1); > > > > > > diff --git a/rig.h b/rig.h > > > index 8149ba9..e0d70ba 100644 > > > --- a/rig.h > > > +++ b/rig.h > > > @@ -26,7 +26,7 @@ struct rig_t { > > > int event[2]; /* pipe to wake up service thread */ > > > > > > size_t ntrack; > > > - struct track_t *track[3]; > > > + struct track_t *track[4]; > > > }; > > > > > > int rig_init(struct rig_t *rig); > > > diff --git a/xwax.c b/xwax.c > > > index 8a611d6..a8b7996 100644 > > > --- a/xwax.c > > > +++ b/xwax.c > > > @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) > > > double speed; > > > struct timecode_def_t *timecode; > > > > > > - struct deck_t deck[3]; > > > + struct deck_t deck[4]; > > > struct rig_t rig; > > > struct rt_t rt; > > > struct interface_t iface; > > > > Une messagerie gratuite, garantie à vie et des services en plus, ça vous > > tente ? Je crée ma boîte mail www.laposte.net Hi Mark, Last week I've been trying 4decks with xwax :) ... running perfectly 1000Thx you rocks MK aka El Doctor |